]> git.pld-linux.org Git - packages/ulogd.git/blob - ulogd.spec
- release 2
[packages/ulogd.git] / ulogd.spec
1 Summary:        ULOGD - the Userspace Logging Daemon for iptables
2 Name:           ulogd
3 Version:        0.95
4 Release:        2
5 License:        GPL
6 Group:          Networking/Daemons
7 Group(de):      Netzwerkwesen/Server
8 Group(pl):      Sieciowe/Serwery
9 Source0:        ftp://ftp.sunbeam.franken.de/pub/netfilter/%{name}-%{version}.tar.gz
10 Source1:        %{name}.init
11 Source2:        %{name}.sysconfig
12 Source3:        %{name}.logrotate
13 Source4:        %{name}.conf
14 Patch0:         %{name}-DESTDIR.patch
15 BuildRequires:  sgml-tools
16 BuildRequires:  sgmls
17 BuildRequires:  mysql-devel
18 #Requires:      kernel >= 2.4.0test9
19 Requires:       iptables
20 Prereq:         /sbin/chkconfig
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %define         _sysconfdir     /etc
24
25 %description
26 This packages is intended for passing packets from the kernel to
27 userspace to do some logging there. It should work like that:
28
29 - Register a target called ULOG with netfilter
30 - if the target is hit:
31  - send the packet out using netlink multicast facility
32  - return NF_ACCEPT immediately
33
34 %package mysql
35 Summary:        Mysql plugin for ulogd
36 Group:          Networking/Daemons
37 Group(de):      Netzwerkwesen/Server
38 Group(pl):      Sieciowe/Serwery
39 Requires:       mysql
40 Obsoletes:      iptables-ulogd-mysql
41
42 %description mysql
43 mysql plugin for ulogd
44
45 %prep
46 %setup -q
47 %patch0 -p1
48
49 %build
50 %configure \
51         --with-mysql
52 %{__make}
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/{sysconfig,logrotate.d,rc.d/init.d}} \
57         $RPM_BUILD_ROOT/var/log
58
59 %{__make} install DESTDIR=$RPM_BUILD_ROOT
60
61 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ulogd
62 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ulogd
63 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/ulogd
64 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/
65
66 gzip -9nf Changes doc/*.{ps,txt,table}
67
68 touch $RPM_BUILD_ROOT/var/log/ulogd{,.pktlog}
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %post
74 if [ ! -f /var/log/ulogd ]; then
75         touch /var/log/ulogd{,.pktlog}
76         chmod 640 /var/log/ulogd{,.pktlog}
77 fi
78
79 /sbin/chkconfig --add ulogd
80 if [ -f /var/lock/subsys/ulogd ]; then
81         /etc/rc.d/init.d/ulogd restart 1>&2
82 else
83         echo "Run \"/etc/rc.d/init.d/ulogd start\" to start ulogd daemon." 1>&2
84 fi
85
86 %preun
87 if [ "$1" = "0" ]; then
88         if [ -f /var/lock/subsys/ulogd ]; then
89                 /etc/rc.d/init.d/ulogd stop 1>&2
90         fi
91         /sbin/chkconfig --del ulogd
92 fi
93
94 %files
95 %defattr(644,root,root,755)
96 %doc Changes.gz doc/*.{ps,txt}.gz
97 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/ulogd
98 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) %{_sysconfdir}/ulogd.conf
99 %attr(640,root,root) /etc/logrotate.d/ulogd
100 %attr(754,root,root) /etc/rc.d/init.d/ulogd
101
102 %attr(755,root,root) %{_sbindir}/*
103 %attr(755,root,root) %{_libdir}/ulogd/ulogd_[BLOP]*.so
104
105 %attr(640,root,root) %ghost /var/log/*
106
107 %files mysql
108 %defattr(644,root,root,755)
109 %doc doc/mysql*
110 %attr(755,root,root) %{_libdir}/ulogd/ulogd_MYSQL.so
This page took 0.030711 seconds and 4 git commands to generate.