]> git.pld-linux.org Git - packages/ulogd.git/blob - ulogd.spec
- run autoconf
[packages/ulogd.git] / ulogd.spec
1 Summary:        ULOGD - the Userspace Logging Daemon for iptables
2 Summary(pl):    Demon loguj±cy w trybie u¿ytkownika dla iptables
3 Name:           ulogd
4 Version:        0.95
5 Release:        2
6 License:        GPL
7 Group:          Networking/Daemons
8 Source0:        ftp://ftp.sunbeam.franken.de/pub/netfilter/%{name}-%{version}.tar.gz
9 Source1:        %{name}.init
10 Source2:        %{name}.sysconfig
11 Source3:        %{name}.logrotate
12 Source4:        %{name}.conf
13 Patch0:         %{name}-DESTDIR.patch
14 BuildRequires:  autoconf
15 BuildRequires:  mysql-devel
16 BuildRequires:  sgml-tools
17 BuildRequires:  sgmls
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 - register a target called ULOG with netfilter
29 - if the target is hit:
30   - send the packet out using netlink multicast facility
31   - return NF_ACCEPT immediately.
32
33 %description -l pl
34 Ten pakiet ma s³u¿yæ do wysy³ania pakietów z j±dra do przestrzeni
35 u¿ytkownika w celu logowania. Powinien dzia³aæ tak:
36 - zarejestrowaæ w netfilterze cel o nazwie ULOG
37 - je¿eli cel zosta³ osi±gniêty:
38   - wys³aæ pakiet poprzez netlink
39   - zwróciæ natychmiast NF_ACCEPT.
40
41 %package mysql
42 Summary:        MySQL plugin for ulogd
43 Summary(pl):    Wtyczka MySQL dla ulogd
44 Group:          Networking/Daemons
45 Requires:       mysql
46 Obsoletes:      iptables-ulogd-mysql
47
48 %description mysql
49 MySQL plugin for ulogd.
50
51 %description mysql -l pl
52 Wtyczka MySQL dla ulogd.
53
54 %prep
55 %setup -q
56 %patch0 -p1
57
58 %build
59 autoconf
60 %configure \
61         --with-mysql
62 %{__make}
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/{sysconfig,logrotate.d,rc.d/init.d}} \
67         $RPM_BUILD_ROOT/var/log
68
69 %{__make} install DESTDIR=$RPM_BUILD_ROOT
70
71 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ulogd
72 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ulogd
73 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/ulogd
74 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
75
76 gzip -9nf Changes doc/*.{ps,txt,table}
77
78 touch $RPM_BUILD_ROOT/var/log/ulogd{,.pktlog}
79
80 %clean
81 rm -rf $RPM_BUILD_ROOT
82
83 %post
84 if [ ! -f /var/log/ulogd ]; then
85         touch /var/log/ulogd{,.pktlog}
86         chmod 640 /var/log/ulogd{,.pktlog}
87 fi
88
89 /sbin/chkconfig --add ulogd
90 if [ -f /var/lock/subsys/ulogd ]; then
91         /etc/rc.d/init.d/ulogd restart 1>&2
92 else
93         echo "Run \"/etc/rc.d/init.d/ulogd start\" to start ulogd daemon." 1>&2
94 fi
95
96 %preun
97 if [ "$1" = "0" ]; then
98         if [ -f /var/lock/subsys/ulogd ]; then
99                 /etc/rc.d/init.d/ulogd stop 1>&2
100         fi
101         /sbin/chkconfig --del ulogd
102 fi
103
104 %files
105 %defattr(644,root,root,755)
106 %doc Changes.gz doc/*.{ps,txt}.gz
107 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/ulogd
108 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) %{_sysconfdir}/ulogd.conf
109 %attr(640,root,root) /etc/logrotate.d/ulogd
110 %attr(754,root,root) /etc/rc.d/init.d/ulogd
111
112 %attr(755,root,root) %{_sbindir}/*
113 %attr(755,root,root) %{_libdir}/ulogd/ulogd_[BLOP]*.so
114
115 %attr(640,root,root) %ghost /var/log/*
116
117 %files mysql
118 %defattr(644,root,root,755)
119 %doc doc/mysql*
120 %attr(755,root,root) %{_libdir}/ulogd/ulogd_MYSQL.so
This page took 0.067843 seconds and 3 git commands to generate.