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