]> git.pld-linux.org Git - packages/ulogd.git/blob - ulogd.spec
dbb8561f96121016882a0e69021d6c80d09f55e8
[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.22
5 Release:        1
6 License:        GPL
7 Group:          Networking/Daemons
8 Source0:        ftp://ftp.netfilter.org/pub/ulogd/%{name}-%{version}.tar.bz2
9 # Source0-md5:  2593dfc51c0bc1d8f86519fb13dd5f34
10 Source1:        %{name}.init
11 Source2:        %{name}.sysconfig
12 Source3:        %{name}.logrotate
13 Source4:        %{name}.conf
14 Patch0:         %{name}-includes.patch
15 URL:            http://gnumonks.org/projects/ulogd/
16 BuildRequires:  autoconf
17 BuildRequires:  mysql-devel
18 PreReq:         rc-scripts
19 Requires(post,preun):   /sbin/chkconfig
20 Requires(post): fileutils
21 #Requires:      kernel >= 2.4.0test9
22 Requires:       iptables
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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 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 %patch0 -p1
56
57 %build
58 %if "%{_lib}" != "lib"
59 sed -e 's@lib/@%{_lib}/@g' -i configure.in
60 sed -e 's@${MYSQLLIBS}@%{_libdir}@g' -i configure.in
61 %endif
62
63 %{__autoconf}
64 %configure \
65         --with-mysql
66 %{__make}
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70 install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/{sysconfig,logrotate.d,rc.d/init.d}} \
71         $RPM_BUILD_ROOT/var/log
72
73 %{__make} install \
74         DESTDIR=$RPM_BUILD_ROOT
75
76 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ulogd
77 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ulogd
78 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/ulogd
79 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
80
81 touch $RPM_BUILD_ROOT/var/log/ulogd{,.pktlog}
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %post
87 if [ ! -f /var/log/ulogd ]; then
88         touch /var/log/ulogd{,.pktlog}
89         chmod 640 /var/log/ulogd{,.pktlog}
90 fi
91
92 /sbin/chkconfig --add ulogd
93 if [ -f /var/lock/subsys/ulogd ]; then
94         /etc/rc.d/init.d/ulogd restart 1>&2
95 else
96         echo "Run \"/etc/rc.d/init.d/ulogd start\" to start ulogd daemon." 1>&2
97 fi
98
99 %preun
100 if [ "$1" = "0" ]; then
101         if [ -f /var/lock/subsys/ulogd ]; then
102                 /etc/rc.d/init.d/ulogd stop 1>&2
103         fi
104         /sbin/chkconfig --del ulogd
105 fi
106
107 %files
108 %defattr(644,root,root,755)
109 %doc Changes doc/*.{ps,txt,html}
110 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ulogd
111 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ulogd.conf
112 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/ulogd
113 %attr(754,root,root) /etc/rc.d/init.d/ulogd
114
115 %attr(755,root,root) %{_sbindir}/*
116 %dir %{_libdir}/ulogd
117 %attr(755,root,root) %{_libdir}/ulogd/ulogd_[BLOPS]*.so
118
119 %attr(640,root,root) %ghost /var/log/*
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.024158 seconds and 2 git commands to generate.