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.

204 lines
6.2 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:=4
  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:=35fea28d1a37875ef7480ac061754df617805b19
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
  16. PKG_MIRROR_HASH:=aeeb8dfd918bd2cf4fb6fbdf58bd822e9b509df1ba5ec408888edd161123ef8e
  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:=Cezary Jackiewicz <cezary@eko.one.pl>
  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. endef
  143. Package/transmission-daemon-mbedtls/install = $(Package/transmission-daemon-openssl/install)
  144. define Package/transmission-cli-openssl/install
  145. $(INSTALL_DIR) $(1)/usr/bin
  146. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-cli \
  147. $(PKG_INSTALL_DIR)/usr/bin/transmission-create \
  148. $(PKG_INSTALL_DIR)/usr/bin/transmission-edit \
  149. $(PKG_INSTALL_DIR)/usr/bin/transmission-show \
  150. $(1)/usr/bin/
  151. endef
  152. Package/transmission-cli-mbedtls/install = $(Package/transmission-cli-openssl/install)
  153. define Package/transmission-remote-openssl/install
  154. $(INSTALL_DIR) $(1)/usr/bin
  155. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/
  156. endef
  157. Package/transmission-remote-mbedtls/install = $(Package/transmission-remote-openssl/install)
  158. define Package/transmission-web/install
  159. $(INSTALL_DIR) $(1)/usr/share/transmission
  160. $(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/
  161. endef
  162. $(eval $(call BuildPackage,transmission-daemon-openssl))
  163. $(eval $(call BuildPackage,transmission-daemon-mbedtls))
  164. $(eval $(call BuildPackage,transmission-cli-openssl))
  165. $(eval $(call BuildPackage,transmission-cli-mbedtls))
  166. $(eval $(call BuildPackage,transmission-remote-openssl))
  167. $(eval $(call BuildPackage,transmission-remote-mbedtls))
  168. $(eval $(call BuildPackage,transmission-web))