]> git.pld-linux.org Git - packages/ebtables.git/blob - ebtables.spec
different source URL
[packages/ebtables.git] / ebtables.spec
1 #
2 # TODO:
3 #       - initscripts stuff - move save/restore dumps to /etc/sysconfig & more
4 #       - review llh patch
5 #
6 %define         _pre    4
7 %define         _rel    1
8 Summary:        Ethernet Bridge Tables
9 Summary(pl.UTF-8):      Ethernet Bridge Tables - filtrowanie i translacja adresów dla Ethernetu
10 Name:           ebtables
11 Version:        2.0.10
12 Release:        %{_pre}.%{_rel}
13 License:        GPL
14 Group:          Networking/Daemons
15 Source0:        http://downloads.sourceforge.net/ebtables/%{name}-v%{version}-%{_pre}.tar.gz
16 # Source0-md5:  506742a3d44b9925955425a659c1a8d0
17 URL:            http://ebtables.sourceforge.net/
18 BuildRequires:  rpmbuild(macros) >= 1.268
19 Requires(post,preun):   /sbin/chkconfig
20 Requires:       rc-scripts
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 The ebtables project is the Linux 2.5.x (and above) Link Layer
25 firewalling subsystem, a patch for 2.4.x is maintained too. It
26 delivers for Linux the functionality of Ethernet frame filtering, all
27 kinds of frame NAT (Network Address Translation) and frame matching.
28 The ebtables infrastructure is a part of the standard Linux 2.5.x (and
29 above) kernels.
30
31 %description -l pl.UTF-8
32 Projekt ebtables to podsystem firewallingu na poziomie łącza dla
33 Linuksa w wersjach 2.5.x i nowszych (dostępna jest też łata do 2.4.x).
34 Dostarcza dla Linuksa funkcjonalność filtrowania ramek ethernetowych,
35 wszystkie rodzaje translacji adresów (NAT) dla ramek oraz
36 dopasowywanie ramek. Infrastruktura ebtables jest częścią
37 standardowych jąder Linuksa w wersjach 2.5.x i nowszych.
38
39 %prep
40 %setup -q -n %{name}-v%{version}-%{_pre}
41
42 %build
43 %{__make} \
44         CFLAGS="%{rpmcflags}" \
45         CC="%{__cc}"
46
47 %install
48 rm -rf $RPM_BUILD_ROOT
49
50 install -d $RPM_BUILD_ROOT{/etc/sysconfig,/etc/rc.d/init.d,%{_sysconfdir},%{_sbindir},%{_libdir},%{_mandir}/man8}
51
52 install ebtables{,-restore}     $RPM_BUILD_ROOT%{_sbindir}
53 install ethertypes              $RPM_BUILD_ROOT%{_sysconfdir}
54 install ebtables.8              $RPM_BUILD_ROOT%{_mandir}/man8
55 install extensions/*.so *.so    $RPM_BUILD_ROOT%{_libdir}
56
57 export __iets=`printf %{_sbindir} | sed 's/\\//\\\\\\//g'`
58 export __iets2=`printf %{_mysysconfdir} | sed 's/\\//\\\\\\//g'`
59 sed -i "s/__EXEC_PATH__/$__iets/g" ebtables-save
60 install ebtables-save           $RPM_BUILD_ROOT%{_sbindir}
61 sed -i "s/__EXEC_PATH__/$__iets/g" ebtables.sysv; sed -i "s/__SYSCONFIG__/$__iets2/g" ebtables.sysv
62 install ebtables.sysv           $RPM_BUILD_ROOT/etc/rc.d/init.d/ebtables
63 sed -i "s/__SYSCONFIG__/$__iets2/g" ebtables-config
64 install ebtables-config         $RPM_BUILD_ROOT/etc/sysconfig
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %post
70 /sbin/chkconfig --add ebtables
71
72 %preun
73 if [ $1 -eq 0 ]; then
74         %service ebtables stop
75         /sbin/chkconfig --del ebtables
76 fi
77
78 %files
79 %defattr(644,root,root,755)
80 %doc ChangeLog INSTALL THANKS
81 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ethertypes
82 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ebtables-config
83 %attr(754,root,root) /etc/rc.d/init.d/ebtables
84 %attr(755,root,root) %{_sbindir}/ebtables*
85 %attr(755,root,root) %{_libdir}/libebt*.so
86 %{_mandir}/man8/ebtables.8*
This page took 0.054497 seconds and 3 git commands to generate.