#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed export CARGO_HOME=$(CURDIR)/debian/cargo_home ALLOW_MULTIPLE=-Wl,--allow-multiple-definition define QMAKE_BUILDFLAGS QMAKE_CPPFLAGS *= $(shell dpkg-buildflags --get CPPFLAGS) QMAKE_CFLAGS *= $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) QMAKE_CXXFLAGS *= $(shell dpkg-buildflags --get CXXFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) QMAKE_LFLAGS *= $(shell dpkg-buildflags --get LDFLAGS) $(if $(findstring arm,$(shell uname -m)),$(ALLOW_MULTIPLE)) endef export QMAKE_BUILDFLAGS # for cargo include /usr/share/dpkg/architecture.mk include /usr/share/dpkg/buildflags.mk include /usr/share/rustc/architecture.mk export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE %: dh $@ override_dh_auto_configure: ./configure --prefix=/usr --qtselect=5 --configdir=/etc --extraconf="$$QMAKE_BUILDFLAGS" --verbose echo "CONFIG += debug" >>conf.pri # Upstream Cargo.lock contains versions not valid for debian rm Cargo.lock # Upstream config.toml references vendored dependencies not part of the debian package -rm .cargo/config.toml cargo update override_dh_auto_install: dh_auto_install -- INSTALL_ROOT="$(CURDIR)/debian/pushpin" mkdir -p debian/pushpin/var/log/pushpin mkdir -p debian/pushpin/usr/share/pushpin mv debian/pushpin/etc/pushpin/pushpin.conf debian/pushpin/usr/share/pushpin/pushpin.conf.condure cp debian/pushpin.conf.md5sum debian/pushpin/usr/share/pushpin/pushpin.conf.mongrel2.md5sum sed 's/services=condure/services=mongrel2,m2adapter/' debian/pushpin/usr/share/pushpin/pushpin.conf.mongrel2 override_dh_installexamples: dh_installexamples -X.o -XMakefile get-orig-source: uscan --verbose --force-download --rename