]> git.pld-linux.org Git - packages/audit.git/blobdiff - audit.spec
- use %service, rel 2
[packages/audit.git] / audit.spec
index 67cfd33d7aaf46e3131419c0efdf5cd169aaa74f..38544f57fc891781641ff30c9cad7ad3e839783a 100644 (file)
@@ -1,21 +1,25 @@
-# TODO: fix build with current llh
 Summary:       User space tools for 2.6 kernel auditing
 Summary(pl):   Narzêdzia przestrzeni u¿ytkownika do audytu j±der 2.6
 Name:          audit
-Version:       0.9.2
-Release:       1
+Version:       1.0.3
+Release:       2
 License:       GPL
 Group:         Daemons
 Source0:       http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
-# Source0-md5: e31f3c554e9848a50afa6a119dc84d5c
+# Source0-md5: 950daad97adfa3134289aa5b4e885f8f
+# http://people.redhat.com/sgrubb/audit/audit.h
+Source1:       %{name}.h
+Source2:       %{name}d.init
+Source3:       %{name}d.sysconfig
 URL:           http://people.redhat.com/sgrubb/audit/
 BuildRequires: autoconf >= 2.59
 BuildRequires: automake >= 1.9
 BuildRequires: libtool
 BuildRequires: linux-libc-headers >= 2.6.11
-PreReq:                rc-scripts
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post,preun):  /sbin/chkconfig
 Requires:      %{name}-libs = %{version}-%{release}
+Requires:      rc-scripts
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sbindir        /sbin
@@ -50,6 +54,7 @@ Summary(pl):  Pliki nag
 License:       LGPL
 Group:         Development/Libraries
 Requires:      %{name}-libs = %{version}-%{release}
+Requires:      linux-libc-headers >= 7:2.6.12.0-4
 
 %description libs-devel
 The audit-libs-devel package contains the header files needed for
@@ -77,6 +82,9 @@ u
 %prep
 %setup -q
 
+install -D %{SOURCE1} lib/linux/audit.h
+install -D %{SOURCE1} src/mt/linux/audit.h
+
 %build
 %{__libtoolize}
 %{__aclocal}
@@ -84,7 +92,10 @@ u
 %{__autoheader}
 %{__automake}
 %configure
-%{__make}
+# override auditd_{C,LD}FLAGS to avoid -fPIE unsupported by gcc 3.3
+%{__make} \
+       auditd_CFLAGS= \
+       auditd_LDFLAGS=
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -95,13 +106,16 @@ install -d $RPM_BUILD_ROOT%{_var}/log/audit
 
 install -d $RPM_BUILD_ROOT/%{_lib}
 mv -f $RPM_BUILD_ROOT%{_libdir}/libaudit.so.* $RPM_BUILD_ROOT/%{_lib}
-ln -sf $(cd $RPM_BUILD_ROOT/%{_lib} ; echo libaudit.so.*.*.*) \
-       PM_BUILD_ROOT%{_libdir}/libaudit.so
+ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib} ; echo libaudit.so.*.*.*) \
+       $RPM_BUILD_ROOT%{_libdir}/libaudit.so
 
 # We manually install this since Makefile doesn't
 install -d $RPM_BUILD_ROOT%{_includedir}
 install lib/libaudit.h $RPM_BUILD_ROOT%{_includedir}
 
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/auditd
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/auditd
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -110,17 +124,11 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add auditd
-if [ -f /var/lock/subsys/auditd ]; then
-       /etc/rc.d/init.d/auditd restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/auditd start\" to start audit daemon." >&2
-fi
+%service auditd restart "audit daemon"
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/auditd ]; then
-               /etc/rc.d/init.d/auditd stop >&2
-       fi
+       %service auditd stop
        /sbin/chkconfig --del auditd
 fi
 
This page took 0.057 seconds and 4 git commands to generate.