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 QT_SELECT := qt5
export PATH := /opt/ownCloud/Qt-5.6.2/lib/$(DEB_HOST_MULTIARCH)/qt5/bin:$(PATH)
export LD_LIBRARY_PATH := /opt/ownCloud/Qt-5.6.2/lib/$(DEB_HOST_MULTIARCH):$(LD_LIBRARY_PATH)
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:
# 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=1917'); \
fi; \
echo "include_directories(/opt/ownCloud/Qt-5.6.2/include/$(DEB_HOST_MULTIARCH))" >> src/libsync/CMakeLists.txt
echo "include_directories(/opt/ownCloud/Qt-5.6.2/include/$(DEB_HOST_MULTIARCH)/qt5)" >> src/libsync/CMakeLists.txt
echo "include_directories(/opt/ownCloud/Qt-5.6.2/include/$(DEB_HOST_MULTIARCH)/qt5/QtCore)" >> src/libsync/CMakeLists.txt
cat src/libsync/CMakeLists.txt
dh_auto_configure -- \
"$${git_defs[@]}" \
-DQT_QMAKE_EXECUTABLE=/opt/ownCloud/Qt-5.6.2/bin/qmake \
-DCMAKE_INSTALL_PREFIX=/opt/ownCloud/Qt-5.6.2 \
-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)/owncloud/syncclient \
-DCMAKE_FIND_ROOT_PATH=/opt/ownCloud/Qt-5.6.2 \
-DBUILD_SHELL_INTEGRATION=OFF
override_dh_auto_install:
# survive at Ubuntu_16.04
mkdir -p $(CURDIR)/usr/share/owncloud/i18n
echo 3cb86418caef9c95cd211cbf60a1bddd88000000020101 | xxd -r -p > $(CURDIR)/usr/share/owncloud/i18n/client_en.qm
dh_auto_install -Xdebian
# https://github.com/owncloud/client/issues/4107
install -m 0755 -D $(SRCDIR)/100-sync-inotify.conf $(DROOT)/etc/sysctl.d/100-sync-inotify.conf
if [ -f $(SRCDIR)/l10n.zip ]; then cd $(CURDIR)/usr/share/owncloud ; unzip -o $(SRCDIR)/l10n.zip; fi || true
# install wrapper scripts to /usr/bin
install -m 0644 -d $(CURDIR)/usr/bin/
install -m 0755 $(SRCDIR)/owncloud.sh $(CURDIR)/usr/bin/owncloud
install -m 0755 $(SRCDIR)/owncloudcmd.sh $(CURDIR)/usr/bin/owncloudcmd
# https://github.com/owncloud/client/issues/2153
find $(CURDIR) -name \*.1 | grep man/man1 | tee | xargs rm -f
override_dh_strip:
dh_strip --dbg-package=owncloud-client-dbg