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