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.

132 lines
3.4 KiB

  1. #
  2. # Copyright (C) 2011-2012 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.6
  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:=1372aeaf1e33ab1d6b9906ef9b5cd02e
  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. endef
  48. define Package/fwknopd/config
  49. source "$(SOURCE)/Config.in"
  50. endef
  51. define Package/fwknop
  52. $(call Package/fwknop/Default)
  53. SECTION:=net
  54. CATEGORY:=Network
  55. SUBMENU:=Firewall
  56. TITLE+= Client
  57. DEPENDS:=+libfko
  58. endef
  59. define Package/fwknop/description
  60. $(call Package/fwknop/Default/description)
  61. This package contains the fwknop client.
  62. endef
  63. define Package/libfko
  64. $(call Package/fwknop/Default)
  65. SECTION:=libs
  66. CATEGORY:=Libraries
  67. SUBMENU:=Firewall
  68. TITLE+= Library
  69. endef
  70. define Package/libfko/description
  71. $(call Package/fwknop/Default/description)
  72. This package contains the libfko shared library.
  73. endef
  74. ifneq ($(CONFIG_FWKNOPD_GPG),y)
  75. CONFIGURE_ARGS += --without-gpgme
  76. endif
  77. CONFIGURE_ARGS += \
  78. --with-iptables=/usr/sbin/iptables
  79. define Build/InstallDev
  80. $(INSTALL_DIR) $(1)/usr/include
  81. $(CP) $(PKG_INSTALL_DIR)/usr/include/fko.h $(1)/usr/include/
  82. $(INSTALL_DIR) $(1)/usr/lib
  83. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.{a,la,so*} $(1)/usr/lib/
  84. endef
  85. define Package/fwknopd/install
  86. $(INSTALL_DIR) $(1)/etc/config
  87. $(INSTALL_CONF) ./files/fwknopd $(1)/etc/config/fwknopd
  88. $(INSTALL_DIR) $(1)/etc/fwknop
  89. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/fwknop/{access,fwknopd}.conf \
  90. $(1)/etc/fwknop/
  91. $(INSTALL_DIR) $(1)/etc/init.d
  92. $(INSTALL_BIN) ./files/fwknopd.init $(1)/etc/init.d/fwknopd
  93. $(INSTALL_DIR) $(1)/usr/sbin
  94. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fwknopd $(1)/usr/sbin/
  95. endef
  96. define Package/fwknopd/conffiles
  97. /etc/config/fwknopd
  98. endef
  99. define Package/fwknop/install
  100. $(INSTALL_DIR) $(1)/usr/bin
  101. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fwknop $(1)/usr/bin/
  102. endef
  103. define Package/libfko/install
  104. $(INSTALL_DIR) $(1)/usr/lib
  105. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.so.* $(1)/usr/lib/
  106. endef
  107. $(eval $(call BuildPackage,fwknopd))
  108. $(eval $(call BuildPackage,fwknop))
  109. $(eval $(call BuildPackage,libfko))