recipe 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Build recipe for nftables.
  2. #
  3. # Copyright (c) 2017-2019 Matias Fonzo, <selk@dragora.org>.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. program=nftables
  17. version=0.9.2
  18. release=1
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/networking"
  21. tarname=${program}-${version}.tar.bz2
  22. # Remote source(s)
  23. fetch=http://ftp.netfilter.org/pub/nftables/$tarname
  24. description="
  25. nftables replaces the popular {ip,ip6,arp,eb}tables.
  26. This software provides a new in-kernel packet classification framework
  27. that is based on a network-specific Virtual Machine (VM) and a new nft
  28. userspace command line tool. nftables reuses the existing Netfilter
  29. subsystems such as the existing hook infrastructure, the connection
  30. tracking system, NAT, userspace queueing and logging subsystem.
  31. "
  32. homepage=http://netfilter.org/projects/nftables/
  33. license="GPLv2 only"
  34. # Source documentation
  35. docs=COPYING
  36. docsdir="${docdir}/${program}-${version}"
  37. build()
  38. {
  39. set -e
  40. unpack "${tardir}/$tarname"
  41. cd "$srcdir"
  42. # Set sane permissions
  43. chmod -R u+w,go-w,a+rX-s .
  44. # TODO: --disable-man-doc requires docbook2x/docbook-utils
  45. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  46. $configure_args \
  47. --disable-debug \
  48. --disable-man-doc \
  49. --build="$(cc -dumpmachine)"
  50. make -j${jobs} V=1
  51. make -j${jobs} DESTDIR="$destdir" install
  52. # Copy documentation
  53. mkdir -p "${destdir}${docsdir}"
  54. cp -p $docs "${destdir}${docsdir}"
  55. }