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