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