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.

95 lines
2.6 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=tac_plus
  3. PKG_VERSION:=4.0.4.28
  4. PKG_REV:=259251e6f1c2d5c98081a43c6f66d9eb2989cfd8
  5. PKG_RELEASE:=2
  6. PKG_SOURCE_VERSION:=$(PKG_REV)
  7. PKG_SOURCE_DATE:=2019.02.11
  8. PKG_SOURCE_URL:=https://codeload.github.com/facebook/tac_plus/tar.gz/$(PKG_SOURCE_VERSION)?
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_DATE)-$(PKG_SOURCE_VERSION).tar.gz
  10. PKG_HASH:=3c37d6a8acf66cac4a95558bf3e29686ef3be505a1638e2ef788a7ece41d1b01
  11. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)
  12. PKG_BUILD_SUBDIR:=tacacs-F$(PKG_VERSION)
  13. include $(INCLUDE_DIR)/package.mk
  14. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  15. MAKE_PATH:=$(PKG_BUILD_SUBDIR)
  16. CONFIGURE_PATH:=$(PKG_BUILD_SUBDIR)
  17. CONFIGURE_ARGS += \
  18. --disable-shared \
  19. --without-libwrap
  20. ifeq ($(BUILD_VARIANT),without-pam)
  21. CONFIGURE_VARS += \
  22. ac_cv_lib_pam_pam_start=no
  23. endif
  24. define Package/tac_plus/Default
  25. SECTION:=net
  26. CATEGORY:=Network
  27. TITLE:=TACACS+ daemon
  28. URL:=https://github.com/facebook/tac_plus/
  29. endef
  30. define Package/tac_plus
  31. $(call Package/tac_plus/Default)
  32. TITLE+= (without PAM support)
  33. VARIANT:=without-pam
  34. endef
  35. define Package/tac_plus-pam
  36. $(call Package/tac_plus/Default)
  37. TITLE+= (with PAM support)
  38. DEPENDS+= +libpam
  39. VARIANT:=with-pam
  40. endef
  41. define Package/tac_plus/Default/description
  42. TACACS+ is a protocol (not TACACS or XTACACS) for authentication,
  43. authorization and accounting (AAA) services for routers and network devices.
  44. endef
  45. define Package/tac_plus/description
  46. $(call Package/tac_plus/Default/description)
  47. This package is built without PAM support.
  48. endef
  49. define Package/tac_plus-pam/description
  50. $(call Package/tac_plus/Default/description)
  51. This package is built with PAM support.
  52. endef
  53. define Package/tac_plus/Default/conffiles
  54. /etc/tac_plus.conf
  55. endef
  56. define Package/tac_plus/conffiles
  57. $(call Package/tac_plus/Default/conffiles)
  58. endef
  59. define Package/tac_plus-pam/conffiles
  60. $(call Package/tac_plus/Default/conffiles)
  61. endef
  62. define Package/tac_plus/install
  63. $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
  64. $(INSTALL_CONF) ./files/tac_plus.conf $(1)/etc/tac_plus.conf
  65. $(INSTALL_BIN) ./files/tac_plus.init $(1)/etc/init.d/tac_plus
  66. $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_BUILD_SUBDIR)/tac_plus $(1)/usr/sbin/
  67. endef
  68. define Package/tac_plus-pam/install
  69. $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
  70. $(INSTALL_CONF) ./files/tac_plus.conf $(1)/etc/tac_plus.conf
  71. $(INSTALL_BIN) ./files/tac_plus.init $(1)/etc/init.d/tac_plus
  72. $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_BUILD_SUBDIR)/tac_plus $(1)/usr/sbin/
  73. endef
  74. $(eval $(call BuildPackage,tac_plus))
  75. $(eval $(call BuildPackage,tac_plus-pam))