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.

206 lines
6.3 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.92+git
  10. PKG_RELEASE:=5
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://github.com/transmission/transmission.git
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_SOURCE_VERSION:=5b29fe15561d40c40cbee635446df6b33e18d2c2
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
  16. PKG_MIRROR_HASH:=f99982ae68564da9bf6ad4407285aff2e29508e4fd801ff56f86a8b3dae01819
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  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:=+libcurl +libpthread +libevent2 +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:=+libcurl +libpthread +libevent2 +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:=+libcurl +libpthread +libevent2 +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_VARS += \
  110. LIBEVENT_LIBS="$(STAGING_DIR)/usr/lib/libevent-2.0.so.5"
  111. CONFIGURE_ARGS += \
  112. --enable-daemon \
  113. --enable-cli \
  114. --without-gtk \
  115. --enable-largefile \
  116. --enable-lightweight
  117. ifeq ($(BUILD_VARIANT),openssl)
  118. CONFIGURE_ARGS += \
  119. --with-crypto=openssl
  120. endif
  121. ifeq ($(BUILD_VARIANT),mbedtls)
  122. CONFIGURE_ARGS += \
  123. --with-crypto=polarssl
  124. CONFIGURE_VARS += \
  125. MBEDTLS_CFLAGS="-I$(STAGING_DIR)/usr/include/mbedtls" \
  126. MBEDTLS_LIBS="-lmbedtls -lmbedcrypto"
  127. endif
  128. MAKE_FLAGS += \
  129. CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
  130. TARGET_CFLAGS += -std=gnu99
  131. define Build/Configure
  132. ( cd $(PKG_BUILD_DIR); ./autogen.sh $(CONFIGURE_ARGS))
  133. $(call Build/Configure/Default,$CONFIGURE_ARGS)
  134. endef
  135. define Package/transmission-daemon-openssl/install
  136. $(INSTALL_DIR) $(1)/usr/bin
  137. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
  138. $(INSTALL_DIR) $(1)/etc/init.d/
  139. $(INSTALL_BIN) files/transmission.init $(1)/etc/init.d/transmission
  140. $(INSTALL_DIR) $(1)/etc/config
  141. $(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission
  142. $(INSTALL_DIR) $(1)/etc/sysctl.d/
  143. $(INSTALL_CONF) files/transmission.sysctl $(1)/etc/sysctl.d/20-transmission.conf
  144. endef
  145. Package/transmission-daemon-mbedtls/install = $(Package/transmission-daemon-openssl/install)
  146. define Package/transmission-cli-openssl/install
  147. $(INSTALL_DIR) $(1)/usr/bin
  148. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-cli \
  149. $(PKG_INSTALL_DIR)/usr/bin/transmission-create \
  150. $(PKG_INSTALL_DIR)/usr/bin/transmission-edit \
  151. $(PKG_INSTALL_DIR)/usr/bin/transmission-show \
  152. $(1)/usr/bin/
  153. endef
  154. Package/transmission-cli-mbedtls/install = $(Package/transmission-cli-openssl/install)
  155. define Package/transmission-remote-openssl/install
  156. $(INSTALL_DIR) $(1)/usr/bin
  157. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/
  158. endef
  159. Package/transmission-remote-mbedtls/install = $(Package/transmission-remote-openssl/install)
  160. define Package/transmission-web/install
  161. $(INSTALL_DIR) $(1)/usr/share/transmission
  162. $(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/
  163. endef
  164. $(eval $(call BuildPackage,transmission-daemon-openssl))
  165. $(eval $(call BuildPackage,transmission-daemon-mbedtls))
  166. $(eval $(call BuildPackage,transmission-cli-openssl))
  167. $(eval $(call BuildPackage,transmission-cli-mbedtls))
  168. $(eval $(call BuildPackage,transmission-remote-openssl))
  169. $(eval $(call BuildPackage,transmission-remote-mbedtls))
  170. $(eval $(call BuildPackage,transmission-web))