]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blobdiff - audit/audit.nm
Merge remote-tracking branch 'stevee/audit'
[people/ms/ipfire-3.x.git] / audit / audit.nm
index 5e36fbb1b5cdd2ee2c263f21af2ad02240f22630..66017be7b8f9c46a6a6bb781cc9b7ee994462c2c 100644 (file)
@@ -4,8 +4,8 @@
 ###############################################################################
 
 name       = audit
-version    = 2.0.5
-release    = 1
+version    = 2.1.3
+release    = 7
 
 groups     = System/Daemons
 url        = http://people.redhat.com/sgrubb/audit/
@@ -44,6 +44,10 @@ build
                autoreconf -fvi
        end
 
+       test
+               make check
+       end
+
        install_cmds
                rm -vf %{BUILDROOT}/lib/libau{dit,parse}.so
                ln -svf ../../lib/libaudit.so.1 %{BUILDROOT}/usr/lib/libaudit.so
@@ -52,12 +56,33 @@ build
                mkdir -pv %{BUILDROOT}/usr/sbin/
                mv -v %{BUILDROOT}/sbin/audisp*remote %{BUILDROOT}/usr/sbin/
 
+               mkdir -pv %{BUILDROOT}/var/log/audit
+
                rm -rfv %{BUILDROOT}/etc/{rc.d,sysconfig}
        end
 end
 
 packages
        package %{name}
+               prerequires += systemd-units
+
+               script postin
+                       /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script preun
+                       /bin/systemctl --no-reload disable auditd.service >/dev/null 2>&1 || :
+                       /bin/systemctl stop auditd.service >/dev/null 2>&1 || :
+               end
+
+               script postun
+                       /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script postup
+                       /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+                       /bin/systemctl try-restart auditd.service >/dev/null 2>&1 || :
+               end
        end
 
        package %{name}-libs
@@ -68,6 +93,15 @@ packages
                template DEVEL
        end
 
+       package python-%{name}
+               summary = Python bindings for libaudit.
+               description = %{summary}
+
+               files
+                       /usr/lib/python*/
+               end
+       end
+
        package %{name}-debuginfo
                template DEBUGINFO
        end