1 | %define real_name IPTables-libiptc |
---|
2 | |
---|
3 | Summary: Perl extension for iptables libiptc |
---|
4 | Name: perl-IPTables-libiptc |
---|
5 | Version: 0.51 |
---|
6 | Release: 1%{?_dist_release} |
---|
7 | License: GPLv2+ |
---|
8 | Group: Development/Libraries |
---|
9 | URL: http://search.cpan.org/dist/IPTables-libiptc/ |
---|
10 | Source: http://search.cpan.org/CPAN/authors/id/H/HA/HAWK/%{real_name}-%{version}.tar.gz |
---|
11 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
12 | |
---|
13 | BuildRequires: iptables-devel >= 1.4 |
---|
14 | |
---|
15 | BuildRequires: perl |
---|
16 | BuildRequires: perl(AutoLoader) |
---|
17 | BuildRequires: perl(Carp) |
---|
18 | BuildRequires: perl(ExtUtils::MakeMaker) |
---|
19 | BuildRequires: perl(Test::More) |
---|
20 | BuildRequires: perl(File::Basename) |
---|
21 | |
---|
22 | Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) |
---|
23 | Requires: perl(AutoLoader) |
---|
24 | Requires: perl(Carp) |
---|
25 | Requires: perl(File::Basename) |
---|
26 | |
---|
27 | Vendor: Project Vine |
---|
28 | Distribution: Vine Linux |
---|
29 | |
---|
30 | %description |
---|
31 | This package provides a perl interface to the netfilter/iptables |
---|
32 | C-code and library C<libiptc>. |
---|
33 | |
---|
34 | Advantages of this module: Many rule changes can be done very |
---|
35 | fast. Several rule changes is committed atomically. |
---|
36 | |
---|
37 | This module is heavily inspired by the CPAN module IPTables-IPv4. The |
---|
38 | CPAN module IPTables-IPv4 could not be used because it has not been |
---|
39 | kept up-to-date, with the newest iptables extensions. This is a |
---|
40 | result of the module design, as it contains every extension and thus |
---|
41 | needs to port them individually. |
---|
42 | |
---|
43 | This package has another approach, it links with the systems libiptc.a |
---|
44 | library and depend on dynamic loading of iptables extensions available |
---|
45 | on the system. |
---|
46 | |
---|
47 | The module only exports the libiptc chain manipulation functions. All |
---|
48 | rule manipulations are done through the iptables.c C<do_command> |
---|
49 | function. As iptables.c is not made as a library, the package |
---|
50 | unfortunately needs to maintain/contain this C file. |
---|
51 | |
---|
52 | %prep |
---|
53 | %setup -q -n %{real_name}-%{version} |
---|
54 | |
---|
55 | %build |
---|
56 | perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" PREFIX='/usr' |
---|
57 | make %{?_smp_mflags} |
---|
58 | |
---|
59 | %install |
---|
60 | rm -rf %{buildroot} |
---|
61 | make pure_install DESTDIR=%{buildroot} |
---|
62 | find %{buildroot} -type f -name .packlist -exec rm -f {} ';' |
---|
63 | find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null |
---|
64 | %{_fixperms} %{buildroot} |
---|
65 | |
---|
66 | %check |
---|
67 | # skip the tests because you must be root |
---|
68 | #make test |
---|
69 | |
---|
70 | %clean |
---|
71 | rm -rf %{buildroot} |
---|
72 | |
---|
73 | %files |
---|
74 | %defattr(-, root, root, -) |
---|
75 | %doc Changes META.yml README |
---|
76 | %{perl_vendorarch}/* |
---|
77 | %{_mandir}/man?/* |
---|
78 | |
---|
79 | %changelog |
---|
80 | * Sun Mar 11 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.51-1 |
---|
81 | - initial build for Vine Linux |
---|