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.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:=3
  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. TARGET_CFLAGS += -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 += \
  113. --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 += \
  119. --with-crypto=openssl
  120. endif
  121. define Package/transmission-daemon-openssl/install
  122. $(INSTALL_DIR) $(1)/usr/bin
  123. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
  124. $(INSTALL_DIR) $(1)/etc/init.d/
  125. $(INSTALL_BIN) files/transmission.init $(1)/etc/init.d/transmission
  126. $(INSTALL_DIR) $(1)/etc/config
  127. $(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission
  128. $(INSTALL_DIR) $(1)/etc/sysctl.d/
  129. $(INSTALL_CONF) files/transmission.sysctl $(1)/etc/sysctl.d/20-transmission.conf
  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))