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.

187 lines
5.9 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:=5
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master
  13. PKG_HASH:=9144652fe742f7f7dd6657716e378da60b751aaeda8bef8344b3eefc4db255f2
  14. PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
  15. PKG_LICENSE:=GPL-2.0-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_CPE_ID:=cpe:/a:transmissionbt:transmission
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. PKG_BUILD_PARALLEL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/package-seccomp.mk
  23. include $(INCLUDE_DIR)/nls.mk
  24. define Package/transmission/template
  25. SUBMENU:=BitTorrent
  26. SECTION:=net
  27. CATEGORY:=Network
  28. TITLE:=BitTorrent client
  29. URL:=https://www.transmissionbt.com
  30. DEPENDS:=+libcurl +libevent2 +libminiupnpc +libnatpmp +libpthread +librt +zlib $(ICONV_DEPENDS)
  31. endef
  32. define Package/transmission-daemon/Default
  33. $(call Package/transmission/template)
  34. USERID:=transmission=224:transmission=224
  35. endef
  36. define Package/transmission-daemon-openssl
  37. $(call Package/transmission-daemon/Default)
  38. TITLE+= (with OpenSSL)
  39. DEPENDS+=+libopenssl
  40. VARIANT:=openssl
  41. endef
  42. define Package/transmission-daemon-mbedtls
  43. $(call Package/transmission-daemon/Default)
  44. TITLE+= (with mbed TLS)
  45. DEPENDS+=+libmbedtls
  46. VARIANT:=mbedtls
  47. endef
  48. define Package/transmission-cli-openssl
  49. $(call Package/transmission/template)
  50. TITLE+= (with OpenSSL)
  51. DEPENDS+=+libopenssl
  52. VARIANT:=openssl
  53. endef
  54. define Package/transmission-cli-mbedtls
  55. $(call Package/transmission/template)
  56. TITLE+= (with mbed TLS)
  57. DEPENDS+=+libmbedtls
  58. VARIANT:=mbedtls
  59. endef
  60. define Package/transmission-remote-openssl
  61. $(call Package/transmission/template)
  62. TITLE+= (with OpenSSL)
  63. DEPENDS+=+libopenssl
  64. VARIANT:=openssl
  65. endef
  66. define Package/transmission-remote-mbedtls
  67. $(call Package/transmission/template)
  68. TITLE+= (with mbed TLS)
  69. DEPENDS+=+libmbedtls
  70. VARIANT:=mbedtls
  71. endef
  72. define Package/transmission-web
  73. $(call Package/transmission/template)
  74. TITLE+= (webinterface)
  75. DEPENDS:=@(PACKAGE_transmission-daemon-openssl||PACKAGE_transmission-daemon-mbedtls)
  76. PKGARCH:=all
  77. endef
  78. define Package/transmission-daemon/Default/description
  79. Transmission is a simple BitTorrent client.
  80. It features a very simple, intuitive interface
  81. on top on an efficient, cross-platform back-end.
  82. This package contains the daemon itself.
  83. endef
  84. Package/transmission-daemon-openssl/description = $(Package/transmission-daemon/Default/description)
  85. Package/transmission-daemon-mbedtls/description = $(Package/transmission-daemon/Default/description)
  86. define Package/transmission-cli/Default/description
  87. CLI utilities for transmission.
  88. endef
  89. Package/transmission-cli-openssl/description = $(Package/transmission-cli/Default/description)
  90. Package/transmission-cli-mbedtls/description = $(Package/transmission-cli/Default/description)
  91. define Package/transmission-remote/Default/description
  92. CLI remote interface for transmission.
  93. endef
  94. Package/transmission-remote-openssl/description = $(Package/transmission-remote/Default/description)
  95. Package/transmission-remote-mbedtls/description = $(Package/transmission-remote/Default/description)
  96. define Package/transmission-web/description
  97. Webinterface resources for transmission.
  98. endef
  99. define Package/transmission-daemon-openssl/conffiles
  100. /etc/config/transmission
  101. endef
  102. Package/transmission-daemon-mbedtls/conffiles = $(Package/transmission-daemon-openssl/conffiles)
  103. TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
  104. TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed -liconv
  105. CONFIGURE_ARGS += \
  106. --enable-cli \
  107. --enable-daemon \
  108. --enable-external-natpmp \
  109. --enable-largefile \
  110. --enable-lightweight \
  111. --without-gtk \
  112. --without-kqueue \
  113. --without-systemd-daemon
  114. ifeq ($(BUILD_VARIANT),mbedtls)
  115. CONFIGURE_ARGS += --with-crypto=polarssl
  116. CONFIGURE_VARS += \
  117. MBEDTLS_CFLAGS="-I$(STAGING_DIR)/usr/include/mbedtls" \
  118. MBEDTLS_LIBS="-lmbedtls -lmbedcrypto"
  119. else
  120. CONFIGURE_ARGS += --with-crypto=openssl
  121. endif
  122. define Package/transmission-daemon-openssl/install
  123. $(INSTALL_DIR) $(1)/usr/bin
  124. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
  125. $(INSTALL_DIR) $(1)/etc/init.d/
  126. $(INSTALL_BIN) files/transmission.init $(1)/etc/init.d/transmission
  127. $(INSTALL_DIR) $(1)/etc/config
  128. $(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission
  129. $(INSTALL_DIR) $(1)/etc/sysctl.d/
  130. $(INSTALL_CONF) files/transmission.sysctl $(1)/etc/sysctl.d/20-transmission.conf
  131. $(call InstallSeccomp,$(1),./files/transmission-daemon.json)
  132. endef
  133. Package/transmission-daemon-mbedtls/install = $(Package/transmission-daemon-openssl/install)
  134. define Package/transmission-cli-openssl/install
  135. $(INSTALL_DIR) $(1)/usr/bin
  136. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-cli \
  137. $(PKG_INSTALL_DIR)/usr/bin/transmission-create \
  138. $(PKG_INSTALL_DIR)/usr/bin/transmission-edit \
  139. $(PKG_INSTALL_DIR)/usr/bin/transmission-show \
  140. $(1)/usr/bin/
  141. endef
  142. Package/transmission-cli-mbedtls/install = $(Package/transmission-cli-openssl/install)
  143. define Package/transmission-remote-openssl/install
  144. $(INSTALL_DIR) $(1)/usr/bin
  145. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/
  146. endef
  147. Package/transmission-remote-mbedtls/install = $(Package/transmission-remote-openssl/install)
  148. define Package/transmission-web/install
  149. $(INSTALL_DIR) $(1)/usr/share/transmission
  150. $(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/
  151. endef
  152. $(eval $(call BuildPackage,transmission-daemon-openssl))
  153. $(eval $(call BuildPackage,transmission-daemon-mbedtls))
  154. $(eval $(call BuildPackage,transmission-cli-openssl))
  155. $(eval $(call BuildPackage,transmission-cli-mbedtls))
  156. $(eval $(call BuildPackage,transmission-remote-openssl))
  157. $(eval $(call BuildPackage,transmission-remote-mbedtls))
  158. $(eval $(call BuildPackage,transmission-web))