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.

142 lines
4.1 KiB

  1. #
  2. # Copyright (C) 2009-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:=transmission
  9. PKG_VERSION:=3.00
  10. PKG_RELEASE:=13
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master
  13. PKG_HASH:=9144652fe742f7f7dd6657716e378da60b751aaeda8bef8344b3eefc4db255f2
  14. PKG_LICENSE:=GPL-2.0-or-later
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_CPE_ID:=cpe:/a:transmissionbt:transmission
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_CONFIG_DEPENDS:= \
  21. CONFIG_LIBCURL_GNUTLS \
  22. CONFIG_LIBCURL_MBEDTLS \
  23. CONFIG_LIBCURL_OPENSSL \
  24. CONFIG_LIBCURL_WOLFSSL \
  25. CONFIG_LIBCURL_NOSSL
  26. include $(INCLUDE_DIR)/package.mk
  27. include $(INCLUDE_DIR)/package-seccomp.mk
  28. include $(INCLUDE_DIR)/nls.mk
  29. define Package/transmission/template
  30. SUBMENU:=BitTorrent
  31. SECTION:=net
  32. CATEGORY:=Network
  33. TITLE:=BitTorrent client
  34. URL:=https://www.transmissionbt.com
  35. DEPENDS:=+libcurl +libevent2 +libminiupnpc +libnatpmp +libpthread +librt +zlib +LIBCURL_NOSSL:libmbedtls +LIBCURL_GNUTLS:libmbedtls +LIBCURL_WOLFSSL:libmbedtls $(ICONV_DEPENDS)
  36. endef
  37. define Package/transmission-daemon
  38. $(call Package/transmission/template)
  39. USERID:=transmission=224:transmission=224
  40. endef
  41. define Package/transmission-cli
  42. $(call Package/transmission/template)
  43. TITLE+= (utilities)
  44. endef
  45. define Package/transmission-remote
  46. $(call Package/transmission/template)
  47. TITLE+= (remote)
  48. endef
  49. define Package/transmission-web
  50. $(call Package/transmission/template)
  51. TITLE+= (webinterface)
  52. DEPENDS:=+transmission-daemon
  53. PKGARCH:=all
  54. endef
  55. define Package/transmission-daemon/description
  56. Transmission is a simple BitTorrent client.
  57. It features a very simple, intuitive interface
  58. on top on an efficient, cross-platform back-end.
  59. This package contains the daemon itself.
  60. endef
  61. define Package/transmission-cli/description
  62. CLI utilities for transmission.
  63. endef
  64. define Package/transmission-remote/description
  65. CLI remote interface for transmission.
  66. endef
  67. define Package/transmission-web/description
  68. Webinterface resources for transmission.
  69. endef
  70. define Package/transmission-daemon/conffiles
  71. /etc/config/transmission
  72. endef
  73. TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
  74. TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed -liconv
  75. CONFIGURE_ARGS += \
  76. --enable-cli \
  77. --enable-daemon \
  78. --enable-external-natpmp \
  79. --enable-largefile \
  80. --enable-lightweight \
  81. --without-gtk \
  82. --without-kqueue \
  83. --without-systemd-daemon \
  84. $(if $(CONFIG_LIBCURL_NOSSL),--with-crypto=polarssl) \
  85. $(if $(CONFIG_LIBCURL_GNUTLS),--with-crypto=polarssl) \
  86. $(if $(CONFIG_LIBCURL_MBEDTLS),--with-crypto=polarssl) \
  87. $(if $(CONFIG_LIBCURL_OPENSSL),--with-crypto=openssl) \
  88. $(if $(CONFIG_LIBCURL_WOLFSSL),--with-crypto=polarssl)
  89. define Package/transmission-daemon/install
  90. $(INSTALL_DIR) $(1)/usr/bin
  91. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
  92. $(INSTALL_DIR) $(1)/etc/init.d/
  93. $(INSTALL_BIN) files/transmission.init $(1)/etc/init.d/transmission
  94. $(INSTALL_DIR) $(1)/etc/config
  95. $(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission
  96. $(INSTALL_DIR) $(1)/etc/sysctl.d/
  97. $(INSTALL_CONF) files/transmission.sysctl $(1)/etc/sysctl.d/20-transmission.conf
  98. $(call InstallSeccomp,$(1),./files/transmission-daemon.json)
  99. endef
  100. define Package/transmission-cli/install
  101. $(INSTALL_DIR) $(1)/usr/bin
  102. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-cli \
  103. $(PKG_INSTALL_DIR)/usr/bin/transmission-create \
  104. $(PKG_INSTALL_DIR)/usr/bin/transmission-edit \
  105. $(PKG_INSTALL_DIR)/usr/bin/transmission-show \
  106. $(1)/usr/bin/
  107. endef
  108. define Package/transmission-remote/install
  109. $(INSTALL_DIR) $(1)/usr/bin
  110. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/
  111. endef
  112. define Package/transmission-web/install
  113. $(INSTALL_DIR) $(1)/usr/share/transmission
  114. $(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/
  115. endef
  116. $(eval $(call BuildPackage,transmission-daemon))
  117. $(eval $(call BuildPackage,transmission-cli))
  118. $(eval $(call BuildPackage,transmission-remote))
  119. $(eval $(call BuildPackage,transmission-web))