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