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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# default is first version
DEFAULTPY=$(shell pyversions -v -d)
PYVERSIONS=$(shell pyversions -v -r)
ALLPY=$(PYVERSIONS:%=%-dbg) $(PYVERSIONS)
CMAKE_PARAMS=-DBUILD_SHARED_LIBS=ON -DINSTALL_GNAPPLET=OFF -DCMAKE_INSTALL_PREFIX=/usr
override_dh_strip:
dh_strip --dbg-package=libgammu-dbg
override_dh_auto_configure-%:
mkdir build-$*
set -e -x; cd build-$* ; cmake .. $(CMAKE_PARAMS) -DBUILD_PYTHON=/usr/bin/python$*
override_dh_auto_configure: $(ALLPY:%=override_dh_auto_configure-%)
override_dh_auto_build-$(DEFAULTPY):
dh_auto_build -- -C build-$(DEFAULTPY)
make -C build-$(DEFAULTPY) pydoc
override_dh_auto_build-%:
dh_auto_build -- -C build-$*
override_dh_auto_build: $(ALLPY:%=override_dh_auto_build-%)
# We do all test just once
override_dh_auto_test-$(DEFAULTPY):
set -e -x; cd build-$(DEFAULTPY) ; ctest -V
override_dh_auto_test-%:
set -e -x; cd build-$* ; ctest -V -R py-
override_dh_auto_test: $(ALLPY:%=override_dh_auto_test-%)
override_dh_auto_install-%:
dh_auto_install -- -C build-$*
override_dh_auto_install: $(ALLPY:%=override_dh_auto_install-%)
override_dh_auto_clean:
rm -rf build-*
build: build-stamp
build-stamp:
dh build
touch $@
clean:
dh $@
install: build install-stamp
install-stamp:
dh install
touch $@
# Build architecture-independent files here.
binary-indep: build install
dh $@
# Build architecture-dependent files here.
binary-arch: build install
dh $@
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|