]> git.pld-linux.org Git - packages/audit.git/blame - audit.spec
- updated to 1.5.1
[packages/audit.git] / audit.spec
CommitLineData
e5a8c0d8
JB
1#
2# Conditional build:
3%bcond_without pie # auditd as PIE binary
57f09668 4%bcond_without python # don't build python bindings
e5a8c0d8 5#
54697230 6Summary: User space tools for 2.6 kernel auditing
7f0a1e1e 7Summary(pl.UTF-8): Narzędzia przestrzeni użytkownika do audytu jąder 2.6
54697230 8Name: audit
80475ae6 9Version: 1.5.1
6d3a6f20 10Release: 1
54697230
JB
11License: GPL
12Group: Daemons
13Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
80475ae6 14# Source0-md5: 9f410eae053012d1f4db7f60c45cf8bf
7630c8d3 15# formerly http://people.redhat.com/sgrubb/audit/audit.h
de2a21fd
JB
16Source2: %{name}d.init
17Source3: %{name}d.sysconfig
80475ae6 18Patch0: %{name}-install.patch
54697230
JB
19URL: http://people.redhat.com/sgrubb/audit/
20BuildRequires: autoconf >= 2.59
10583781 21BuildRequires: automake >= 1:1.9
e5a8c0d8 22%{?with_pie:BuildRequires: gcc >= 5:3.4}
10583781
JB
23BuildRequires: glibc-headers >= 6:2.3.6
24BuildRequires: libstdc++-devel
54697230 25BuildRequires: libtool
80475ae6 26BuildRequires: linux-libc-headers >= 7:2.6.20
57f09668 27%if %{with python}
9ee6c1ce 28BuildRequires: rpm-pythonprov
7e695d35 29BuildRequires: swig-python
57f09668 30%else
31BuildRequires: sed >= 4.0
32%endif
33BuildRequires: rpmbuild(macros) >= 1.268
54697230
JB
34Requires(post,preun): /sbin/chkconfig
35Requires: %{name}-libs = %{version}-%{release}
96102055 36Requires: rc-scripts
54697230
JB
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%define _sbindir /sbin
40
41%description
42The audit package contains the user space utilities for storing and
43processing the audit records generate by the audit subsystem in the
44Linux 2.6 kernel.
45
b27e8f95
JR
46%description -l pl.UTF-8
47Ten pakiet zawiera narzędzia przestrzeni użytkownika do przechowywania
48i przetwarzania rekordów audytu generowanych przez podsystem audytu w
49jądrach Linuksa 2.6.
54697230
JB
50
51%package libs
5a56b716 52Summary: Dynamic audit libraries
7f0a1e1e 53Summary(pl.UTF-8): Biblioteki dynamiczne audit
54697230
JB
54License: LGPL
55Group: Libraries
56
57%description libs
5a56b716 58The audit-libs package contains the dynamic libraries needed for
54697230
JB
59applications to use the audit framework.
60
b27e8f95 61%description libs -l pl.UTF-8
5a56b716 62Ten pakiet zawiera biblioteki dynamiczne potrzebne dla aplikacji
b27e8f95 63używających środowiska audytu.
54697230
JB
64
65%package libs-devel
5a56b716 66Summary: Header files for audit libraries
7f0a1e1e 67Summary(pl.UTF-8): Pliki nagłówkowe bibliotek audit
54697230
JB
68License: LGPL
69Group: Development/Libraries
70Requires: %{name}-libs = %{version}-%{release}
de2a21fd 71Requires: linux-libc-headers >= 7:2.6.12.0-4
54697230
JB
72
73%description libs-devel
74The audit-libs-devel package contains the header files needed for
75developing applications that need to use the audit framework library.
76
b27e8f95
JR
77%description libs-devel -l pl.UTF-8
78Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia aplikacji
79używających biblioteki środowiska audytu.
54697230
JB
80
81%package libs-static
5a56b716 82Summary: Static audit libraries
7f0a1e1e 83Summary(pl.UTF-8): Statyczne biblioteki audit
54697230
JB
84License: LGPL
85Group: Development/Libraries
86Requires: %{name}-libs-devel = %{version}-%{release}
87
88%description libs-static
5a56b716
JB
89The audit-libs-static package contains the static libraries for
90developing applications that need to use the audit framework.
54697230 91
b27e8f95 92%description libs-static -l pl.UTF-8
5a56b716 93Ten pakiet zawiera statyczne biblioteki do tworzenia aplikacji
b27e8f95 94używających środowiska audytu.
54697230 95
9ee6c1ce
JB
96%package -n python-audit
97Summary: Python interface to libaudit library
7f0a1e1e 98Summary(pl.UTF-8): Pythonowy interfejs do biblioteki libaudit
9ee6c1ce
JB
99License: LGPL
100Group: Libraries/Python
101Requires: %{name}-libs = %{version}-%{release}
102
103%description -n python-audit
104Python interface to libaudit library.
105
b27e8f95 106%description -n python-audit -l pl.UTF-8
9ee6c1ce
JB
107Pythonowy interfejs do biblioteki libaudit.
108
54697230
JB
109%prep
110%setup -q
eb9b3ab9 111%patch0 -p1
1a8b063a 112
3d5ad897 113%if !%{with python}
2a3ea293 114sed '/PYTHON/d; s#swig/Makefile ##; s# audisp/Makefile##' -i configure.ac
115sed 's/swig//; s/audisp//' -i Makefile.am
57f09668 116%endif
117
54697230
JB
118%build
119%{__libtoolize}
120%{__aclocal}
121%{__autoconf}
122%{__autoheader}
123%{__automake}
cc094a3e
AM
124%configure \
125 --with-apparmor
e5a8c0d8
JB
126# override auditd_{C,LD}FLAGS to avoid -fPIE unsupported by gcc 3.3
127%{__make} \
aac5fae1 128 %{!?with_pie:auditd_CFLAGS="-D_REENTRANT -D_GNU_SOURCE" auditd_LDFLAGS="-Wl,-z,relro"}
54697230 129
bf2e6acc
JB
130# temporarily not included in all
131%{__make} -C auparse
132
54697230
JB
133%install
134rm -rf $RPM_BUILD_ROOT
135install -d $RPM_BUILD_ROOT%{_var}/log/audit
136
137%{__make} install \
138 DESTDIR=$RPM_BUILD_ROOT
139
bf2e6acc
JB
140# temporarily not included in all
141%{__make} -C auparse install \
142 DESTDIR=$RPM_BUILD_ROOT
143
54697230
JB
144install -d $RPM_BUILD_ROOT/%{_lib}
145mv -f $RPM_BUILD_ROOT%{_libdir}/libaudit.so.* $RPM_BUILD_ROOT/%{_lib}
de2a21fd 146ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib} ; echo libaudit.so.*.*.*) \
1a8b063a 147 $RPM_BUILD_ROOT%{_libdir}/libaudit.so
8ba70267
JB
148mv -f $RPM_BUILD_ROOT%{_libdir}/libauparse.so.* $RPM_BUILD_ROOT/%{_lib}
149ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib} ; echo libauparse.so.*.*.*) \
150 $RPM_BUILD_ROOT%{_libdir}/libauparse.so
54697230
JB
151
152# We manually install this since Makefile doesn't
153install -d $RPM_BUILD_ROOT%{_includedir}
154install lib/libaudit.h $RPM_BUILD_ROOT%{_includedir}
155
de2a21fd
JB
156install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/auditd
157install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/auditd
158
57f09668 159%if %{with python}
eb9b3ab9 160%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
8e99bb72 161%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
eb9b3ab9 162rm -f $RPM_BUILD_ROOT%{py_sitescriptdir}/*.py
8e99bb72 163rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
57f09668 164%endif
9ee6c1ce 165
54697230
JB
166%clean
167rm -rf $RPM_BUILD_ROOT
168
169%post libs -p /sbin/ldconfig
170%postun libs -p /sbin/ldconfig
171
172%post
173/sbin/chkconfig --add auditd
2a6b8c9c 174%service auditd restart "audit daemon"
54697230
JB
175
176%preun
177if [ "$1" = "0" ]; then
2a6b8c9c 178 %service auditd stop
54697230
JB
179 /sbin/chkconfig --del auditd
180fi
181
182%files
183%defattr(644,root,root,755)
80475ae6
JB
184%doc AUTHORS ChangeLog README THANKS TODO sample.rules audisp/README-CONF*
185%attr(750,root,root) %{_sbindir}/audispd
54697230
JB
186%attr(750,root,root) %{_sbindir}/auditctl
187%attr(750,root,root) %{_sbindir}/auditd
e5a8c0d8 188%attr(750,root,root) %{_sbindir}/aureport
54697230
JB
189%attr(750,root,root) %{_sbindir}/ausearch
190%attr(750,root,root) %{_sbindir}/autrace
80475ae6
JB
191%dir %{_libdir}/audispd-0.1-plugins
192%attr(755,root,root) %{_libdir}/audispd-0.1-plugins/plugin-audisp2file
193%dir %{_sysconfdir}/audispd
194%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audispd/audispd.conf
195%dir %{_sysconfdir}/audispd/plugins.d
196%dir %{_sysconfdir}/audispd/policies.d
7630c8d3
JB
197%dir %{_sysconfdir}/audit
198%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/auditd.conf
199%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/audit.rules
80475ae6 200%attr(754,root,root) /etc/rc.d/init.d/auditd
f6ae0a53 201%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/auditd
54697230 202%attr(750,root,root) %dir %{_var}/log/audit
80475ae6
JB
203%{_mandir}/man5/audispd.conf.5*
204%{_mandir}/man5/auditd.conf.5*
54697230
JB
205%{_mandir}/man8/*
206
207%files libs
208%defattr(644,root,root,755)
209%attr(755,root,root) /%{_lib}/libaudit.so.*.*.*
8ba70267 210%attr(755,root,root) /%{_lib}/libauparse.so.*.*.*
7630c8d3 211%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libaudit.conf
54697230
JB
212
213%files libs-devel
214%defattr(644,root,root,755)
215%attr(755,root,root) %{_libdir}/libaudit.so
8ba70267 216%attr(755,root,root) %{_libdir}/libauparse.so
54697230 217%{_libdir}/libaudit.la
8ba70267 218%{_libdir}/libauparse.la
6d3a6f20 219%{_includedir}/auparse*.h
54697230
JB
220%{_includedir}/libaudit.h
221%{_mandir}/man3/*
222
223%files libs-static
224%defattr(644,root,root,755)
225%{_libdir}/libaudit.a
8ba70267 226%{_libdir}/libauparse.a
9ee6c1ce 227
57f09668 228%if %{with python}
9ee6c1ce
JB
229%files -n python-audit
230%defattr(644,root,root,755)
231%attr(755,root,root) %{py_sitedir}/_audit.so
6d3a6f20 232%attr(755,root,root) %{py_sitedir}/_auparse.so
8e99bb72 233%{py_sitescriptdir}/audit.py[co]
6d3a6f20 234%{py_sitescriptdir}/auparse.py[co]
57f09668 235%endif
This page took 0.073624 seconds and 4 git commands to generate.