]> git.pld-linux.org Git - packages/audit.git/blob - audit.spec
- %verify() for config files
[packages/audit.git] / audit.spec
1 Summary:        User space tools for 2.6 kernel auditing
2 Summary(pl):    Narzêdzia przestrzeni u¿ytkownika do audytu j±der 2.6
3 Name:           audit
4 Version:        1.0.3
5 Release:        1.1
6 License:        GPL
7 Group:          Daemons
8 Source0:        http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
9 # Source0-md5:  950daad97adfa3134289aa5b4e885f8f
10 # http://people.redhat.com/sgrubb/audit/audit.h
11 Source1:        audit.h
12 Source2:        %{name}d.init
13 Source3:        %{name}d.sysconfig
14 URL:            http://people.redhat.com/sgrubb/audit/
15 BuildRequires:  autoconf >= 2.59
16 BuildRequires:  automake >= 1.9
17 BuildRequires:  gcc >= 5:3.4
18 BuildRequires:  libtool
19 BuildRequires:  linux-libc-headers >= 2.6.11
20 Requires:       rc-scripts
21 Requires(post,preun):   /sbin/chkconfig
22 Requires:       %{name}-libs = %{version}-%{release}
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         _sbindir        /sbin
26
27 %description
28 The audit package contains the user space utilities for storing and
29 processing the audit records generate by the audit subsystem in the
30 Linux 2.6 kernel.
31
32 %description -l pl
33 Ten pakiet zawiera narzêdzia przestrzeni u¿ytkownika do przechowywania
34 i przetwarzania rekordów audytu generowanych przez podsystem audytu w
35 j±drach Linuksa 2.6.
36
37 %package libs
38 Summary:        Dynamic libaudit library
39 Summary(pl):    Biblioteka dynamiczna libaudit
40 License:        LGPL
41 Group:          Libraries
42
43 %description libs
44 The audit-libs package contains the dynamic library needed for
45 applications to use the audit framework.
46
47 %description libs -l pl
48 Ten pakiet zawiera bibliotekê dynamiczn± potrzebn± dla aplikacji
49 u¿ywaj±cych ¶rodowiska audytu.
50
51 %package libs-devel
52 Summary:        Header files for libaudit library
53 Summary(pl):    Pliki nag³ówkowe biblioteki libaudio
54 License:        LGPL
55 Group:          Development/Libraries
56 Requires:       %{name}-libs = %{version}-%{release}
57 Requires:       linux-libc-headers >= 7:2.6.12.0-4
58
59 %description libs-devel
60 The audit-libs-devel package contains the header files needed for
61 developing applications that need to use the audit framework library.
62
63 %description libs-devel -l pl
64 Ten pakiet zawiera pliki nag³ówkowe potrzebne do tworzenia aplikacji
65 u¿ywaj±cych biblioteki ¶rodowiska audytu.
66
67 %package libs-static
68 Summary:        Static libaudit library
69 Summary(pl):    Statyczna biblioteka libaudit
70 License:        LGPL
71 Group:          Development/Libraries
72 Requires:       %{name}-libs-devel = %{version}-%{release}
73
74 %description libs-static
75 The audit-libs-static package contains the static library for
76 developing applications that need to use the audit framework library.
77
78 %description libs-static -l pl
79 Ten pakiet zawiera statyczn± bibliotekê do tworzenia aplikacji
80 u¿ywaj±cych ¶rodowiska audytu.
81
82 %prep
83 %setup -q
84
85 install -D %{SOURCE1} lib/linux/audit.h
86 install -D %{SOURCE1} src/mt/linux/audit.h
87
88 %build
89 %{__libtoolize}
90 %{__aclocal}
91 %{__autoconf}
92 %{__autoheader}
93 %{__automake}
94 %configure
95 %{__make}
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99 install -d $RPM_BUILD_ROOT%{_var}/log/audit
100
101 %{__make} install \
102         DESTDIR=$RPM_BUILD_ROOT
103
104 install -d $RPM_BUILD_ROOT/%{_lib}
105 mv -f $RPM_BUILD_ROOT%{_libdir}/libaudit.so.* $RPM_BUILD_ROOT/%{_lib}
106 ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib} ; echo libaudit.so.*.*.*) \
107         $RPM_BUILD_ROOT%{_libdir}/libaudit.so
108
109 # We manually install this since Makefile doesn't
110 install -d $RPM_BUILD_ROOT%{_includedir}
111 install lib/libaudit.h $RPM_BUILD_ROOT%{_includedir}
112
113 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/auditd
114 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/auditd
115
116 %clean
117 rm -rf $RPM_BUILD_ROOT
118
119 %post   libs -p /sbin/ldconfig
120 %postun libs -p /sbin/ldconfig
121
122 %post
123 /sbin/chkconfig --add auditd
124 if [ -f /var/lock/subsys/auditd ]; then
125         /etc/rc.d/init.d/auditd restart >&2
126 else
127         echo "Run \"/etc/rc.d/init.d/auditd start\" to start audit daemon." >&2
128 fi
129
130 %preun
131 if [ "$1" = "0" ]; then
132         if [ -f /var/lock/subsys/auditd ]; then
133                 /etc/rc.d/init.d/auditd stop >&2
134         fi
135         /sbin/chkconfig --del auditd
136 fi
137
138 %files
139 %defattr(644,root,root,755)
140 %doc AUTHORS ChangeLog README THANKS TODO sample.rules
141 %attr(750,root,root) %{_sbindir}/auditctl
142 %attr(750,root,root) %{_sbindir}/auditd
143 %attr(750,root,root) %{_sbindir}/ausearch
144 %attr(750,root,root) %{_sbindir}/autrace
145 %attr(754,root,root) /etc/rc.d/init.d/auditd
146 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{_sysconfdir}/auditd.conf
147 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{_sysconfdir}/audit.rules
148 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %verify(not md5 mtime size) /etc/sysconfig/auditd
149 %attr(750,root,root) %dir %{_var}/log/audit
150 %{_mandir}/man8/*
151
152 %files libs
153 %defattr(644,root,root,755)
154 %attr(755,root,root) /%{_lib}/libaudit.so.*.*.*
155
156 %files libs-devel
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_libdir}/libaudit.so
159 %{_libdir}/libaudit.la
160 %{_includedir}/libaudit.h
161 %{_mandir}/man3/*
162
163 %files libs-static
164 %defattr(644,root,root,755)
165 %{_libdir}/libaudit.a
This page took 0.108256 seconds and 4 git commands to generate.