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