1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
|
#!/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
include /usr/share/quilt/quilt.make
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
export QTDIR=/usr
PACKAGE = compiz
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
confflags += --build=$(DEB_HOST_GNU_TYPE)
else
confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
endif
CORE_ABIVERSION := $(shell sed -rn 's/^\#define[[:space:]]+CORE_ABIVERSION[[:space:]]+//p' include/compiz-core.h )
INSTALL = /usr/bin/install
# generated via:
# python -c "import compizconfig; print ','.join(compizconfig.Context().Plugins['core'].Display['active_plugins'].Value)"
PLUGINS = core,ccp,dbus,place,mousepoll,gnomecompat,move,resize,decoration,png,svg,imgjpeg,text,commands,neg,video,wall,snap,animation,scale,scaleaddon,expo,staticswitcher,regex,resizeinfo,workarounds,ezoom,vpswitch,extrawm,fade,session
confflags += --disable-static \
--enable-kde4 \
--disable-kde \
--disable-kconfig \
--enable-librsvg \
--enable-gconf-dump \
--with-default-plugins="$(PLUGINS)"
build: patch build-stamp
build-stamp:
dh_testdir
mkdir obj-$(DEB_BUILD_GNU_TYPE)
cd obj-$(DEB_BUILD_GNU_TYPE) && \
../configure --prefix=/usr --sysconfdir=\$${prefix}/share $(confflags) \
CFLAGS="$(CFLAGS)"
cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE)
(cd po; intltool-update -p --verbose)
touch $@
prune:
rm -f autogen.sh
find -name .cvsignore | xargs rm -f
rm -f po/*.gmo
clean: prune unpatch
dh_testdir
dh_testroot
rm -f build-stamp
rm -f config.cache config.log config.status
rm -f */config.cache */config.log */config.status
rm -f conftest* */conftest*
rm -rf autom4te.cache */autom4te.cache
rm -rf obj-*
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
mv $(CURDIR)/debian/tmp/usr/bin/compiz $(CURDIR)/debian/tmp/usr/bin/compiz.real
$(INSTALL) --mode 0755 debian/compiz-manager $(CURDIR)/debian/tmp/usr/bin/compiz
$(INSTALL) --mode 0755 debian/compiz-decorator $(CURDIR)/debian/tmp/usr/bin/
mkdir -p $(CURDIR)/debian/tmp/etc/xdg/compiz
$(INSTALL) --mode 0644 debian/compiz-manager.defaults $(CURDIR)/debian/tmp/etc/xdg/compiz/compiz-manager
# apport hook
mkdir -p $(CURDIR)/debian/tmp/usr/share/apport/package-hooks
$(INSTALL) --mode 0644 debian/source_compiz.py $(CURDIR)/debian/tmp/usr/share/apport/package-hooks
# remove unneeded .la files
find $(CURDIR)/debian/tmp/usr/lib -type f -name '*.la' | xargs rm -f
# create compiz keybidings file based on the metacity ones
mkdir -p $(CURDIR)/debian/tmp/usr/share/gnome-control-center/keybindings/
sed 's/wm_name=\"Metacity\" package=\"metacity\"/wm_name=\"compiz\" package=\"compiz\"/' /usr/share/gnome-control-center/keybindings/50-metacity-desktop-key.xml > $(CURDIR)/debian/tmp/usr/share/gnome-control-center/keybindings/50-compiz-desktop-key.xml
sed 's/wm_name=\"Metacity\" package=\"metacity\"/wm_name=\"compiz\" package=\"compiz\"/' /usr/share/gnome-control-center/keybindings/50-metacity-key.xml > $(CURDIR)/debian/tmp/usr/share/gnome-control-center/keybindings/50-compiz-key.xml
sed -i 's#key=\"/apps/metacity/general/num_workspaces\" comparison=\"gt\"##g' $(CURDIR)/debian/tmp/usr/share/gnome-control-center/keybindings/50-compiz-key.xml
# add some selected keys
sed -i -f debian/compiz-keybindings.sed $(CURDIR)/debian/tmp/usr/share/gnome-control-center/keybindings/50-compiz-desktop-key.xml
# remove unsupported keys from compiz xml
for unsupported in switch_group switch_panels cycle_windows cycle_group cycle_panels; do \
sed -i "/metacity\/global_keybindings\/$$unsupported/d" $(CURDIR)/debian/tmp/usr/share/gnome-control-center/keybindings/50-compiz-key.xml; \
done;
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installdocs
dh_installchangelogs ChangeLog
dh_install -pcompiz-plugins -Xlibkconfig.so -Xkconfig.xml -Xlibgconf.so -Xgconf.xml -Xcore.xml --sourcedir=debian/tmp
dh_install -pcompiz-core --sourcedir=debian/tmp
dh_install -pcompiz-dev --sourcedir=debian/tmp
dh_install -pcompiz-gnome --sourcedir=debian/tmp
dh_install -pcompiz-kde --sourcedir=debian/tmp
dh_install -pcompiz-wrapper --sourcedir=debian/tmp
dh_install -plibdecoration0 --sourcedir=debian/tmp
dh_install -plibdecoration0-dev --sourcedir=debian/tmp
dh_install -pcompiz --sourcedir=debian/tmp
dh_installman
dh_link
dh_gconf
dh_strip --dbg-package=compiz-dbg
dh_compress
dh_fixperms
dh_makeshlibs
dh_shlibdeps -L libdecoration0 -l debian/libdecoration0/usr/lib
dh_installdeb
dh_gencontrol -- -Vcoreabiversion=$(CORE_ABIVERSION)
dh_md5sums
dh_builddeb
# Build architecture-independent files here.
binary-indep: build install
# Nothing to do
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|