4
# Uncomment this to turn on verbose mode.
9
# These are used for cross-compiling and for saving the configure script
10
# from having to guess our platform (since we know it already)
11
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
15
################################################################################
18
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
24
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
29
ifneq (,$(findstring parallel,$(DEB_BUILD_OPTIONS)))
30
TRANSMISSION_MAKEFLAGS += -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
33
# nostrip is handled by dh_strip
35
################################################################################
41
if [ -r /usr/share/misc/config.sub ] && [ ! -f config.sub.backup ]; then \
42
mv -v config.sub config.sub.backup; \
43
cp -f /usr/share/misc/config.sub $(CURDIR)/config.sub; \
46
if [ -r /usr/share/misc/config.guess ] && [ ! -f config.guess.backup ]; then \
47
mv -v config.guess config.guess.backup; \
48
cp -f /usr/share/misc/config.guess $(CURDIR)/config.guess; \
57
if [ -f config.sub.backup ]; then \
58
mv -fv config.sub.backup config.sub; \
61
if [ -f config.guess.backup ]; then \
62
mv -fv config.guess.backup config.guess; \
67
configure: configure-stamp
73
--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
75
--mandir=/usr/share/man \
76
CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs,--as-needed"
79
( cd qt && qmake-qt4 qtr.pro )
83
build: config build-stamp
84
build-stamp: configure
87
$(MAKE) $(TRANSMISSION_MAKEFLAGS)
88
cd po; intltool-update -p --verbose
95
# # touch config.status to prevent execution of autoconf
96
[ ! -f Makefile ] || ( touch config.status && $(MAKE) distclean )
98
clean: config-clean distclean
103
[ ! -f qt/Makefile ] || ( cd qt && $(MAKE) clean )
113
$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
116
( cd qt && INSTALL_ROOT=$(CURDIR)/debian/tmp/usr $(MAKE) install )
118
# # clean RPATH from transmission binary (costela - 2007-10-27)
119
chrpath -d $(CURDIR)/debian/tmp/usr/bin/transmission
120
chrpath -d $(CURDIR)/debian/tmp/usr/bin/transmission-daemon
121
chrpath -d $(CURDIR)/debian/tmp/usr/bin/transmission-remote
122
chrpath -d $(CURDIR)/debian/tmp/usr/bin/transmissioncli
124
UPSTREAM_VERSION=$(shell dpkg-parsechangelog | perl -ne '{ print $$1."\n" if /Version: (.*)-.*/; }')
127
[ ! -f transmission-$(UPSTREAM_VERSION).tar.bz2 ] \
128
&& wget http://download.m0k.org/transmission/files/transmission-$(UPSTREAM_VERSION).tar.bz2
130
# Build architecture-independent files here.
131
binary-indep: build install
4
LDFLAGS=-Wl,--as-needed,--no-undefined,--no-add-needed
7
dh $@ --with autotools-dev --with autoreconf
9
override_dh_auto_configure:
10
dh_auto_configure -- \
11
--enable-libappindicator --enable-notify
12
# qt client has a separate build-system
13
dh_auto_configure -Dqt
15
override_dh_auto_build:
18
(cd qt && lrelease qtr.pro)
20
override_dh_auto_clean:
23
rm -f qt/translations/*.qm
25
override_dh_installchangelogs:
135
26
dh_installchangelogs -p transmission-common NEWS
27
override_dh_installdocs:
136
28
dh_installdocs -p transmission-common
29
override_dh_installexamples:
137
30
dh_installexamples -p transmission-common
138
dh_install -i -X LICENSE # extra copy in web dir - costela 2008-08-15
146
# Build architecture-dependent files here.
147
binary-arch: build install
155
dh_install --list-missing -a
166
binary: binary-indep binary-arch
167
.PHONY: config config-clean configure build clean binary-indep binary-arch binary install
33
dh_install --list-missing -X LICENSE # extra copy in web dir - costela 2008-08-15
35
override_dh_auto_install:
37
dh_auto_install -Dqt -- INSTALL_ROOT=$(CURDIR)/debian/tmp/usr
40
dh_strip --dbg-package=transmission-dbg