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.

143 lines
4.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:=3.00
  10. PKG_RELEASE:=14
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master
  13. PKG_HASH:=9144652fe742f7f7dd6657716e378da60b751aaeda8bef8344b3eefc4db255f2
  14. PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
  15. PKG_LICENSE:=GPL-2.0-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_CPE_ID:=cpe:/a:transmissionbt:transmission
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. PKG_BUILD_PARALLEL:=1
  21. PKG_CONFIG_DEPENDS:= \
  22. CONFIG_LIBCURL_GNUTLS \
  23. CONFIG_LIBCURL_MBEDTLS \
  24. CONFIG_LIBCURL_OPENSSL \
  25. CONFIG_LIBCURL_WOLFSSL \
  26. CONFIG_LIBCURL_NOSSL
  27. include $(INCLUDE_DIR)/package.mk
  28. include $(INCLUDE_DIR)/package-seccomp.mk
  29. include $(INCLUDE_DIR)/nls.mk
  30. define Package/transmission/template
  31. SUBMENU:=BitTorrent
  32. SECTION:=net
  33. CATEGORY:=Network
  34. TITLE:=BitTorrent client
  35. URL:=https://www.transmissionbt.com
  36. DEPENDS:=+libcurl +libevent2 +libminiupnpc +libnatpmp +libpthread +librt +zlib +LIBCURL_NOSSL:libmbedtls +LIBCURL_GNUTLS:libmbedtls +LIBCURL_WOLFSSL:libmbedtls $(ICONV_DEPENDS)
  37. endef
  38. define Package/transmission-daemon
  39. $(call Package/transmission/template)
  40. USERID:=transmission=224:transmission=224
  41. endef
  42. define Package/transmission-cli
  43. $(call Package/transmission/template)
  44. TITLE+= (utilities)
  45. endef
  46. define Package/transmission-remote
  47. $(call Package/transmission/template)
  48. TITLE+= (remote)
  49. endef
  50. define Package/transmission-web
  51. $(call Package/transmission/template)
  52. TITLE+= (webinterface)
  53. DEPENDS:=+transmission-daemon
  54. PKGARCH:=all
  55. endef
  56. define Package/transmission-daemon/description
  57. Transmission is a simple BitTorrent client.
  58. It features a very simple, intuitive interface
  59. on top on an efficient, cross-platform back-end.
  60. This package contains the daemon itself.
  61. endef
  62. define Package/transmission-cli/description
  63. CLI utilities for transmission.
  64. endef
  65. define Package/transmission-remote/description
  66. CLI remote interface for transmission.
  67. endef
  68. define Package/transmission-web/description
  69. Webinterface resources for transmission.
  70. endef
  71. define Package/transmission-daemon/conffiles
  72. /etc/config/transmission
  73. endef
  74. TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
  75. TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed -liconv
  76. CONFIGURE_ARGS += \
  77. --enable-cli \
  78. --enable-daemon \
  79. --enable-external-natpmp \
  80. --enable-largefile \
  81. --enable-lightweight \
  82. --without-gtk \
  83. --without-kqueue \
  84. --without-systemd-daemon \
  85. $(if $(CONFIG_LIBCURL_NOSSL),--with-crypto=polarssl) \
  86. $(if $(CONFIG_LIBCURL_GNUTLS),--with-crypto=polarssl) \
  87. $(if $(CONFIG_LIBCURL_MBEDTLS),--with-crypto=polarssl) \
  88. $(if $(CONFIG_LIBCURL_OPENSSL),--with-crypto=openssl) \
  89. $(if $(CONFIG_LIBCURL_WOLFSSL),--with-crypto=polarssl)
  90. define Package/transmission-daemon/install
  91. $(INSTALL_DIR) $(1)/usr/bin
  92. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
  93. $(INSTALL_DIR) $(1)/etc/init.d/
  94. $(INSTALL_BIN) files/transmission.init $(1)/etc/init.d/transmission
  95. $(INSTALL_DIR) $(1)/etc/config
  96. $(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission
  97. $(INSTALL_DIR) $(1)/etc/sysctl.d/
  98. $(INSTALL_CONF) files/transmission.sysctl $(1)/etc/sysctl.d/20-transmission.conf
  99. $(call InstallSeccomp,$(1),./files/transmission-daemon.json)
  100. endef
  101. define Package/transmission-cli/install
  102. $(INSTALL_DIR) $(1)/usr/bin
  103. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-cli \
  104. $(PKG_INSTALL_DIR)/usr/bin/transmission-create \
  105. $(PKG_INSTALL_DIR)/usr/bin/transmission-edit \
  106. $(PKG_INSTALL_DIR)/usr/bin/transmission-show \
  107. $(1)/usr/bin/
  108. endef
  109. define Package/transmission-remote/install
  110. $(INSTALL_DIR) $(1)/usr/bin
  111. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/
  112. endef
  113. define Package/transmission-web/install
  114. $(INSTALL_DIR) $(1)/usr/share/transmission
  115. $(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/
  116. endef
  117. $(eval $(call BuildPackage,transmission-daemon))
  118. $(eval $(call BuildPackage,transmission-cli))
  119. $(eval $(call BuildPackage,transmission-remote))
  120. $(eval $(call BuildPackage,transmission-web))