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.

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