]> git.pld-linux.org Git - packages/audit.git/blob - audit.spec
- updated to 1.1.4
[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 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 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
139 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
140 rm -f $RPM_BUILD_ROOT%{py_sitescriptdir}/*.py
141 rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
142
143 %clean
144 rm -rf $RPM_BUILD_ROOT
145
146 %post   libs -p /sbin/ldconfig
147 %postun libs -p /sbin/ldconfig
148
149 %post
150 /sbin/chkconfig --add auditd
151 if [ -f /var/lock/subsys/auditd ]; then
152         /etc/rc.d/init.d/auditd restart >&2
153 else
154         echo "Run \"/etc/rc.d/init.d/auditd start\" to start audit daemon." >&2
155 fi
156
157 %preun
158 if [ "$1" = "0" ]; then
159         if [ -f /var/lock/subsys/auditd ]; then
160                 /etc/rc.d/init.d/auditd stop >&2
161         fi
162         /sbin/chkconfig --del auditd
163 fi
164
165 %files
166 %defattr(644,root,root,755)
167 %doc AUTHORS ChangeLog README THANKS TODO sample.rules
168 %attr(750,root,root) %{_sbindir}/audispd
169 %attr(750,root,root) %{_sbindir}/auditctl
170 %attr(750,root,root) %{_sbindir}/auditd
171 %attr(750,root,root) %{_sbindir}/aureport
172 %attr(750,root,root) %{_sbindir}/ausearch
173 %attr(750,root,root) %{_sbindir}/autrace
174 %attr(754,root,root) /etc/rc.d/init.d/auditd
175 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auditd.conf
176 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit.rules
177 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/auditd
178 %attr(750,root,root) %dir %{_var}/log/audit
179 %{_mandir}/man8/*
180
181 %files libs
182 %defattr(644,root,root,755)
183 %attr(755,root,root) /%{_lib}/libaudit.so.*.*.*
184
185 %files libs-devel
186 %defattr(644,root,root,755)
187 %attr(755,root,root) %{_libdir}/libaudit.so
188 %{_libdir}/libaudit.la
189 %{_includedir}/libaudit.h
190 %{_mandir}/man3/*
191
192 %files libs-static
193 %defattr(644,root,root,755)
194 %{_libdir}/libaudit.a
195
196 %files -n python-audit
197 %defattr(644,root,root,755)
198 %attr(755,root,root) %{py_sitedir}/_audit.so
199 %{py_sitescriptdir}/audit.py[co]
This page took 0.06961 seconds and 3 git commands to generate.