sudo.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. ##
  2. ## sudo.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: sudo
  27. Summary: Flexible Switch User Command
  28. URL: http://www.courtesan.com/sudo/
  29. Vendor: Todd Miller
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [REL]
  32. Group: System
  33. License: BSD
  34. Version: 1.6.3p7
  35. Release: 20011201
  36. # list of sources
  37. Source0: ftp://ftp.courtesan.com/pub/sudo/sudo-%{version}.tar.gz
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20011227
  42. PreReq: OpenPKG, openpkg >= 20011227
  43. AutoReq: no
  44. AutoReqProv: no
  45. %description
  46. Sudo (superuser do) allows a system administrator to give certain
  47. users (or groups of users) the ability to run some (or all) commands
  48. as root or another user while logging the commands and arguments.
  49. %prep
  50. %setup -q
  51. %build
  52. CC="%{l_cc}" \
  53. CFLAGS="%{l_cflags -O}" \
  54. ./configure \
  55. --prefix=%{l_prefix} \
  56. --sysconfdir=%{l_prefix}/etc/sudo \
  57. --with-logpath=%{l_prefix}/var/sudo/log/sudo.log \
  58. --with-logging=file \
  59. --with-sudoers-mode=0400 \
  60. --with-sudoers-uid=0 \
  61. --with-sudoers-gid=%{l_fsuid} \
  62. --without-sendmail \
  63. --with-ignore-dot \
  64. --with-pam \
  65. --enable-shell-sets-home \
  66. --disable-root-sudo \
  67. --with-env-editor \
  68. --disable-path-info \
  69. --disable-nls
  70. %{l_make} %{l_mflags -O}
  71. %install
  72. rm -rf $RPM_BUILD_ROOT
  73. %{l_shtool} mkdir -f -p -m 755 \
  74. $RPM_BUILD_ROOT%{l_prefix}/var/sudo/log/
  75. %{l_rpmtool} subst \
  76. "s;-m 4111;-m 4511;" \
  77. "s;-m 0111;-m 0511;" \
  78. -- Makefile
  79. %{l_make} %{l_mflags} install \
  80. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  81. exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \
  82. sysconfdir=$RPM_BUILD_ROOT%{l_prefix}/etc/sudo \
  83. install_uid=`%{l_shtool} echo -e %u` \
  84. install_gid=`%{l_shtool} echo -e %u` \
  85. sudoers_uid=`%{l_shtool} echo -e %u` \
  86. sudoers_gid=`%{l_shtool} echo -e %u`
  87. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  88. %{l_files_std} \
  89. '%attr(4111,root,%{l_fsgrp}) %{l_prefix}/bin/sudo' \
  90. '%attr(0111,root,%{l_fsgrp}) %{l_prefix}/sbin/visudo' \
  91. '%config %attr(0400,root,%{l_fsgrp}) %{l_prefix}/etc/sudo/sudoers'
  92. %files -f files
  93. %clean
  94. rm -rf $RPM_BUILD_ROOT