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