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
|
#!/usr/bin/make -f
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
LDFLAGS += -Wl,--as-needed
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
configure_flags += \
--prefix=/usr \
--sysconfdir=/etc --host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--enable-dev-tools
%:
dh --with python2 --with autoreconf $@
override_dh_auto_configure:
dh_auto_configure -- $(configure_flags)
override_dh_install:
#Remove .la files.
rm -rf $(CURDIR)/debian/tmp/usr/lib/*.la
rm -rf $(CURDIR)/debian/tmp/usr/lib/python*/*-packages/imobiledevice/*.la
#Remove .a files from python bindings.
rm -rf $(CURDIR)/debian/tmp//usr/lib/python*/dist-packages/imobiledevice/*.a
#Remove installed man pages, installed by *.manpages
rm -f $(CURDIR)/debian/tmp/usr/share/man/man1/*.1
dh_install --fail-missing
override_dh_strip:
dh_strip --dbg-package=libimobiledevice2-dbg
override_dh_python2:
# Only build for the current version of python, not all supported.
dh_python2 --no-guessing-versions
|