File debian.rules of Package testpilotcloud-client-overlays-dolphin

#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

export DROOT=$(CURDIR)/debian/testpilotcloud-client
export SRCDIR=/usr/src/packages/SOURCES
export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export DISTRO_NAME ?= $(shell lsb_release -is)
export DISTRO_VERSION ?= $(shell lsb_release -rs)

SHELL=/bin/bash

%:
	dh $@

override_dh_auto_configure:
	# not sure, when which variables are set.
	echo source:Version=${source:Version}
	echo source:Upstream-Version=${source:Upstream-Version}
	echo binary:Version=${binary:Version}

	# protect against poisonous tar-balls.
	if [ -d binary ]; then ls -la; echo; echo "A top level directory named 'binary' exists. This kills dpkg-genchangelog."; echo; echo "... removing that directory."; echo; echo; sleep 30; rm -rf binary; fi
	if [ -d changelog ]; then ls -la; echo; echo "A top level directory named 'changelog' exists. This kills dpkg-genchangelog on debian 8 and 9."; echo; echo "... removing that directory."; echo; echo; sleep 3; rm -rf changelog; fi

	git_defs=('-DMIRALL_VERSION_BUILD=2667'); \
	if [ -n "" -a "" != "%nil" ]; then \
	  git_defs=('-DMIRALL_VERSION_SUFFIX=' '-DMIRALL_VERSION_BUILD=2667'); \
	fi; \

	# only useful with BUILD_CLIENT=ON
	sed -i -e 's/\(include(QtVersionAbstraction)\)/# \1/' CMakeLists.txt
	sed -i -e 's/\(setup_qt()\)/# \1\nset(Qt5Core_VERSION_MAJOR "0")/' CMakeLists.txt

	dh_auto_configure -- \
		"$${git_defs[@]}" \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_DOCDIR=/usr/share/doc \
		-DCMAKE_INSTALL_DATAROOTDIR:PATH=/usr/share \
		-DDATA_INSTALL_DIR:PATH=/usr/share \
		-DSYSCONF_INSTALL_DIR=/etc \
		-DWITH_DOC=FALSE \
		-DCMAKE_SKIP_RPATH=FALSE \
		-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE \
		-DOEM_THEME_DIR=$(CURDIR)/testpilotcloud/syncclient \
		-DBUILD_SHELL_INTEGRATION=ON \
		-DBUILD_SHELL_INTEGRATION_ICONS=OFF \
		-DBUILD_SHELL_INTEGRATION_NAUTILUS=OFF \
		-DBUILD_SHELL_INTEGRATION_DOLPHIN=ON \
		-DBUILD_CLIENT=OFF -DBUILD_TESTING=OFF
	
override_dh_install:
	# TODO: Why does make install not install to debian/tmp in the first place?!
	mv debian/testpilotcloud-client-dolphin debian/tmp

	find debian/ -name \*dolphin\*plugin.so  >> debian/testpilotcloud-client-dolphin.install || true

	test $$(cat debian/testpilotcloud-client-dolphin.install | wc -l) == 4 \
		|| (echo "Number of installed files seems incorrect, please check!" ; echo ; echo  \
		; cat debian/testpilotcloud-client-dolphin.install ; echo ; echo ; echo ; exit 1)

	dh_install --fail-missing
	
override_dh_strip:
	dh_strip --dbg-package=testpilotcloud-client-dolphin-dbg
openSUSE Build Service is sponsored by