source: trunk/make/transmission/transmission.mk @ 13667

Letzte Änderung dieser Datei seit 13667 war 13667, erstellt von er13 vor 21 Monaten

tranmission:

Dateigröße: 4.9 KB
Zeile 
1# Set to y if you want to build transmission from svn.
2# You might need to update the patches yourself.
3# Unsupported, use at your own risk!
4TRANSMISSION_FROM_SVN:=n
5
6ifeq ($(TRANSMISSION_FROM_SVN),y)
7$(call PKG_INIT_BIN, 14714)
8$(PKG)_SOURCE:=$(pkg)-$($(PKG)_VERSION).tar.xz
9$(PKG)_SITE:=svn://svn.transmissionbt.com/Transmission/tags/2.92
10
11$(PKG)_PATCH_POST_CMDS += $(SED) -i -r -e '/^m4_define.+user_agent_prefix/s,[+],,g' -e '/^m4_define.+peer_id_prefix/s,[XZ]-,0-,g' configure.ac;
12$(PKG)_PATCH_POST_CMDS += $(call POLARSSL_HARDCODE_VERSION,13,configure.ac)
13
14$(PKG)_CONFIGURE_PRE_CMDS += AUTOGEN_SUBDIR_MODE=y ./autogen.sh;
15else
16$(call PKG_INIT_BIN, 2.92)
17$(PKG)_SOURCE:=$(pkg)-$($(PKG)_VERSION).tar.xz
18$(PKG)_SOURCE_SHA256:=3a8d045c306ad9acb7bf81126939b9594553a388482efa0ec1bfb67b22acd35f
19$(PKG)_SITE:=http://download.transmissionbt.com/files,https://transmission.cachefly.net
20$(PKG)_PATCH_POST_CMDS += $(call POLARSSL_HARDCODE_VERSION,13,configure)
21endif
22
23$(PKG)_PATCH_POST_CMDS += $(call POLARSSL_HARDCODE_VERSION,13,libtransmission/crypto-utils-polarssl.c cmake/FindPolarSSL.cmake)
24
25$(PKG)_BINARIES_ALL_SHORT     := cli  daemon  remote  create  edit   show
26$(PKG)_BINARIES_BUILD_SUBDIRS := cli/ daemon/ daemon/ utils/  utils/ utils/
27
28$(PKG)_BINARIES_ALL           := $(addprefix transmission-,$($(PKG)_BINARIES_ALL_SHORT))
29$(PKG)_BINARIES               := $(addprefix transmission-,$(if $(FREETZ_PACKAGE_TRANSMISSION_CLIENT),cli,) $(call PKG_SELECTED_SUBOPTIONS,$($(PKG)_BINARIES_ALL_SHORT)))
30$(PKG)_BINARIES_BUILD_DIR     := $(addprefix $($(PKG)_DIR)/, $(join $($(PKG)_BINARIES_BUILD_SUBDIRS),$($(PKG)_BINARIES_ALL)))
31$(PKG)_BINARIES_TARGET_DIR    := $($(PKG)_BINARIES:%=$($(PKG)_DEST_DIR)/usr/bin/%)
32
33$(PKG)_WEBINTERFACE_DIR:=$($(PKG)_DIR)/web
34$(PKG)_TARGET_WEBINTERFACE_DIR:=$($(PKG)_DEST_DIR)/usr/share/transmission-web-home
35$(PKG)_TARGET_WEBINTERFACE_INDEX_HTML:=$($(PKG)_TARGET_WEBINTERFACE_DIR)/index.html
36
37$(PKG)_EXCLUDED += $(patsubst %,$($(PKG)_DEST_DIR)/usr/bin/%,$(filter-out $($(PKG)_BINARIES),$($(PKG)_BINARIES_ALL)))
38ifneq ($(strip $(FREETZ_PACKAGE_TRANSMISSION_WEBINTERFACE)),y)
39$(PKG)_EXCLUDED += $($(PKG)_TARGET_WEBINTERFACE_DIR)
40endif
41
42$(PKG)_DEPENDS_ON += zlib curl libevent
43$(PKG)_DEPENDS_ON += $(if $(FREETZ_PACKAGE_TRANSMISSION_WITH_OPENSSL),openssl)
44$(PKG)_DEPENDS_ON += $(if $(FREETZ_PACKAGE_TRANSMISSION_WITH_POLARSSL),polarssl13)
45
46$(PKG)_REBUILD_SUBOPTS += FREETZ_PACKAGE_TRANSMISSION_WITH_OPENSSL $(if $(FREETZ_PACKAGE_TRANSMISSION_WITH_OPENSSL),FREETZ_OPENSSL_SHLIB_VERSION)
47$(PKG)_REBUILD_SUBOPTS += FREETZ_PACKAGE_TRANSMISSION_WITH_POLARSSL
48$(PKG)_REBUILD_SUBOPTS += FREETZ_TARGET_IPV6_SUPPORT
49$(PKG)_REBUILD_SUBOPTS += FREETZ_PACKAGE_TRANSMISSION_STATIC
50
51$(PKG)_CONFIGURE_PRE_CMDS += $(call PKG_PREVENT_RPATH_HARDCODING,./configure)
52# remove some optimization/debug/warning flags
53$(PKG)_CONFIGURE_PRE_CMDS += $(foreach flag,-O[0-9] -g -ggdb3 -Winline,$(SED) -i -r -e 's,(C(XX)?FLAGS="[^"]*)$(flag)(( [^"]*)?"),\1\3,g' ./configure;)
54
55ifeq ($(strip $(FREETZ_TARGET_UCLIBC_0_9_28)),y)
56$(PKG)_CONFIGURE_PRE_CMDS += $(SED) -i -r -e 's,iconv_open,no_iconv_open_in_0928,' ./configure;
57endif
58
59$(PKG)_CONFIGURE_OPTIONS += --enable-cli
60$(PKG)_CONFIGURE_OPTIONS += --disable-mac
61$(PKG)_CONFIGURE_OPTIONS += --without-gtk
62$(PKG)_CONFIGURE_OPTIONS += --disable-silent-rules
63$(PKG)_CONFIGURE_OPTIONS += --enable-lightweight
64$(PKG)_CONFIGURE_OPTIONS += --enable-utp
65$(PKG)_CONFIGURE_OPTIONS += --with-crypto=$(if $(FREETZ_PACKAGE_TRANSMISSION_WITH_OPENSSL),openssl)$(if $(FREETZ_PACKAGE_TRANSMISSION_WITH_POLARSSL),polarssl)
66
67# add EXTRA_(C|LD)FLAGS
68$(PKG)_CONFIGURE_PRE_CMDS += find $(abspath $($(PKG)_DIR)) -name Makefile.in -type f -exec $(SED) -i -r -e 's,^(C|LD)FLAGS[ \t]*=[ \t]*@\1FLAGS@,& $$$$(EXTRA_\1FLAGS),' \{\} \+;
69$(PKG)_EXTRA_CFLAGS  += -ffunction-sections -fdata-sections
70$(PKG)_EXTRA_LDFLAGS += -Wl,--gc-sections
71
72ifeq ($(strip $(FREETZ_PACKAGE_TRANSMISSION_STATIC)),y)
73$(PKG)_EXTRA_LDFLAGS += -all-static
74endif
75
76$(PKG_SOURCE_DOWNLOAD)
77$(PKG_UNPACKED)
78$(PKG_CONFIGURED_CONFIGURE)
79
80$($(PKG)_BINARIES_BUILD_DIR): $($(PKG)_DIR)/.configured
81    $(SUBMAKE) -C $(TRANSMISSION_DIR) \
82        EXTRA_CFLAGS="$(TRANSMISSION_EXTRA_CFLAGS)" \
83        EXTRA_LDFLAGS="$(TRANSMISSION_EXTRA_LDFLAGS)"
84
85$(foreach binary,$($(PKG)_BINARIES_BUILD_DIR),$(eval $(call INSTALL_BINARY_STRIP_RULE,$(binary),/usr/bin)))
86
87$($(PKG)_TARGET_WEBINTERFACE_INDEX_HTML): $($(PKG)_DIR)/.unpacked
88ifeq ($(strip $(FREETZ_PACKAGE_TRANSMISSION_WEBINTERFACE)),y)
89    mkdir -p $(TRANSMISSION_TARGET_WEBINTERFACE_DIR)
90    $(call COPY_USING_TAR,$(TRANSMISSION_WEBINTERFACE_DIR),$(TRANSMISSION_TARGET_WEBINTERFACE_DIR),--exclude=LICENSE --exclude='Makefile*' .)
91    chmod 644 $@
92    touch $@
93endif
94
95$(pkg):
96
97$(pkg)-precompiled: $($(PKG)_BINARIES_TARGET_DIR) $($(PKG)_TARGET_WEBINTERFACE_INDEX_HTML)
98
99$(pkg)-clean:
100    -$(SUBMAKE) -C $(TRANSMISSION_DIR) clean
101
102$(pkg)-uninstall:
103    $(RM) -r \
104        $(TRANSMISSION_BINARIES_ALL:%=$(TRANSMISSION_DEST_DIR)/usr/bin/%) \
105        $(TRANSMISSION_TARGET_WEBINTERFACE_DIR)
106
107$(PKG_FINISH)
Hinweis: Hilfe zum Repository-Browser finden Sie in TracBrowser.