source: projects/specs/trunk/p/perl-IPTables-libiptc/perl-IPTables-libiptc-vl.spec @ 5883

Revision 5883, 2.5 KB checked in by shaolin, 12 years ago (diff)
  • perl-IPTables-libiptc: new package
Line 
1%define real_name IPTables-libiptc
2
3Summary:        Perl extension for iptables libiptc
4Name:           perl-IPTables-libiptc
5Version:        0.51
6Release:        1%{?_dist_release}
7License:        GPLv2+
8Group:          Development/Libraries
9URL:            http://search.cpan.org/dist/IPTables-libiptc/
10Source:         http://search.cpan.org/CPAN/authors/id/H/HA/HAWK/%{real_name}-%{version}.tar.gz
11BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
12
13BuildRequires:  iptables-devel >= 1.4
14
15BuildRequires:  perl
16BuildRequires:  perl(AutoLoader)
17BuildRequires:  perl(Carp)
18BuildRequires:  perl(ExtUtils::MakeMaker)
19BuildRequires:  perl(Test::More)
20BuildRequires:  perl(File::Basename)
21
22Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
23Requires:       perl(AutoLoader)
24Requires:       perl(Carp)
25Requires:       perl(File::Basename)
26
27Vendor:         Project Vine
28Distribution:   Vine Linux
29
30%description
31This package provides a perl interface to the netfilter/iptables
32C-code and library C<libiptc>.
33
34Advantages of this module: Many rule changes can be done very
35fast. Several rule changes is committed atomically.
36
37This module is heavily inspired by the CPAN module IPTables-IPv4.  The
38CPAN module IPTables-IPv4 could not be used because it has not been
39kept up-to-date, with the newest iptables extensions.  This is a
40result of the module design, as it contains every extension and thus
41needs to port them individually.
42
43This package has another approach, it links with the systems libiptc.a
44library and depend on dynamic loading of iptables extensions available
45on the system.
46
47The module only exports the libiptc chain manipulation functions.  All
48rule manipulations are done through the iptables.c C<do_command>
49function.  As iptables.c is not made as a library, the package
50unfortunately needs to maintain/contain this C file.
51
52%prep
53%setup -q -n %{real_name}-%{version}
54
55%build
56perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" PREFIX='/usr'
57make %{?_smp_mflags}
58
59%install
60rm -rf %{buildroot}
61make pure_install DESTDIR=%{buildroot}
62find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
63find %{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
71rm -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
Note: See TracBrowser for help on using the repository browser.