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