#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 NULL = export DPKG_GENSYMBOLS_CHECK_LEVEL=1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk include /usr/share/dpkg/architecture.mk %: dh $@ --with pkgkde_symbolshelper execute_after_dh_auto_clean: rm -f plugins/*/*.so rm -f qml/*/*.so override_dh_auto_configure: dh_auto_configure -- -DQT_BUILD_TESTS=ON -DQT_BUILD_DOCS=ON execute_after_dh_auto_build-indep: cd obj-$(DEB_HOST_GNU_TYPE) && $(MAKE) docs execute_after_dh_auto_install: ifneq (,$(filter %-doc, $(shell dh_listpackages))) cd obj-$(DEB_HOST_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install_docs endif mkdir -p debian/tmp/usr/share/doc/qtpim6-examples/examples/organizer/ cp -av examples/organizer/qmlorganizerlistview/ debian/tmp/usr/share/doc/qtpim6-examples/examples/organizer/ cp -av examples/contacts/ debian/tmp/usr/share/doc/qtpim6-examples/examples/ # Don't install the skeleton plugin rm -f debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/qt6/plugins/organizer/libqtorganizer_skeleton.so \ debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/qt6Organizer/qt6Organizer_QSkeletonOrganizerPlugin.cmake ifneq (,$(filter %-doc, $(shell dh_listpackages))) mkdir -p debian/tmp/usr/share/doc/qtpim-doc-html/ mv debian/tmp/usr/share/qt6/doc/qtcontacts debian/tmp/usr/share/doc/qtpim-doc-html/ mv debian/tmp/usr/share/qt6/doc/qtorganizer debian/tmp/usr/share/doc/qtpim-doc-html/ mv debian/tmp/usr/share/qt6/doc/qtversit debian/tmp/usr/share/doc/qtpim-doc-html/ ln -s ../../doc/qtpim-doc-html/qtcontacts debian/tmp/usr/share/qt6/doc/qtcontacts ln -s ../../doc/qtpim-doc-html/qtorganizer debian/tmp/usr/share/qt6/doc/qtorganizer ln -s ../../doc/qtpim-doc-html/qtversit debian/tmp/usr/share/qt6/doc/qtversit cd debian/tmp/usr/share/doc/qtpim-doc-html/ && rdfind -makeresultsfile false -makesymlinks true . && cd - 1>/dev/null cd debian/tmp/usr/share/doc/qtpim-doc-html/ && symlinks -v -c -r . && cd - 1>/dev/null endif override_dh_auto_test: # The tests add LFs to the test .vcard and .ical files, which dpkg-source doesn't like. for f in tests/auto/organizer/qmlorganizer/testcases/*.ical tests/auto/contacts/qmlcontacts/testcases/*.vcard; do cp $${f} $${f}.bak; done xvfb-run -a dh_auto_test --no-parallel -- LC_ALL=en_US.UTF-8 QML2_IMPORT_PATH=$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/lib/$(DEB_HOST_GNU_TYPE)/qt6/qml QT_PLUGIN_PATH=$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/lib/$(DEB_HOST_GNU_TYPE)/qt6/plugins LD_LIBRARY_PATH=$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/lib for f in tests/auto/organizer/qmlorganizer/testcases/*.ical tests/auto/contacts/qmlcontacts/testcases/*.vcard; do mv $${f}.bak $${f}; done include /usr/share/dpkg/pkg-info.mk PKD = $(word 1,$(abspath $(dir $(MAKEFILE_LIST)))) PKG = $(DEB_SOURCE) UVER = $(shell echo $(DEB_VERSION) | cut -d "-" -f1) DTYPE = +dfsg VER ?= $(subst $(DTYPE),,$(UVER)) UURL = https://invent.kde.org/qt/qt/qtpim.git UREV = $(shell echo $(VER) | cut -d"." -f3) ## http://wiki.debian.org/onlyjob/get-orig-source .PHONY: get-orig-source get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz $(info I: $(PKG)_$(VER)$(DTYPE)) @ $(PKG)_$(VER)$(DTYPE).orig.tar.xz: $(info I: GIT Revision=$(UREV)) $(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..)) @echo "# Downloading..." git clone $(UURL) $(PKG)-$(VER) \ || $(RM) -r $(PKG)-$(VER) cd $(PKG)-$(VER) \ && git checkout "$(UREV)" \ && ( echo "# Generating ChangeLog..." \ ; git --no-pager log --format="%ai %aN (%h) %n%n%x09*%w(68,0,10) %s%n" > ChangeLog \ ; touch -d "$$(git log -1 --format='%ci')" ChangeLog) \ && echo "# Setting times..." \ && for F in $$(git ls-tree -r --name-only HEAD); do touch --no-dereference -d "$$(git log -1 --format="%ai" -- $$F)" "$$F"; done \ && echo "# Cleaning-up..." \ && rm -Rfv doc/src/ \ && $(RM) -r .git .git* \ $(NULL) @echo "# Packing..." find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \ | XZ_OPT="-6v" tar -caf "../$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \ && $(RM) -r "$(PKG)-$(VER)" \ $(NULL)