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