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.

182 lines
5.6 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.93
  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:=8815920e0a4499bcdadbbe89a4115092dab42ce5199f71ff9a926cfd12b9b90b
  14. PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_LICENSE:=GPL-2.0+
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. PKG_BUILD_PARALLEL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/transmission/template
  23. SUBMENU:=BitTorrent
  24. SECTION:=net
  25. CATEGORY:=Network
  26. TITLE:=BitTorrent client
  27. URL:=http://www.transmissionbt.com
  28. DEPENDS:=+ca-bundle +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. 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. CONFIGURE_ARGS += \
  101. --enable-daemon \
  102. --enable-cli \
  103. --without-gtk \
  104. --enable-largefile \
  105. --enable-lightweight
  106. ifeq ($(BUILD_VARIANT),openssl)
  107. CONFIGURE_ARGS += \
  108. --with-crypto=openssl
  109. endif
  110. ifeq ($(BUILD_VARIANT),mbedtls)
  111. CONFIGURE_ARGS += \
  112. --with-crypto=polarssl
  113. CONFIGURE_VARS += \
  114. MBEDTLS_CFLAGS="-I$(STAGING_DIR)/usr/include/mbedtls" \
  115. MBEDTLS_LIBS="-lmbedtls -lmbedcrypto"
  116. endif
  117. define Package/transmission-daemon-openssl/install
  118. $(INSTALL_DIR) $(1)/usr/bin
  119. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
  120. $(INSTALL_DIR) $(1)/etc/init.d/
  121. $(INSTALL_BIN) files/transmission.init $(1)/etc/init.d/transmission
  122. $(INSTALL_DIR) $(1)/etc/config
  123. $(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission
  124. $(INSTALL_DIR) $(1)/etc/sysctl.d/
  125. $(INSTALL_CONF) files/transmission.sysctl $(1)/etc/sysctl.d/20-transmission.conf
  126. endef
  127. Package/transmission-daemon-mbedtls/install = $(Package/transmission-daemon-openssl/install)
  128. define Package/transmission-cli-openssl/install
  129. $(INSTALL_DIR) $(1)/usr/bin
  130. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-cli \
  131. $(PKG_INSTALL_DIR)/usr/bin/transmission-create \
  132. $(PKG_INSTALL_DIR)/usr/bin/transmission-edit \
  133. $(PKG_INSTALL_DIR)/usr/bin/transmission-show \
  134. $(1)/usr/bin/
  135. endef
  136. Package/transmission-cli-mbedtls/install = $(Package/transmission-cli-openssl/install)
  137. define Package/transmission-remote-openssl/install
  138. $(INSTALL_DIR) $(1)/usr/bin
  139. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/
  140. endef
  141. Package/transmission-remote-mbedtls/install = $(Package/transmission-remote-openssl/install)
  142. define Package/transmission-web/install
  143. $(INSTALL_DIR) $(1)/usr/share/transmission
  144. $(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/
  145. endef
  146. $(eval $(call BuildPackage,transmission-daemon-openssl))
  147. $(eval $(call BuildPackage,transmission-daemon-mbedtls))
  148. $(eval $(call BuildPackage,transmission-cli-openssl))
  149. $(eval $(call BuildPackage,transmission-cli-mbedtls))
  150. $(eval $(call BuildPackage,transmission-remote-openssl))
  151. $(eval $(call BuildPackage,transmission-remote-mbedtls))
  152. $(eval $(call BuildPackage,transmission-web))