File debian.rules of Package owncloud-client
#!/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/owncloud-client
export SRCDIR=/usr/src/packages/SOURCES
export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
SHELL=/bin/bash
%:
dh $@
override_dh_auto_configure:
if grep -q ' 12.04 LTS ' /etc/issue; then \
patch -p0 < /usr/src/packages/SOURCES/neon27_ubuntu1204_compat_csync.diff; \
sed -i.orig -e 's/OVERRIDE=override/OVERRIDE=/' cmake/modules/QtVersionAbstraction.cmake; \
fi
# https://github.com/owncloud/client/pull/4947
patch -p1 < /usr/src/packages/SOURCES/tray-patch.patch
# https://github.com/owncloud/client/issues/3414
patch -p1 < /usr/src/packages/SOURCES/highdpi-6ccd9e8.patch
# 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 "Please remove that directory."; echo; echo; exit 1; fi
git_defs=(); \
if [ -n "%nil" -a "%nil" != "%nil" ]; then \
git_defs=('-DMIRALL_VERSION_SUFFIX=%nil' '-DMIRALL_VERSION_BUILD=1681'); \
fi; \
dh_auto_configure -- "$${git_defs[@]}" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/owncloud-client -DSYSCONF_INSTALL_DIR=/etc -DWITH_DOC=FALSE -DCMAKE_SKIP_RPATH=FALSE -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE -DOEM_THEME_DIR=$(CURDIR)/owncloud/syncclient
override_dh_auto_install:
# survive at Ubuntu_16.04
mkdir -p $(CURDIR)/usr/share/owncloud/i18n
dh_auto_install -Xdebian
# https://github.com/owncloud/client/issues/4107
install -m 0755 -D $(SRCDIR)/100-owncloud-inotify.conf $(DROOT)/etc/sysconf.d/100-owncloud-inotify.conf