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.

193 lines
6.0 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:=4
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://github.com/transmission/transmission-releases/raw/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. MAINTAINER:=Rosen Penev <rosenp@gmail.com>
  29. endef
  30. define Package/transmission-daemon/Default
  31. $(call Package/transmission/template)
  32. DEPENDS:=+ca-bundle +libcurl +libevent2 +libminiupnpc +libpthread +librt +zlib
  33. USERID:=transmission=224:transmission=224
  34. endef
  35. define Package/transmission-daemon-openssl
  36. $(call Package/transmission-daemon/Default)
  37. TITLE+= (with OpenSSL)
  38. DEPENDS+=+libopenssl
  39. VARIANT:=openssl
  40. endef
  41. define Package/transmission-daemon-mbedtls
  42. $(call Package/transmission-daemon/Default)
  43. TITLE+= (with mbed TLS)
  44. DEPENDS+=+libmbedtls
  45. VARIANT:=mbedtls
  46. endef
  47. define Package/transmission-cli/Default
  48. $(call Package/transmission/template)
  49. DEPENDS:=+ca-bundle +libcurl +libevent2 +libminiupnpc +libpthread +librt +zlib
  50. endef
  51. define Package/transmission-cli-openssl
  52. $(call Package/transmission-cli/Default)
  53. TITLE+= (with OpenSSL)
  54. DEPENDS+=+libopenssl
  55. VARIANT:=openssl
  56. endef
  57. define Package/transmission-cli-mbedtls
  58. $(call Package/transmission-cli/Default)
  59. TITLE+= (with mbed TLS)
  60. DEPENDS+=+libmbedtls
  61. VARIANT:=mbedtls
  62. endef
  63. define Package/transmission-remote/Default
  64. $(call Package/transmission/template)
  65. DEPENDS:=+ca-bundle +libcurl +libevent2 +libminiupnpc +libpthread +librt +zlib
  66. endef
  67. define Package/transmission-remote-openssl
  68. $(call Package/transmission-remote/Default)
  69. TITLE+= (with OpenSSL)
  70. DEPENDS+=+libopenssl
  71. VARIANT:=openssl
  72. endef
  73. define Package/transmission-remote-mbedtls
  74. $(call Package/transmission-remote/Default)
  75. TITLE+= (with mbed TLS)
  76. DEPENDS+=+libmbedtls
  77. VARIANT:=mbedtls
  78. endef
  79. define Package/transmission-web
  80. $(call Package/transmission/template)
  81. TITLE+= (webinterface)
  82. DEPENDS:=@(PACKAGE_transmission-daemon-openssl||PACKAGE_transmission-daemon-mbedtls)
  83. endef
  84. define Package/transmission-daemon/Default/description
  85. Transmission is a simple BitTorrent client.
  86. It features a very simple, intuitive interface
  87. on top on an efficient, cross-platform back-end.
  88. This package contains the daemon itself.
  89. endef
  90. Package/transmission-daemon-openssl/description = $(Package/transmission-daemon/Default/description)
  91. Package/transmission-daemon-mbedtls/description = $(Package/transmission-daemon/Default/description)
  92. define Package/transmission-cli/Default/description
  93. CLI utilities for transmission.
  94. endef
  95. Package/transmission-cli-openssl/description = $(Package/transmission-cli/Default/description)
  96. Package/transmission-cli-mbedtls/description = $(Package/transmission-cli/Default/description)
  97. define Package/transmission-remote/Default/description
  98. CLI remote interface for transmission.
  99. endef
  100. Package/transmission-remote-openssl/description = $(Package/transmission-remote/Default/description)
  101. Package/transmission-remote-mbedtls/description = $(Package/transmission-remote/Default/description)
  102. define Package/transmission-web/description
  103. Webinterface resources for transmission.
  104. endef
  105. define Package/transmission-daemon-openssl/conffiles
  106. /etc/config/transmission
  107. endef
  108. Package/transmission-daemon-mbedtls/conffiles = $(Package/transmission-daemon-openssl/conffiles)
  109. CONFIGURE_ARGS += \
  110. --enable-daemon \
  111. --enable-cli \
  112. --without-gtk \
  113. --enable-largefile \
  114. --enable-lightweight
  115. ifeq ($(BUILD_VARIANT),openssl)
  116. CONFIGURE_ARGS += \
  117. --with-crypto=openssl
  118. endif
  119. ifeq ($(BUILD_VARIANT),mbedtls)
  120. CONFIGURE_ARGS += \
  121. --with-crypto=polarssl
  122. CONFIGURE_VARS += \
  123. MBEDTLS_CFLAGS="-I$(STAGING_DIR)/usr/include/mbedtls" \
  124. MBEDTLS_LIBS="-lmbedtls -lmbedcrypto"
  125. endif
  126. define Package/transmission-daemon-openssl/install
  127. $(INSTALL_DIR) $(1)/usr/bin
  128. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
  129. $(INSTALL_DIR) $(1)/etc/init.d/
  130. $(INSTALL_BIN) files/transmission.init $(1)/etc/init.d/transmission
  131. $(INSTALL_DIR) $(1)/etc/config
  132. $(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission
  133. $(INSTALL_DIR) $(1)/etc/sysctl.d/
  134. $(INSTALL_CONF) files/transmission.sysctl $(1)/etc/sysctl.d/20-transmission.conf
  135. endef
  136. Package/transmission-daemon-mbedtls/install = $(Package/transmission-daemon-openssl/install)
  137. define Package/transmission-cli-openssl/install
  138. $(INSTALL_DIR) $(1)/usr/bin
  139. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-cli \
  140. $(PKG_INSTALL_DIR)/usr/bin/transmission-create \
  141. $(PKG_INSTALL_DIR)/usr/bin/transmission-edit \
  142. $(PKG_INSTALL_DIR)/usr/bin/transmission-show \
  143. $(1)/usr/bin/
  144. endef
  145. Package/transmission-cli-mbedtls/install = $(Package/transmission-cli-openssl/install)
  146. define Package/transmission-remote-openssl/install
  147. $(INSTALL_DIR) $(1)/usr/bin
  148. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/
  149. endef
  150. Package/transmission-remote-mbedtls/install = $(Package/transmission-remote-openssl/install)
  151. define Package/transmission-web/install
  152. $(INSTALL_DIR) $(1)/usr/share/transmission
  153. $(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/
  154. endef
  155. $(eval $(call BuildPackage,transmission-daemon-openssl))
  156. $(eval $(call BuildPackage,transmission-daemon-mbedtls))
  157. $(eval $(call BuildPackage,transmission-cli-openssl))
  158. $(eval $(call BuildPackage,transmission-cli-mbedtls))
  159. $(eval $(call BuildPackage,transmission-remote-openssl))
  160. $(eval $(call BuildPackage,transmission-remote-mbedtls))
  161. $(eval $(call BuildPackage,transmission-web))