Browse Source

Merge pull request #2583 from obsy/master

transmission: split packages depending on selected cryptography library
lilik-openwrt-22.03
Hannu Nyman 9 years ago
parent
commit
7600b429a1
1 changed files with 88 additions and 19 deletions
  1. +88
    -19
      net/transmission/Makefile

+ 88
- 19
net/transmission/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=transmission
PKG_VERSION:=2.92
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://download-origin.transmissionbt.com/files/ http://mirrors.m0k.org/transmission/files
@ -19,62 +19,115 @@ PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/transmission/template
SUBMENU:=BitTorrent
SECTION:=net
CATEGORY:=Network
TITLE:=A free, lightweight BitTorrent client
TITLE:=BitTorrent client
URL:=http://www.transmissionbt.com
MAINTAINER:=Cezary Jackiewicz <cezary@eko.one.pl>
endef
define Package/transmission-daemon
define Package/transmission-daemon/Default
$(call Package/transmission/template)
DEPENDS:=+libcurl +libopenssl +libpthread +libevent2 +librt
MENU:=1
DEPENDS:=+libcurl +libpthread +libevent2 +librt
USERID:=transmission=224:transmission=224
PROVIDES:=transmission-daemon
endef
define Package/transmission-daemon-openssl
$(call Package/transmission-daemon/Default)
TITLE+= (with OpenSSL)
DEPENDS+=+libopenssl
VARIANT:=openssl
endef
define Package/transmission-daemon-polarssl
$(call Package/transmission-daemon/Default)
TITLE+= (with PolarSSL)
DEPENDS+=+libpolarssl +zlib
VARIANT:=polarssl
endef
define Package/transmission-cli
define Package/transmission-cli/Default
$(call Package/transmission/template)
DEPENDS:=transmission-daemon
DEPENDS:=+libcurl +libpthread +libevent2 +librt
endef
define Package/transmission-cli-openssl
$(call Package/transmission-cli/Default)
TITLE+= (with OpenSSL)
DEPENDS+=+libopenssl
VARIANT:=openssl
endef
define Package/transmission-remote
define Package/transmission-cli-polarssl
$(call Package/transmission-cli/Default)
TITLE+= (with PolarSSL)
DEPENDS+=+libpolarssl +zlib
VARIANT:=polarssl
endef
define Package/transmission-remote/Default
$(call Package/transmission/template)
DEPENDS:=+libcurl +libopenssl +libpthread +libevent2 +librt
DEPENDS:=+libcurl +libpthread +libevent2 +librt
endef
define Package/transmission-remote-openssl
$(call Package/transmission-remote/Default)
TITLE+= (with OpenSSL)
DEPENDS+=+libopenssl
VARIANT:=openssl
endef
define Package/transmission-remote-polarssl
$(call Package/transmission-remote/Default)
TITLE+= (with PolarSSL)
DEPENDS+=+libpolarssl +zlib
VARIANT:=polarssl
endef
define Package/transmission-web
$(call Package/transmission/template)
TITLE+= (webinterface)
DEPENDS:=transmission-daemon
endef
define Package/transmission-daemon/description
define Package/transmission-daemon/Default/description
Transmission is a simple BitTorrent client.
It features a very simple, intuitive interface
on top on an efficient, cross-platform back-end.
This package contains the daemon itself.
endef
Package/transmission-daemon-openssl/description = $(Package/transmission-daemon/Default/description)
Package/transmission-daemon-polarssl/description = $(Package/transmission-daemon/Default/description)
define Package/transmission-cli/description
define Package/transmission-cli/Default/description
CLI utilities for transmission.
endef
Package/transmission-cli-openssl/description = $(Package/transmission-cli/Default/description)
Package/transmission-cli-polarssl/description = $(Package/transmission-cli/Default/description)
define Package/transmission-remote/description
define Package/transmission-remote/Default/description
CLI remote interface for transmission.
endef
Package/transmission-remote-openssl/description = $(Package/transmission-remote/Default/description)
Package/transmission-remote-polarssl/description = $(Package/transmission-remote/Default/description)
define Package/transmission-web/description
Webinterface resources for transmission.
endef
define Package/transmission-daemon/conffiles
define Package/transmission-daemon-openssl/conffiles
/etc/config/transmission
endef
Package/transmission-daemon-polarssl/conffiles = $(Package/transmission-daemon-openssl/conffiles)
CONFIGURE_VARS += \
LIBEVENT_LIBS="$(STAGING_DIR)/usr/lib/libevent-2.0.so.5"
@ -86,12 +139,22 @@ CONFIGURE_ARGS += \
--enable-largefile \
--enable-lightweight
ifeq ($(BUILD_VARIANT),openssl)
CONFIGURE_ARGS += \
--with-crypto=openssl
endif
ifeq ($(BUILD_VARIANT),polarssl)
CONFIGURE_ARGS += \
--with-crypto=polarssl
endif
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
TARGET_CFLAGS += -std=gnu99
define Package/transmission-daemon/install
define Package/transmission-daemon-openssl/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/init.d/
@ -99,8 +162,9 @@ define Package/transmission-daemon/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission
endef
Package/transmission-daemon-polarssl/install = $(Package/transmission-daemon-openssl/install)
define Package/transmission-cli/install
define Package/transmission-cli-openssl/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-cli \
$(PKG_INSTALL_DIR)/usr/bin/transmission-create \
@ -108,18 +172,23 @@ define Package/transmission-cli/install
$(PKG_INSTALL_DIR)/usr/bin/transmission-show \
$(1)/usr/bin/
endef
Package/transmission-cli-polarssl/install = $(Package/transmission-cli-openssl/install)
define Package/transmission-remote/install
define Package/transmission-remote-openssl/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/
endef
Package/transmission-remote-polarssl/install = $(Package/transmission-remote-openssl/install)
define Package/transmission-web/install
$(INSTALL_DIR) $(1)/usr/share/transmission
$(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/
endef
$(eval $(call BuildPackage,transmission-daemon))
$(eval $(call BuildPackage,transmission-cli))
$(eval $(call BuildPackage,transmission-remote))
$(eval $(call BuildPackage,transmission-daemon-openssl))
$(eval $(call BuildPackage,transmission-daemon-polarssl))
$(eval $(call BuildPackage,transmission-cli-openssl))
$(eval $(call BuildPackage,transmission-cli-polarssl))
$(eval $(call BuildPackage,transmission-remote-openssl))
$(eval $(call BuildPackage,transmission-remote-polarssl))
$(eval $(call BuildPackage,transmission-web))

Loading…
Cancel
Save