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.

101 lines
3.0 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=perl-mail-spamassassin
  3. PKG_RELEASE:=3
  4. PKG_VERSION:=3.4.4
  5. PKG_HASH:=8ea27a165b81e3ce8c84ae85c3ecba1f2edfa04ef4a86f07fe28ab612fc8ff60
  6. PKG_SOURCE_NAME:=Mail-SpamAssassin
  7. PKG_SOURCE_URL:=@APACHE/spamassassin/source
  8. PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz
  9. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
  10. PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
  11. PKG_LICENSE:=Apache-2.0
  12. PKG_LICENSE_FILES:=LICENSE
  13. PKG_CPE_ID:=cpe:/a:apache:spamassassin
  14. PKG_BUILD_DEPENDS:=perl-dbi/host perl-html-parser/host perl-net-dns/host perl-netaddr-ip/host
  15. PKG_INSTALL:=1
  16. PKG_SOURCE_VERSION:=$(PKG_VERSION)
  17. include $(INCLUDE_DIR)/package.mk
  18. include ../perl/perlmod.mk
  19. CONFIGURE_PATH:=spamc
  20. define Package/spamassassin
  21. SECTION:=mail
  22. CATEGORY:=Mail
  23. TITLE:=SpamAssassin
  24. URL:=https://spamassassin.apache.org/
  25. DEPENDS:=perl +perlbase-autoloader +perlbase-config +perlbase-data +perlbase-digest \
  26. +perlbase-encode +perlbase-essential +perlbase-file +perlbase-getopt \
  27. +perlbase-hash +perlbase-mime +perlbase-net +perlbase-socket \
  28. +perl-dbi +perl-html-parser +perl-net-dns +perl-netaddr-ip
  29. VARIANT:=ssl
  30. endef
  31. define Package/spamc/Default
  32. SECTION:=mail
  33. CATEGORY:=Mail
  34. TITLE:=SpamAssassin client binary
  35. URL:=https://spamassassin.apache.org/
  36. DEPENDS:=+zlib
  37. endef
  38. define Package/spamc
  39. $(call Package/spamc/Default)
  40. VARIANT:=nossl
  41. endef
  42. define Package/spamc-ssl
  43. $(call Package/spamc/Default)
  44. TITLE+= (with SSL)
  45. DEPENDS+=+libopenssl
  46. VARIANT:=ssl
  47. endef
  48. ifeq ($(BUILD_VARIANT),ssl)
  49. TARGET_CFLAGS += -DSPAMC_SSL
  50. CONFIGURE_ARGS += --enable-ssl
  51. endif
  52. define Package/spamassassin/conffiles
  53. /etc/mail/spamassassin
  54. endef
  55. define Build/Configure
  56. $(call perlmod/Configure,,)
  57. $(call Build/Configure/Default)
  58. ( cd "$(PKG_BUILD_DIR)/$(CONFIGURE_PATH)" && ./version.h.pl --with-version=$(PKG_SOURCE_VERSION) )
  59. endef
  60. define Build/Compile
  61. $(call perlmod/Compile,,)
  62. $(call Build/Compile/Default,,,spamc)
  63. endef
  64. define Package/spamassassin/install
  65. $(call perlmod/Install,$(1),Mail/SpamAssassin auto/Mail/SpamAssassin)
  66. $(INSTALL_DIR) $(1)/usr/bin
  67. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sa-awl $(1)/usr/bin
  68. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sa-learn $(1)/usr/bin
  69. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sa-compile $(1)/usr/bin
  70. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/spamassassin $(1)/usr/bin
  71. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sa-update $(1)/usr/bin
  72. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/spamd $(1)/usr/bin
  73. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sa-check_spamd $(1)/usr/bin
  74. $(INSTALL_DIR) $(1)/etc/mail/spamassassin
  75. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/mail/spamassassin/* $(1)/etc/mail/spamassassin
  76. endef
  77. define Package/spamc/install
  78. $(INSTALL_DIR) $(1)/usr/bin
  79. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/spamc $(1)/usr/bin
  80. endef
  81. Package/spamc-ssl/install = $(Package/spamc/install)
  82. $(eval $(call BuildPackage,spamassassin))
  83. $(eval $(call BuildPackage,spamc))
  84. $(eval $(call BuildPackage,spamc-ssl))