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.

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