File debian.rules of Package ImageViewer

#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export QT_SELECT := 6
export INSTALL_PREFIX  = /usr
export INSTALL_DESTDIR = /debian/imageviewer$(INSTALL_PREFIX)

%:
	dh $@ --buildsystem=qmake6

override_dh_auto_configure:
	find src/ThirdParty/* -maxdepth 1 -mindepth 1 -type d -or -name '*.pro' -exec rm -rfv {} +
	dh_auto_configure -- \
		CONFIG+="release enable_pkgconfig" \
		CONFIG+="system_thirdparty" \
		CONFIG+="disable_libjasper" \
		CONFIG+="disable_libbpg" \
		CONFIG+="disable_flif" \
		INCLUDEPATH+="/usr/include/jxrlib" \
		INCLUDEPATH+="/usr/include/openjpeg-2.5" \
		INCLUDEPATH+="/usr/include/freetype2" \
		INCLUDEPATH+="/usr/include/Imath" \
		-r ImageViewer.pro

override_dh_install:
	install -Dm 0755 $(CURDIR)/src/ImageViewer/ImageViewer $(CURDIR)$(INSTALL_DESTDIR)/bin/ImageViewer
	install -Dm 0644 $(CURDIR)/src/ImageViewer/resources/platform/linux/com.github.aliencoweatcake.imageviewer.desktop $(CURDIR)$(INSTALL_DESTDIR)/share/applications/com.github.aliencoweatcake.imageviewer.desktop
	install -Dm 0644 $(CURDIR)/src/ImageViewer/resources/icon/icon_16.png $(CURDIR)$(INSTALL_DESTDIR)/share/icons/hicolor/16x16/apps/com.github.aliencoweatcake.imageviewer.png
	install -Dm 0644 $(CURDIR)/src/ImageViewer/resources/icon/icon_22.png $(CURDIR)$(INSTALL_DESTDIR)/share/icons/hicolor/22x22/apps/com.github.aliencoweatcake.imageviewer.png
	install -Dm 0644 $(CURDIR)/src/ImageViewer/resources/icon/icon_24.png $(CURDIR)$(INSTALL_DESTDIR)/share/icons/hicolor/24x24/apps/com.github.aliencoweatcake.imageviewer.png
	install -Dm 0644 $(CURDIR)/src/ImageViewer/resources/icon/icon_32.png $(CURDIR)$(INSTALL_DESTDIR)/share/icons/hicolor/32x32/apps/com.github.aliencoweatcake.imageviewer.png
	install -Dm 0644 $(CURDIR)/src/ImageViewer/resources/icon/icon_36.png $(CURDIR)$(INSTALL_DESTDIR)/share/icons/hicolor/36x36/apps/com.github.aliencoweatcake.imageviewer.png
	install -Dm 0644 $(CURDIR)/src/ImageViewer/resources/icon/icon_48.png $(CURDIR)$(INSTALL_DESTDIR)/share/icons/hicolor/48x48/apps/com.github.aliencoweatcake.imageviewer.png
	install -Dm 0644 $(CURDIR)/src/ImageViewer/resources/icon/icon_64.png $(CURDIR)$(INSTALL_DESTDIR)/share/icons/hicolor/64x64/apps/com.github.aliencoweatcake.imageviewer.png
	install -Dm 0644 $(CURDIR)/src/ImageViewer/resources/icon/icon_72.png $(CURDIR)$(INSTALL_DESTDIR)/share/icons/hicolor/72x72/apps/com.github.aliencoweatcake.imageviewer.png
	install -Dm 0644 $(CURDIR)/src/ImageViewer/resources/icon/icon_96.png $(CURDIR)$(INSTALL_DESTDIR)/share/icons/hicolor/96x96/apps/com.github.aliencoweatcake.imageviewer.png
	install -Dm 0644 $(CURDIR)/src/ImageViewer/resources/icon/icon_128.png $(CURDIR)$(INSTALL_DESTDIR)/share/icons/hicolor/128x128/apps/com.github.aliencoweatcake.imageviewer.png
	install -Dm 0644 $(CURDIR)/src/ImageViewer/resources/icon/icon_192.png $(CURDIR)$(INSTALL_DESTDIR)/share/icons/hicolor/192x192/apps/com.github.aliencoweatcake.imageviewer.png
	install -Dm 0644 $(CURDIR)/src/ImageViewer/resources/icon/icon_256.png $(CURDIR)$(INSTALL_DESTDIR)/share/icons/hicolor/256x256/apps/com.github.aliencoweatcake.imageviewer.png
	install -Dm 0644 $(CURDIR)/src/ImageViewer/resources/icon/icon_512.png $(CURDIR)$(INSTALL_DESTDIR)/share/icons/hicolor/512x512/apps/com.github.aliencoweatcake.imageviewer.png
	install -Dm 0644 $(CURDIR)/src/ImageViewer/resources/icon/icon.svg $(CURDIR)$(INSTALL_DESTDIR)/share/icons/hicolor/scalable/apps/com.github.aliencoweatcake.imageviewer.svg
	dh_install --

override_dh_missing:
	dh_missing --fail-missing
openSUSE Build Service is sponsored by