]> git.pld-linux.org Git - packages/ulogd.git/blob - ulogd.spec
- tabs in preamble
[packages/ulogd.git] / ulogd.spec
1 # TODO: (maybe ;)
2 # - pgsql support
3 # - sqlite support
4 Summary:        ULOGD - the Userspace Logging Daemon for iptables
5 Summary(pl.UTF-8):      Demon logujący w trybie użytkownika dla iptables
6 Name:           ulogd
7 Version:        1.24
8 Release:        1
9 License:        GPL
10 Group:          Networking/Daemons
11 Source0:        ftp://ftp.netfilter.org/pub/ulogd/%{name}-%{version}.tar.bz2
12 # Source0-md5:  05b4ed2926b9a22aaeaf642917bbf8ff
13 Source1:        %{name}.init
14 Source2:        %{name}.sysconfig
15 Source3:        %{name}.logrotate
16 Patch0:         %{name}-includes.patch
17 URL:            http://gnumonks.org/projects/ulogd/
18 BuildRequires:  autoconf
19 BuildRequires:  mysql-devel
20 BuildRequires:  rpmbuild(macros) >= 1.268
21 BuildRequires:  sed >= 4.0
22 Requires(post): fileutils
23 Requires(post,preun):   /sbin/chkconfig
24 Requires:       iptables
25 #Requires:      kernel >= 2.4.0test9
26 Requires:       rc-scripts
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 This packages is intended for passing packets from the kernel to
31 userspace to do some logging there. It should work like that:
32 - register a target called ULOG with netfilter
33 - if the target is hit:
34   - send the packet out using netlink multicast facility
35   - return NF_ACCEPT immediately.
36
37 %description -l pl.UTF-8
38 Ten pakiet ma służyć do wysyłania pakietów z jądra do przestrzeni
39 użytkownika w celu logowania. Powinien działać tak:
40 - zarejestrować w netfilterze cel o nazwie ULOG
41 - jeżeli cel został osiągnięty:
42   - wysłać pakiet poprzez netlink
43   - zwrócić natychmiast NF_ACCEPT.
44
45 %package mysql
46 Summary:        MySQL plugin for ulogd
47 Summary(pl.UTF-8):      Wtyczka MySQL dla ulogd
48 Group:          Networking/Daemons
49 Obsoletes:      iptables-ulogd-mysql
50
51 %description mysql
52 MySQL plugin for ulogd.
53
54 %description mysql -l pl.UTF-8
55 Wtyczka MySQL dla ulogd.
56
57 %prep
58 %setup -q
59 %patch0 -p1
60
61 %build
62 %if "%{_lib}" != "lib"
63 sed -e 's@lib/@%{_lib}/@g' -i configure.in
64 sed -e 's@${MYSQLLIBS}@%{_libdir}@g' -i configure.in
65 %endif
66
67 %{__autoconf}
68 %configure \
69         --with-mysql
70 %{__make}
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/{sysconfig,logrotate.d,rc.d/init.d,ulogd}} \
75         $RPM_BUILD_ROOT/var/log
76
77 %{__make} install \
78         DESTDIR=$RPM_BUILD_ROOT
79
80 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ulogd
81 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ulogd
82 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/ulogd
83 install -D %{name}.8 $RPM_BUILD_ROOT%{_mandir}/man8/%{name}.8
84
85 touch $RPM_BUILD_ROOT/var/log/ulogd{,.pktlog}
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %post
91 if [ ! -f /var/log/ulogd ]; then
92         touch /var/log/ulogd{,.pktlog}
93         chmod 640 /var/log/ulogd{,.pktlog}
94 fi
95
96 /sbin/chkconfig --add ulogd
97 %service ulogd restart "ulogd daemon"
98
99 %preun
100 if [ "$1" = "0" ]; then
101         %service ulogd stop
102         /sbin/chkconfig --del ulogd
103 fi
104
105 %files
106 %defattr(644,root,root,755)
107 %doc Changes doc/*.{ps,txt,html}
108 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ulogd
109 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ulogd.conf
110 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/ulogd
111 %attr(750,root,root) %dir %{_sysconfdir}/ulogd
112 %attr(754,root,root) /etc/rc.d/init.d/ulogd
113
114 %attr(755,root,root) %{_sbindir}/*
115 %dir %{_libdir}/ulogd
116 %attr(755,root,root) %{_libdir}/ulogd/ulogd_[BLOPS]*.so
117
118 %attr(640,root,root) %ghost /var/log/*
119 %{_mandir}/man?/%{name}.*
120
121 %files mysql
122 %defattr(644,root,root,755)
123 %doc doc/mysql*
124 %attr(755,root,root) %{_libdir}/ulogd/ulogd_MYSQL.so
This page took 0.048069 seconds and 4 git commands to generate.