1
0

Makefile 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. #
  2. # Copyright (C) 2011-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=fwknop
  9. PKG_VERSION:=2.6.9
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=http://www.cipherdyne.org/fwknop/download
  13. PKG_MD5SUM:=e2c49e9674888a028bd443a55c3aaa22
  14. PKG_HASH:=5bf47fe1fd30e862d29464f762c0b8bf89b5e298665c37624d6707826da956d4
  15. PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
  16. PKG_LICENSE:=GPLv2
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/fwknop/Default
  20. TITLE:=FireWall KNock OPerator
  21. URL:=http://www.cipherdyne.org/fwknop/
  22. endef
  23. define Package/fwknop/Default/description
  24. Fwknop implements an authorization scheme known as Single Packet Authorization
  25. (SPA) for Linux systems running iptables. This mechanism requires only a
  26. single encrypted and non-replayed packet to communicate various pieces of
  27. information including desired access through an iptables policy. The main
  28. application of this program is to use iptables in a default-drop stance to
  29. protect services such as SSH with an additional layer of security in order to
  30. make the exploitation of vulnerabilities (both 0-day and unpatched code) much
  31. more difficult.
  32. endef
  33. define Package/fwknopd
  34. $(call Package/fwknop/Default)
  35. SECTION:=net
  36. CATEGORY:=Network
  37. SUBMENU:=Firewall
  38. TITLE+= Daemon
  39. DEPENDS:=+iptables +libfko +!FWKNOPD_NFQ_CAPTURE:libpcap +FWKNOPD_NFQ_CAPTURE:iptables-mod-nfqueue +FWKNOP_GPG:gnupg \
  40. +FWKNOPD_NFQ_CAPTURE:libnetfilter-queue +FWKNOPD_NFQ_CAPTURE:libnfnetlink
  41. endef
  42. define Package/fwknopd/description
  43. $(call Package/fwknop/Default/description)
  44. This package contains the fwknop daemon.
  45. endef
  46. define Package/fwknopd/conffiles
  47. /etc/fwknop/access.conf
  48. /etc/fwknop/fwknopd.conf
  49. /etc/config/fwknopd
  50. endef
  51. define Package/fwknopd/config
  52. source "$(SOURCE)/Config.in"
  53. endef
  54. define Package/fwknop
  55. $(call Package/fwknop/Default)
  56. SECTION:=net
  57. CATEGORY:=Network
  58. SUBMENU:=Firewall
  59. TITLE+= Client
  60. DEPENDS:=+libfko
  61. endef
  62. define Package/fwknop/description
  63. $(call Package/fwknop/Default/description)
  64. This package contains the fwknop client.
  65. endef
  66. define Package/libfko
  67. $(call Package/fwknop/Default)
  68. SECTION:=libs
  69. CATEGORY:=Libraries
  70. SUBMENU:=Firewall
  71. TITLE+= Library
  72. endef
  73. define Package/libfko/description
  74. $(call Package/fwknop/Default/description)
  75. This package contains the libfko shared library.
  76. endef
  77. ifneq ($(CONFIG_FWKNOPD_GPG),y)
  78. CONFIGURE_ARGS += --without-gpgme
  79. endif
  80. ifeq ($(CONFIG_FWKNOPD_NFQ_CAPTURE),y)
  81. CONFIGURE_ARGS += --enable-nfq-capture
  82. endif
  83. CONFIGURE_ARGS += \
  84. --with-iptables=/usr/sbin/iptables
  85. define Build/InstallDev
  86. $(INSTALL_DIR) $(1)/usr/include
  87. $(CP) $(PKG_INSTALL_DIR)/usr/include/fko.h $(1)/usr/include/
  88. $(INSTALL_DIR) $(1)/usr/lib
  89. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.{a,la,so*} $(1)/usr/lib/
  90. endef
  91. define Package/fwknopd/install
  92. $(INSTALL_DIR) $(1)/etc/config
  93. $(INSTALL_CONF) ./files/fwknopd $(1)/etc/config/fwknopd
  94. $(INSTALL_DIR) $(1)/etc/fwknop
  95. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/fwknop/{access,fwknopd}.conf \
  96. $(1)/etc/fwknop/
  97. $(INSTALL_DIR) $(1)/etc/init.d
  98. $(INSTALL_BIN) ./files/fwknopd.init $(1)/etc/init.d/fwknopd
  99. $(INSTALL_DIR) $(1)/usr/sbin
  100. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fwknopd $(1)/usr/sbin/
  101. endef
  102. define Package/fwknop/install
  103. $(INSTALL_DIR) $(1)/usr/bin
  104. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fwknop $(1)/usr/bin/
  105. endef
  106. define Package/libfko/install
  107. $(INSTALL_DIR) $(1)/usr/lib
  108. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.so.* $(1)/usr/lib/
  109. endef
  110. $(eval $(call BuildPackage,fwknopd))
  111. $(eval $(call BuildPackage,fwknop))
  112. $(eval $(call BuildPackage,libfko))