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