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.

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