nftables-vl.spec 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. %bcond_with systemd
  2. Name: nftables
  3. Version: 1.0.9
  4. Release: 1%{?_dist_release}%{?with_systemd:.systemd}
  5. Summary: Netfilter Tables userspace utillites
  6. Group: system
  7. Vendor: Project Vine
  8. Distribution: Vine Linux
  9. License: GPLv2
  10. URL: http://netfilter.org/projects/nftables/
  11. Source0: http://ftp.netfilter.org/pub/nftables/nftables-%{version}.tar.xz
  12. Source1: nftables.init
  13. Source2: nftables.conf
  14. Source3: main.nft
  15. Source4: router.nft
  16. Source5: nat.nft
  17. Source11: nftables.service
  18. #BuildRequires: autogen
  19. #BuildRequires: autoconf
  20. #BuildRequires: automake
  21. #BuildRequires: libtool
  22. BuildRequires: flex
  23. BuildRequires: bison
  24. BuildRequires: libmnl-devel
  25. BuildRequires: gmp-devel
  26. BuildRequires: readline-devel
  27. BuildRequires: libedit-devel
  28. BuildRequires: libnftnl-devel
  29. BuildRequires: asciidoc
  30. BuildRequires: docbook2X
  31. BuildRequires: jansson-devel
  32. BuildRequires: iptables-devel
  33. BuildRequires: python-rpm-macros
  34. %if %{with systemd}
  35. %{?systemd_requires}
  36. %else
  37. Requires(post): chkconfig
  38. Requires(preun): chkconfig
  39. %endif
  40. %description
  41. Netfilter Tables userspace utilities.
  42. %package devel
  43. Summary: Development library for nftables / libnftables
  44. Group: programming
  45. Requires: %{name} = %{version}-%{release}
  46. Requires: pkgconfig
  47. %description devel
  48. Development tools and static libraries and header files for
  49. the libnftables library.
  50. %debug_package
  51. %prep
  52. #setup -q -n nftables-%{snapdate}
  53. %setup -q
  54. %build
  55. #./autogen.sh
  56. %configure \
  57. --disable-silent-rules \
  58. --with-xtables \
  59. --with-json \
  60. --enable-python=no
  61. make %{?_smp_mflags}
  62. %install
  63. %make_install
  64. find %{buildroot} -name '*.la' -exec rm -f {} ';'
  65. chmod 644 %{buildroot}/%{_mandir}/man8/nft*
  66. # Don't ship static lib (for now at least)
  67. rm -f $RPM_BUILD_ROOT/%{_libdir}/libnftables.a
  68. # drop vendor-provided configs, they are not really useful
  69. rm -f $RPM_BUILD_ROOT/%{_datadir}/nftables/*.nft
  70. chmod 644 $RPM_BUILD_ROOT/%{_mandir}/man8/nft*
  71. %if %{with systemd}
  72. mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
  73. cp -a %{SOURCE11} $RPM_BUILD_ROOT/%{_unitdir}/
  74. %else
  75. mkdir -p $RPM_BUILD_ROOT/%{_initdir}
  76. install -m755 %{SOURCE1} $RPM_BUILD_ROOT/%{_initdir}/nftables
  77. %endif
  78. mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
  79. cp -a %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/
  80. chmod 600 $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/nftables.conf
  81. mkdir -m 700 -p $RPM_BUILD_ROOT/%{_sysconfdir}/nftables
  82. cp %{SOURCE3} %{SOURCE4} %{SOURCE5} \
  83. $RPM_BUILD_ROOT/%{_sysconfdir}/nftables/
  84. find $RPM_BUILD_ROOT/%{_sysconfdir} -type f -exec chmod 0600 {} \;
  85. rm -rf %{buildroot}%{python_sitelib}/*
  86. %post
  87. %if %{with systemd}
  88. %systemd_post nftables.service
  89. %else
  90. /sbin/chkconfig --add nftables
  91. %endif
  92. %preun
  93. %if %{with systemd}
  94. %systemd_preun nftables.service
  95. %else
  96. if [ "$1" = 0 ]; then
  97. /sbin/chkconfig --del nftables
  98. fi
  99. %endif
  100. %if %{with systemd}
  101. %postun
  102. %systemd_postun_with_restart nftables.service
  103. %endif
  104. %files
  105. %license COPYING
  106. %doc %{_docdir}/nftables/examples
  107. %config(noreplace) %{_sysconfdir}/nftables/
  108. %config(noreplace) %{_sysconfdir}/sysconfig/nftables.conf
  109. %{_libdir}/*.so.*
  110. %{_sbindir}/nft
  111. %{_mandir}/man5/libnftables-json*
  112. %{_mandir}/man8/nft*
  113. %if %{with systemd}
  114. %{_unitdir}/nftables.service
  115. %else
  116. %{_initdir}/nftables
  117. %endif
  118. %files devel
  119. %{_libdir}/pkgconfig/*.pc
  120. %{_libdir}/*.so
  121. %{_includedir}/*
  122. %{_mandir}/man3/libnftables*
  123. %changelog
  124. * Fri Oct 20 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.9-1
  125. - new upstream release.
  126. * Mon Sep 02 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.9.2-1
  127. - new upstream release.
  128. * Sun Feb 25 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.8.2-1
  129. - new upstream release.
  130. - dropped Patch0: fixed in upstream.
  131. * Sat Sep 5 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.4-4
  132. - added Group tag
  133. * Wed Jul 8 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-3
  134. - initial build for Vine Linux.
  135. * Sat Jan 10 2015 Kevin Fenzi <kevin@scrye.com> 0.4-2
  136. - Add patch to fix nft -f dep gen.
  137. * Fri Dec 26 2014 Kevin Fenzi <kevin@scrye.com> 0.4-1
  138. - Update to 0.4
  139. - Add Epoch to fix versioning.
  140. * Wed Sep 03 2014 Kevin Fenzi <kevin@scrye.com> 0.100-4.20140903git
  141. - Update to 20140903 snapshot
  142. * Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.100-4.20140704git
  143. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
  144. * Fri Jul 04 2014 Kevin Fenzi <kevin@scrye.com> 0.100-3.20140704git
  145. - Update to new snapshot
  146. * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.100-2.20140426git
  147. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  148. * Sat Apr 26 2014 Kevin Fenzi <kevin@scrye.com> 0.100-1.20140426git
  149. - Update t0 20140426
  150. * Sun Mar 30 2014 Kevin Fenzi <kevin@scrye.com> 0.100-1.20140330git
  151. - Update to 20140330 snapshot
  152. - Sync versions to be post 0.100 release.
  153. * Wed Mar 26 2014 Kevin Fenzi <kevin@scrye.com> 0-0.7.20140326git
  154. - Update to 20140326 snapshot
  155. - Fix permissions on man pages.
  156. * Mon Mar 24 2014 Kevin Fenzi <kevin@scrye.com> 0-0.6.20140324git
  157. - Update to 20140324 snapshot
  158. * Fri Mar 07 2014 Kevin Fenzi <kevin@scrye.com> 0-0.5.20140307git
  159. - Update to 20140307
  160. * Sat Jan 25 2014 Kevin Fenzi <kevin@scrye.com> 0-0.4.20140125git
  161. - Update to 20140125 snapshot
  162. * Sat Jan 18 2014 Kevin Fenzi <kevin@scrye.com> 0-0.3.20140118git
  163. - Update to 20140118 snapshot
  164. - Fixed License tag to be correct
  165. - Fixed changelog
  166. - nft scripts now use full path for nft
  167. - Fixed man page building
  168. - Dropped unneeded rm in install
  169. - Patched build to not be silent.
  170. * Tue Dec 03 2013 Kevin Fenzi <kevin@scrye.com> 0-0.2.20131202git
  171. - Use upstream snapshots for source.
  172. - Use 0 for version.
  173. * Sat Nov 30 2013 Kevin Fenzi <kevin@scrye.com> 0-0.1
  174. - initial version for Fedora review