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