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
5.8 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
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://github.com/transmission/transmission-releases/raw/master
  13. PKG_MD5SUM:=3fce404a436e3cd7fde80fb6ed61c264
  14. PKG_FIXUP:=autoreconf
  15. PKG_INSTALL:=1
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/transmission/template
  20. SUBMENU:=BitTorrent
  21. SECTION:=net
  22. CATEGORY:=Network
  23. TITLE:=BitTorrent client
  24. URL:=http://www.transmissionbt.com
  25. MAINTAINER:=Cezary Jackiewicz <cezary@eko.one.pl>
  26. endef
  27. define Package/transmission-daemon/Default
  28. $(call Package/transmission/template)
  29. DEPENDS:=+libcurl +libpthread +libevent2 +librt +zlib
  30. USERID:=transmission=224:transmission=224
  31. endef
  32. define Package/transmission-daemon-openssl
  33. $(call Package/transmission-daemon/Default)
  34. TITLE+= (with OpenSSL)
  35. DEPENDS+=+libopenssl
  36. VARIANT:=openssl
  37. endef
  38. define Package/transmission-daemon-polarssl
  39. $(call Package/transmission-daemon/Default)
  40. TITLE+= (with PolarSSL)
  41. DEPENDS+=+libpolarssl
  42. VARIANT:=polarssl
  43. endef
  44. define Package/transmission-cli/Default
  45. $(call Package/transmission/template)
  46. DEPENDS:=+libcurl +libpthread +libevent2 +librt +zlib
  47. endef
  48. define Package/transmission-cli-openssl
  49. $(call Package/transmission-cli/Default)
  50. TITLE+= (with OpenSSL)
  51. DEPENDS+=+libopenssl
  52. VARIANT:=openssl
  53. endef
  54. define Package/transmission-cli-polarssl
  55. $(call Package/transmission-cli/Default)
  56. TITLE+= (with PolarSSL)
  57. DEPENDS+=+libpolarssl
  58. VARIANT:=polarssl
  59. endef
  60. define Package/transmission-remote/Default
  61. $(call Package/transmission/template)
  62. DEPENDS:=+libcurl +libpthread +libevent2 +librt +zlib
  63. endef
  64. define Package/transmission-remote-openssl
  65. $(call Package/transmission-remote/Default)
  66. TITLE+= (with OpenSSL)
  67. DEPENDS+=+libopenssl
  68. VARIANT:=openssl
  69. endef
  70. define Package/transmission-remote-polarssl
  71. $(call Package/transmission-remote/Default)
  72. TITLE+= (with PolarSSL)
  73. DEPENDS+=+libpolarssl
  74. VARIANT:=polarssl
  75. endef
  76. define Package/transmission-web
  77. $(call Package/transmission/template)
  78. TITLE+= (webinterface)
  79. DEPENDS:=@(PACKAGE_transmission-daemon-openssl||PACKAGE_transmission-daemon-polarssl)
  80. endef
  81. define Package/transmission-daemon/Default/description
  82. Transmission is a simple BitTorrent client.
  83. It features a very simple, intuitive interface
  84. on top on an efficient, cross-platform back-end.
  85. This package contains the daemon itself.
  86. endef
  87. Package/transmission-daemon-openssl/description = $(Package/transmission-daemon/Default/description)
  88. Package/transmission-daemon-polarssl/description = $(Package/transmission-daemon/Default/description)
  89. define Package/transmission-cli/Default/description
  90. CLI utilities for transmission.
  91. endef
  92. Package/transmission-cli-openssl/description = $(Package/transmission-cli/Default/description)
  93. Package/transmission-cli-polarssl/description = $(Package/transmission-cli/Default/description)
  94. define Package/transmission-remote/Default/description
  95. CLI remote interface for transmission.
  96. endef
  97. Package/transmission-remote-openssl/description = $(Package/transmission-remote/Default/description)
  98. Package/transmission-remote-polarssl/description = $(Package/transmission-remote/Default/description)
  99. define Package/transmission-web/description
  100. Webinterface resources for transmission.
  101. endef
  102. define Package/transmission-daemon-openssl/conffiles
  103. /etc/config/transmission
  104. endef
  105. Package/transmission-daemon-polarssl/conffiles = $(Package/transmission-daemon-openssl/conffiles)
  106. CONFIGURE_VARS += \
  107. LIBEVENT_LIBS="$(STAGING_DIR)/usr/lib/libevent-2.0.so.5"
  108. CONFIGURE_ARGS += \
  109. --enable-daemon \
  110. --enable-cli \
  111. --without-gtk \
  112. --enable-largefile \
  113. --enable-lightweight
  114. ifeq ($(BUILD_VARIANT),openssl)
  115. CONFIGURE_ARGS += \
  116. --with-crypto=openssl
  117. endif
  118. ifeq ($(BUILD_VARIANT),polarssl)
  119. CONFIGURE_ARGS += \
  120. --with-crypto=polarssl
  121. endif
  122. MAKE_FLAGS += \
  123. CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
  124. TARGET_CFLAGS += -std=gnu99
  125. define Package/transmission-daemon-openssl/install
  126. $(INSTALL_DIR) $(1)/usr/bin
  127. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
  128. $(INSTALL_DIR) $(1)/etc/init.d/
  129. $(INSTALL_BIN) files/transmission.init $(1)/etc/init.d/transmission
  130. $(INSTALL_DIR) $(1)/etc/config
  131. $(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission
  132. endef
  133. Package/transmission-daemon-polarssl/install = $(Package/transmission-daemon-openssl/install)
  134. define Package/transmission-cli-openssl/install
  135. $(INSTALL_DIR) $(1)/usr/bin
  136. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-cli \
  137. $(PKG_INSTALL_DIR)/usr/bin/transmission-create \
  138. $(PKG_INSTALL_DIR)/usr/bin/transmission-edit \
  139. $(PKG_INSTALL_DIR)/usr/bin/transmission-show \
  140. $(1)/usr/bin/
  141. endef
  142. Package/transmission-cli-polarssl/install = $(Package/transmission-cli-openssl/install)
  143. define Package/transmission-remote-openssl/install
  144. $(INSTALL_DIR) $(1)/usr/bin
  145. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/
  146. endef
  147. Package/transmission-remote-polarssl/install = $(Package/transmission-remote-openssl/install)
  148. define Package/transmission-web/install
  149. $(INSTALL_DIR) $(1)/usr/share/transmission
  150. $(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/
  151. endef
  152. $(eval $(call BuildPackage,transmission-daemon-openssl))
  153. $(eval $(call BuildPackage,transmission-daemon-polarssl))
  154. $(eval $(call BuildPackage,transmission-cli-openssl))
  155. $(eval $(call BuildPackage,transmission-cli-polarssl))
  156. $(eval $(call BuildPackage,transmission-remote-openssl))
  157. $(eval $(call BuildPackage,transmission-remote-polarssl))
  158. $(eval $(call BuildPackage,transmission-web))