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