#!/usr/bin/make -f # execute test # * link with freshly built libraries # * execute in virtual X11 environment _TEST = LD_LIBRARY_PATH=$(subst $() $(),:,$(strip \ $(patsubst %,$(CURDIR)/src/libs/%/bin,qmuparser vpropertyexplorer))) \ xvfb-run -a \ $(MAKE) -C src/test$(patsubst %,/%,$1) check QMAKE_CONFIG = noStripDebugSymbols no_ccache release ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) QMAKE_CONFIG += noTest endif # set Qt API # install private shared libraries as such override_dh_auto_configure: QT_SELECT=5 dh_auto_configure -- \ PREFIX_LIB=/usr/lib/valentina \ QMAKE_LFLAGS_RELEASE+=-Wl,-rpath,/usr/lib/valentina \ QMAKE_LFLAGS_DEBUG+=-Wl,-rpath,/usr/lib/valentina \ $(patsubst %,CONFIG+=%,$(QMAKE_CONFIG)) # generate PDF format measurement diagrams execute_after_dh_auto_build: rsvg-convert -f pdf -o debian/measurement-body-points.pdf \ share/measurement-body-points.svg rsvg-convert -f pdf -o debian/measurement-body-diagram.pdf \ share/measurement-body-diagram.svg override_dh_auto_test: ifneq (,$(filter armel armhf mips64el mipsel riscv64,$(DEB_HOST_ARCH))) $(call _TEST,CollectionTest) || true else $(call _TEST,CollectionTest) endif $(call _TEST,ParserTest) ifneq (,$(filter i386 hurd-i386,$(DEB_HOST_ARCH))) $(call _TEST,ValentinaTest) || true else $(call _TEST,ValentinaTest) endif override_dh_auto_test-indep: $(call _TEST,TranslationsTest) # fix rpath to point to private shared libraries # rename puzzle -> valentina-puzzle # rename tape -> valentina-tape # normalize paths embedded in example files execute_after_dh_install-arch: chrpath --replace /usr/lib/valentina \ debian/valentina/usr/bin/valentina \ debian/valentina/usr/bin/puzzle \ debian/valentina/usr/bin/tape mv debian/valentina/usr/bin/puzzle \ debian/valentina/usr/bin/valentina-puzzle mv debian/valentina/usr/bin/tape \ debian/valentina/usr/bin/valentina-tape mv debian/valentina/usr/share/applications/puzzle.desktop \ debian/valentina/usr/share/applications/valentina-puzzle.desktop mv debian/valentina/usr/share/applications/tape.desktop \ debian/valentina/usr/share/applications/valentina-tape.desktop perl -i -pe 's/(?:Exec|Icon)=\Kpuzzle/valentina-puzzle/' \ debian/valentina/usr/share/applications/valentina-puzzle.desktop perl -i -pe 's/(?:Exec|Icon)=\Ktape/valentina-tape/' \ debian/valentina/usr/share/applications/valentina-tape.desktop cp --recursive src/app/share/collection debian/collection find debian/collection -name '*.val' -exec perl -i -p \ -e 's,\K.*/src/app/valentina/bin,/usr/share/valentina,;' \ -e 's,/usr/share/valentina/tables/\Kstandard,multisize,' \ '{}' + execute_after_dh_installman-arch: mv debian/valentina/usr/share/man/man1/puzzle.1 \ debian/valentina/usr/share/man/man1/valentina-puzzle.1 mv debian/valentina/usr/share/man/man1/tape.1 \ debian/valentina/usr/share/man/man1/valentina-tape.1 # install select documentation with all binary packages override_dh_installdocs: dh_installdocs -- AUTHORS.txt README.txt %: dh $@