4
# Uncomment this to turn on verbose mode.
6
export COMPIZ_DEB_BUILD=1
7
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
8
gles2_architectures := armel armhf
10
CORE_ABIVERSION := $(shell sed -rn 's/^\#define[[:space:]]+CORE_ABIVERSION[[:space:]]+//p' include/core/abiversion.h )
12
DEFAULT_PLUGINS = "ccp"
14
override_dh_quilt_patch:
16
if test -r debian/patches/series.$(DEB_HOST_ARCH); then \
17
pc=".pc.$(DEB_HOST_ARCH)"; \
18
test -d "$(CURDIR)/$$pc" || mkdir "$(CURDIR)/$$pc"; \
19
cp debian/patches/series.$(DEB_HOST_ARCH) $(CURDIR)/$$pc/series; \
21
QUILT_PC="$$pc" quilt upgrade || true; \
22
QUILT_PC="$$pc" QUILT_PATCHES="debian/patches/" quilt push -a || true; \
25
override_dh_quilt_unpatch:
26
if test -r debian/patches/series.$(DEB_HOST_ARCH); then \
27
pc=".pc.$(DEB_HOST_ARCH)"; \
29
QUILT_PC="$$pc" QUILT_PATCHES="debian/patches/" quilt pop -a || true; \
33
override_dh_auto_configure:
34
# currently, segfault if CMAKE_BUILD_TYPE=Release
35
LDFLAGS=$(shell echo $$LDFLAGS | sed -e 's/\-Wl,-Bsymbolic-functions //')
36
ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
37
dh_auto_configure -- -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCOMPIZ_DEFAULT_PLUGINS=\"$(DEFAULT_PLUGINS)\" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCOMPIZ_PACKAGING_ENABLED=TRUE -DUSE_GSETTINGS=OFF -DCOMPIZ_DISABLE_GS_SCHEMAS_INSTALL=ON -DCOMPIZ_DISABLE_PLUGIN_KDE=ON -DCOMPIZ_BUILD_TESTING=OFF -DUSE_KDE4=OFF -DBUILD_GLES=ON
39
dh_auto_configure -- -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCOMPIZ_DEFAULT_PLUGINS=\"$(DEFAULT_PLUGINS)\" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCOMPIZ_PACKAGING_ENABLED=TRUE -DUSE_GSETTINGS=OFF -DCOMPIZ_DISABLE_GS_SCHEMAS_INSTALL=ON -DCOMPIZ_DISABLE_PLUGIN_KDE=ON -DCOMPIZ_BUILD_TESTING=OFF -DUSE_KDE4=OFF
44
for d in $$(find debian/tmp -type f \( -name "*.desktop" -o -name "*.directory" \) ); do \
45
sed -ri '/^(Name|GenericName|Comment|X-GNOME-FullName)\[/d' $$d; \
46
echo "X-Ubuntu-Gettext-Domain=compiz" >> $$d; \
49
# create compiz keybindings file based on the metacity ones.
50
mkdir -p $(CURDIR)/debian/tmp/usr/share/gnome-control-center/keybindings/
51
# keep package=metacity to get the right translation :)
52
for i in launchers navigation screenshot system windows ; do \
53
sed 's/wm_name=\"Metacity\"/wm_name=\"Compiz\"/' /usr/share/gnome-control-center/keybindings/50-metacity-$${i}.xml > $(CURDIR)/debian/tmp/usr/share/gnome-control-center/keybindings/50-compiz-$${i}.xml ; \
55
# add some selected keys
56
sed -i 's#key=\"/apps/metacity/general/num_workspaces\" comparison=\"gt\"##g' $(CURDIR)/debian/tmp/usr/share/gnome-control-center/keybindings/50-compiz-navigation.xml
58
# cmake findcompiz_install use COMPIZ_DESTDIR and using COMPIZ_DESTDIR and
59
# DESTDIR together is completely broken upstream
60
# So, doing the same in debian/rules to find a way to install things in the
61
# right place, sorry for the kittens
62
ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
63
cmake_dir=`cmake --system-information 2> /dev/null | grep "^CMAKE_ROOT " | sed -e 's/.*"\(.*\)"/\1/'` && \
64
mkdir -p debian/tmp$${cmake_dir}/Modules && \
65
cp cmake/FindCompiz.cmake debian/tmp$${cmake_dir}/Modules && cp cmake/FindOpenGLES2.cmake debian/tmp$${cmake_dir}/Modules
67
cmake_dir=`cmake --system-information 2> /dev/null | grep "^CMAKE_ROOT " | sed -e 's/.*"\(.*\)"/\1/'` && \
68
mkdir -p debian/tmp$${cmake_dir}/Modules && \
69
cp cmake/FindCompiz.cmake debian/tmp$${cmake_dir}/Modules
73
rm -f debian/tmp/usr/lib/*.a
75
dh_install --fail-missing
77
# remove the compizconfig dev file from compiz-dev
78
rm debian/compiz-dev/usr/share/compiz/cmake/LibCompizConfigCommon.cmake
80
override_dh_gencontrol:
81
dh_gencontrol -- -Vcoreabiversion=$(CORE_ABIVERSION)
83
override_dh_auto_test:
87
dh $@ --parallel --with quilt,python2