]> git.pld-linux.org Git - packages/sudo.git/blobdiff - sudo.spec
- switch to DESTDIR style %install.
[packages/sudo.git] / sudo.spec
index 62c77cb2e3348f6b960fbb914cb1fadd0d1a4bea..d30d14aca84bd8ca45ad5a4ae1575ea2154fb50b 100644 (file)
--- a/sudo.spec
+++ b/sudo.spec
@@ -1,15 +1,19 @@
 Summary:       Allows command execution as root for specified users
 Summary(pl):   Umo¿liwia wykonywaniew poleceñ jako root dla konkretnych u¿ytkowników
 Name:          sudo
-Version:       1.5.9p1
+Version:       1.5.9p4
 Release:       1
 Copyright:     GPL
 Group:         Utilities/System
 Group(pl):     Narzêdzia/Systemowe
-Source:                ftp://ftp.cs.colorado.edu/pub/sudo/cu-sudo.v%{version}.tar.gz
+Source0:       ftp://ftp.cs.colorado.edu/pub/sudo/cu-sudo.v%{version}.tar.gz
+Source1:       sudo.pamd
+Patch:         sudo-DESTDIR.patch
 URL:           http://www.courtesan.com/courtesan/products/sudo/
 BuildRoot:     /tmp/%{name}-%{version}-root
 
+%define                _sysconfdir     /etc
+
 %description
 Sudo (superuser do) allows a permitted user to execute a command as the
 superuser (real and effective uid and gid are set to 0 and root's group as
@@ -31,13 +35,13 @@ autoryzowany jest opisane w pliku /etc/sudoers.
 
 %prep
 %setup -q -n %{name}.v%{version}
+%patch -p1
 
 %build
-CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" \
-./configure %{_target} \
-       --prefix=/usr \
-       --sbindir=/usr/sbin \
-       --with-timedir=/var/run \
+autoconf
+LDFLAGS="-s"; export LDFLAGS
+%configure \
+       --with-timedir=/var/run/sudo \
        --with-C2 \
        --with-pam \
        --with-logging=both \
@@ -59,24 +63,22 @@ make CFLAGS="$RPM_OPT_FLAGS"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/{etc/pam.d,var/log}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/pam.d,/var/{log,run/sudo}}
 
 make install \
-       prefix=$RPM_BUILD_ROOT/usr \
-       visudodir=$RPM_BUILD_ROOT/usr/sbin \
-       sysconfdir=$RPM_BUILD_ROOT/etc \
+       DESTDIR=$RPM_BUILD_ROOT \
        install_uid=`id -u` \
        install_gid=`id -g` \
        sudoers_uid=`id -u` \
        sudoers_gid=`id -g`
 
-install sample.pam $RPM_BUILD_ROOT/etc/pam.d/sudo
+install %{SOURCE1}  $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/sudo
 touch $RPM_BUILD_ROOT/var/log/sudo.log
 
-gzip -9nf $RPM_BUILD_ROOT/usr/man/man{5,8}/* \
+gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man{5,8}/* \
        BUGS CHANGES HISTORY README TODO TROUBLESHOOTING
 
-chmod -R +r $RPM_BUILD_ROOT/usr
+chmod -R +r $RPM_BUILD_ROOT%{_prefix}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -84,68 +86,10 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc *.gz sample.sudoers
-%attr(0400,root,root) %verify(not md5 size mtime) %config(noreplace) /etc/sudoers
-%attr(0600,root,root) %config /etc/pam.d/sudo
-%attr(4555,root,root) /usr/bin/sudo
-%attr(0555,root,root) /usr/sbin/visudo
-/usr/man/man*/*
+%attr(0400,root,root) %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/sudoers
+%attr(0600,root,root) %config %{_sysconfdir}/pam.d/sudo
+%attr(4555,root,root) %{_bindir}/sudo
+%attr(0555,root,root) %{_sbindir}/visudo
+%{_mandir}/man*/*
 %attr(0600,root,root) %ghost /var/log/sudo.log
-
-%changelog
-* Wed Apr  7 1999 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
-  [1.5.9p1-1]
-- added gzipping %doc
-- removed man group from man pages.
-
-* Sun Nov 29 1998 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
-  [1.5.7p2-1]
-- added gzipping man pages,
-- changed Buildroot to /tmp/%%{name}-%%{version}-root,
-- added "not size mtime" to %verify rule for /etc/sudoers,
-- changed way passing $RPM_OPT_FLAGS,
-- rewrited %description,
-- rewrited %build and %install using new autoconf sheme,
-- added pl translation.
-
-* Tue Sep 21 1998 Ian Macdonald <ianmacd@xs4all.nl>
-- upgraded to 1.5.6p2
-- built with PAM support
-- removed SUDO_LDFLAGS="-static" from make: would no longer build with it
-
-* Wed May  6 1998 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
-- %%{version} macro instead %%{PACKAGE_VERSION},
-- added -q %setup parameter,
-- added using %%{name} macro in Buildroot.
-
-* Mon Apr 27 1998 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
-  [1.5.4-3]
-- Buildroot changed to /tmp/sudo-%%{PACKAGE_VERSION}-root,
-- added %%{PACKAGE_VERSION} to Source url and %setup macro,
-- removed sudo-1.5.4-buildroot.patch and instead this added few parameters
-  to "make install",
-- SUDO_LDFLAGS="-static" and CFLAGS="$RPM_OPT_FLAGS" is passed as make 
-  arguments,
-- removed COPYING from %doc (Copyright statement is in Copyright field),
-- removed from %doc *.pod and options.h and added sample.sudoers,
-- added /var/log/sudo.log as %ghost file,
-- added %verify(not md5) for /etc/sudoers (allow modify this file without
-  display warning on verify with using rpm),
-- added noreplace parameter for /etc/sudoers %config file,
-- removed sudo.v1.5.4-glibc.diff because sudo compiles on glibc 2.0.7,
-- added %defattr and %attr macros in %files (allows building package from
-  non-root account); %defattr requires rpm >= 2.4.99.
-
-* Fri Jan 23 1998 Ian Macdonald <ianmacd@xs4all.nl>
-  [1.5.4-2]
-- glibc build was broken; added patch to fix it
-
-* Tue Nov 18 1997 Otto Hammersmith <otto@redhat.com>
-- built for glibc, no problems
-
-* Fri Apr 25 1997 Michael Fulbright <msf@redhat.com>
-- Fixed for 4.2 PowerTools 
-- Still need to be pamified
-- Still need to move stmp file to /var/log
-
-* Mon Feb 17 1997 Michael Fulbright <msf@redhat.com>
-- First version for PowerCD.
+%attr(0700,root,root) %dir /var/run/sudo
This page took 0.059762 seconds and 4 git commands to generate.