]> git.pld-linux.org Git - packages/audit.git/blame - audit.spec
- updated python files
[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
b89f6d79 9Version: 1.5.3
10Release: 0.1
54697230
JB
11License: GPL
12Group: Daemons
13Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
b89f6d79 14# Source0-md5: e94acafeb5fe8cf581b013ee5f02d95c
de2a21fd
JB
15Source2: %{name}d.init
16Source3: %{name}d.sysconfig
80475ae6 17Patch0: %{name}-install.patch
54697230
JB
18URL: http://people.redhat.com/sgrubb/audit/
19BuildRequires: autoconf >= 2.59
10583781 20BuildRequires: automake >= 1:1.9
e5a8c0d8 21%{?with_pie:BuildRequires: gcc >= 5:3.4}
10583781
JB
22BuildRequires: glibc-headers >= 6:2.3.6
23BuildRequires: libstdc++-devel
54697230 24BuildRequires: libtool
80475ae6 25BuildRequires: linux-libc-headers >= 7:2.6.20
57f09668 26%if %{with python}
84214962 27BuildRequires: python-devel >= 1:2.5
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}
b89f6d79 114sed 's#swig/Makefile ##' -i configure.ac
9d3991e5 115sed 's/swig//' -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)
b89f6d79 184%doc AUTHORS ChangeLog README THANKS TODO sample.rules
80475ae6 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
7630c8d3
JB
191%dir %{_sysconfdir}/audit
192%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/auditd.conf
193%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/audit.rules
80475ae6 194%attr(754,root,root) /etc/rc.d/init.d/auditd
f6ae0a53 195%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/auditd
54697230 196%attr(750,root,root) %dir %{_var}/log/audit
80475ae6 197%{_mandir}/man5/auditd.conf.5*
54697230
JB
198%{_mandir}/man8/*
199
200%files libs
201%defattr(644,root,root,755)
202%attr(755,root,root) /%{_lib}/libaudit.so.*.*.*
8ba70267 203%attr(755,root,root) /%{_lib}/libauparse.so.*.*.*
7630c8d3 204%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libaudit.conf
54697230
JB
205
206%files libs-devel
207%defattr(644,root,root,755)
208%attr(755,root,root) %{_libdir}/libaudit.so
8ba70267 209%attr(755,root,root) %{_libdir}/libauparse.so
54697230 210%{_libdir}/libaudit.la
8ba70267 211%{_libdir}/libauparse.la
6d3a6f20 212%{_includedir}/auparse*.h
54697230
JB
213%{_includedir}/libaudit.h
214%{_mandir}/man3/*
215
216%files libs-static
217%defattr(644,root,root,755)
218%{_libdir}/libaudit.a
8ba70267 219%{_libdir}/libauparse.a
9ee6c1ce 220
57f09668 221%if %{with python}
9ee6c1ce
JB
222%files -n python-audit
223%defattr(644,root,root,755)
224%attr(755,root,root) %{py_sitedir}/_audit.so
84214962
JB
225%attr(755,root,root) %{py_sitedir}/auparse.so
226%{py_sitedir}/auparse-*.egg-info
8e99bb72 227%{py_sitescriptdir}/audit.py[co]
57f09668 228%endif
This page took 0.126598 seconds and 4 git commands to generate.