You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

129 lines
3.4 KiB

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