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.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.94
  10. PKG_RELEASE:=2
  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_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:=+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-external-natpmp \
  105. --enable-largefile \
  106. --enable-lightweight
  107. ifeq ($(BUILD_VARIANT),openssl)
  108. CONFIGURE_ARGS += \
  109. --with-crypto=openssl
  110. endif
  111. ifeq ($(BUILD_VARIANT),mbedtls)
  112. CONFIGURE_ARGS += \
  113. --with-crypto=polarssl
  114. CONFIGURE_VARS += \
  115. MBEDTLS_CFLAGS="-I$(STAGING_DIR)/usr/include/mbedtls" \
  116. MBEDTLS_LIBS="-lmbedtls -lmbedcrypto"
  117. endif
  118. define Package/transmission-daemon-openssl/install
  119. $(INSTALL_DIR) $(1)/usr/bin
  120. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
  121. $(INSTALL_DIR) $(1)/etc/init.d/
  122. $(INSTALL_BIN) files/transmission.init $(1)/etc/init.d/transmission
  123. $(INSTALL_DIR) $(1)/etc/config
  124. $(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission
  125. $(INSTALL_DIR) $(1)/etc/sysctl.d/
  126. $(INSTALL_CONF) files/transmission.sysctl $(1)/etc/sysctl.d/20-transmission.conf
  127. endef
  128. Package/transmission-daemon-mbedtls/install = $(Package/transmission-daemon-openssl/install)
  129. define Package/transmission-cli-openssl/install
  130. $(INSTALL_DIR) $(1)/usr/bin
  131. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-cli \
  132. $(PKG_INSTALL_DIR)/usr/bin/transmission-create \
  133. $(PKG_INSTALL_DIR)/usr/bin/transmission-edit \
  134. $(PKG_INSTALL_DIR)/usr/bin/transmission-show \
  135. $(1)/usr/bin/
  136. endef
  137. Package/transmission-cli-mbedtls/install = $(Package/transmission-cli-openssl/install)
  138. define Package/transmission-remote-openssl/install
  139. $(INSTALL_DIR) $(1)/usr/bin
  140. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/
  141. endef
  142. Package/transmission-remote-mbedtls/install = $(Package/transmission-remote-openssl/install)
  143. define Package/transmission-web/install
  144. $(INSTALL_DIR) $(1)/usr/share/transmission
  145. $(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/
  146. endef
  147. $(eval $(call BuildPackage,transmission-daemon-openssl))
  148. $(eval $(call BuildPackage,transmission-daemon-mbedtls))
  149. $(eval $(call BuildPackage,transmission-cli-openssl))
  150. $(eval $(call BuildPackage,transmission-cli-mbedtls))
  151. $(eval $(call BuildPackage,transmission-remote-openssl))
  152. $(eval $(call BuildPackage,transmission-remote-mbedtls))
  153. $(eval $(call BuildPackage,transmission-web))