1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
#!/usr/bin/make -f
export MONO_DISABLE_SHM = 1
DH = dh $(1) --parallel --with=autoreconf --with=python2
SONAME=4
VERSION = 0.7.94
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,--as-needed
PYVERS = $(shell pyversions -v -r ./debian/control)
confflags += --without-hal --enable-udev --disable-silent-rules
# targets are appended to $(BASE) to get the build directory
targets_arch = gtk $(foreach i, $(PYVERS), python$(i))
targets_indep = doc
ifneq (,$(findstring -cil,$(shell dh_listpackages)))
targets_arch += mono
DH += --with=cli
endif
BASE = build
# configure stuff
$(BASE)/gtk/config.status:
dh_auto_configure -B$(dir $@) -- \
--with-python=no \
--with-mono=no \
--disable-gtk-doc \
$(confflags)
$(BASE)/mono/config.status:
dh_auto_configure -B$(dir $@) -- \
--with-python=no \
--with-mono=yes \
--disable-gtk-doc \
--enable-gdk-pixbuf \
--prefix=/usr \
--libdir=/usr/lib \
$(confflags) \
MCS=/usr/bin/mono-csc
$(BASE)/python%/config.status:
dh_auto_configure -B$(dir $@) -- \
--with-python=$(notdir $(patsubst %/, %, $(dir $@))) \
--with-mono=no \
--disable-gtk-doc \
--enable-gdk-pixbuf \
$(confflags)
$(BASE)/doc/config.status:
dh_auto_configure -B$(dir $@) -- \
--with-python=no \
--with-mono=no \
--enable-gtk-doc \
$(confflags)
# build stuff
$(BASE)/%/build-stamp: $(BASE)/%/config.status
dh_auto_build -B$(dir $@)
touch $@
# install stuff
$(BASE)/gtk/install-stamp: $(BASE)/gtk/build-stamp
dh_auto_install -B$(dir $@)
install \
build/gtk/tools/ipod-time-sync \
debian/tmp/usr/bin/ipod-time-sync
touch $@
$(BASE)/mono/install-stamp: $(BASE)/mono/build-stamp
dh_auto_install -B$(dir $@)/bindings/mono
touch $@
$(BASE)/python%/install-stamp: $(BASE)/python%/build-stamp \
$(BASE)/gtk/build-stamp
dh_auto_install -B$(dir $@)/bindings/python
touch $@
$(BASE)/doc/install-stamp: $(BASE)/doc/build-stamp
dh_auto_install -B$(dir $@)/docs
touch $@
# hook in the configure, build, install and clean stages
override_dh_auto_configure-arch: $(foreach i, $(targets_arch), $(BASE)/$(i)/config.status)
override_dh_auto_configure-indep: $(foreach i, $(targets_indep), $(BASE)/$(i)/config.status)
override_dh_auto_build-arch: $(foreach i, $(targets_arch), $(BASE)/$(i)/build-stamp)
override_dh_auto_build-indep: $(foreach i, $(targets_indep), $(BASE)/$(i)/build-stamp)
override_dh_auto_install-arch: $(foreach i, $(targets_arch), $(BASE)/$(i)/install-stamp)
$(foreach i, \
$(wildcard debian/tmp*/usr/bin/*) \
$(wildcard debian/tmp/usr/lib/*/udev/*-info) \
$(wildcard debian/tmp/usr/lib/*/libgpod.so.$(SONAME)) \
$(wildcard debian/tmp/usr/lib/*/python*/*-packages/gpod/_gpod.so), \
chrpath -d $(i);)
find debian/tmp* -name '*.la' -delete
override_dh_auto_install-indep: $(foreach i, $(targets_indep), $(BASE)/$(i)/install-stamp)
override_dh_install:
dh_install
# Needed for syncing with ubuntu: launchpad needs .pot files
cd po; intltool-update --pot
# don't install things to /usr/share/doc/libgpod-dev, as they're
# symlinked
override_dh_installdocs override_dh_installchangelogs:
$(subst override_,,$@) -Nlibgpod-dev
# cleaning rules
clean:
$(call DH, $@)
rm -rf debian/tmp-*
override_dh_auto_clean:
rm -rf build/
override_dh_makeshlibs:
dpkg-gensymbols -c4 -Pdebian/libgpod$(SONAME) -plibgpod$(SONAME)
dh_makeshlibs -plibgpod$(SONAME) \
-V 'libgpod$(SONAME) (>= $(VERSION))'
override_dh_python2:
dh_python2 --depends=mutagen
%:
$(call DH, $@)
.PHONY: clean
|