perl-IPTables-libiptc-vl.spec 2.5 KB

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