]> git.pld-linux.org Git - packages/audit.git/blob - audit.spec
- updated non-PIE auditd flags
[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.5
9 Release:        1
10 License:        GPL
11 Group:          Daemons
12 Source0:        http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
13 # Source0-md5:  78d71a75ac2677cb77be3dc788119d2c
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
135 # We manually install this since Makefile doesn't
136 install -d $RPM_BUILD_ROOT%{_includedir}
137 install lib/libaudit.h $RPM_BUILD_ROOT%{_includedir}
138
139 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/auditd
140 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/auditd
141
142 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
143 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
144 rm -f $RPM_BUILD_ROOT%{py_sitescriptdir}/*.py
145 rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
146
147 %clean
148 rm -rf $RPM_BUILD_ROOT
149
150 %post   libs -p /sbin/ldconfig
151 %postun libs -p /sbin/ldconfig
152
153 %post
154 /sbin/chkconfig --add auditd
155 %service auditd restart "audit daemon"
156
157 %preun
158 if [ "$1" = "0" ]; then
159         %service auditd stop
160         /sbin/chkconfig --del auditd
161 fi
162
163 %files
164 %defattr(644,root,root,755)
165 %doc AUTHORS ChangeLog README THANKS TODO sample.rules
166 %attr(750,root,root) %{_sbindir}/audispd
167 %attr(750,root,root) %{_sbindir}/auditctl
168 %attr(750,root,root) %{_sbindir}/auditd
169 %attr(750,root,root) %{_sbindir}/aureport
170 %attr(750,root,root) %{_sbindir}/ausearch
171 %attr(750,root,root) %{_sbindir}/autrace
172 %attr(754,root,root) /etc/rc.d/init.d/auditd
173 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auditd.conf
174 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit.rules
175 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/auditd
176 %attr(750,root,root) %dir %{_var}/log/audit
177 %{_mandir}/man8/*
178
179 %files libs
180 %defattr(644,root,root,755)
181 %attr(755,root,root) /%{_lib}/libaudit.so.*.*.*
182
183 %files libs-devel
184 %defattr(644,root,root,755)
185 %attr(755,root,root) %{_libdir}/libaudit.so
186 %{_libdir}/libaudit.la
187 %{_includedir}/libaudit.h
188 %{_mandir}/man3/*
189
190 %files libs-static
191 %defattr(644,root,root,755)
192 %{_libdir}/libaudit.a
193
194 %files -n python-audit
195 %defattr(644,root,root,755)
196 %attr(755,root,root) %{py_sitedir}/_audit.so
197 %{py_sitescriptdir}/audit.py[co]
This page took 0.510752 seconds and 4 git commands to generate.