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
|
#!/usr/bin/make -f
# DH_VERBOSE=1
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
CXXFLAGS += -fvisibility=hidden
%:
dh $@ --buildsystem=qmake_qt4
makefiles-to-safety:
# upstream ships Makefiles that get cleaned in `make distclean`;
# protect them to restore the original package.
[ -e Makefile.orig ] || rename 's/Makefile/Makefile.orig/' Makefile src/Makefile example/Makefile
override_dh_auto_configure: makefiles-to-safety
dh_auto_configure
override_dh_auto_install:
# the build.txt file mentions that `make install` should work, but it
# doesn't respect the usual environment parameters.
mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
mkdir -p debian/tmp/usr/include/
cp -a lib/* debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
cp -a include/* debian/tmp/usr/include/
override_dh_auto_clean: makefiles-to-safety
dh_auto_clean
# distclean removes the contents but not the directory
[ ! -e lib ] || rmdir lib
# see rename above
rename -f 's/Makefile\.orig/Makefile/' Makefile.orig src/Makefile.orig example/Makefile.orig
override_dh_installdocs:
dh_installdocs --link-doc=libopencsg1
override_dh_strip:
dh_strip --dbg-package=libopencsg1-dbg
|