forked from chenxiaolong/Unity-for-Arch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
191 lines (155 loc) · 7.21 KB
/
PKGBUILD
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# Maintainer: Xiao-Long Chen <[email protected]>
# Some comments are taken from the Ubuntu packaging files
pkgname=compiz-ubuntu
_ubuntu_rel=0ubuntu1
_actual_ver=0.9.11
_extra_ver=+14.04.20140409
# AUR Fix
pkgver=0.9.11.14.04.20140409
realver=${_actual_ver}${_extra_ver/+/.}
if [ "${pkgver}" != "${realver}" ]; then
echo "PKGBUILD needs to be updated!"
exit 1
fi
pkgrel=2
pkgdesc="OpenGL window and compositing manager"
url="http://www.compiz.org/"
arch=('i686' 'x86_64')
license=('GPL')
depends=('boost-libs' 'dbus' 'fuse' 'glibmm' 'glu' 'librsvg' 'libxcomposite' 'libxdamage' 'libxinerama' 'libxrandr' 'libxslt' 'libwnck' 'mesa' 'metacity-ubuntu' 'startup-notification' 'protobuf' 'pyrex' 'gsettings-desktop-schemas')
# The schemas from gnome-settings-daemon are needed
depends+=('gnome-settings-daemon')
makedepends=('boost' 'cmake' 'intltool' 'libwnck')
optdepends=('gnome-control-center: GNOME Control Center'
'unity-control-center: Unity Control Center')
groups=('unity')
options=('emptydirs')
conflicts=('compiz')
provides=('compiz-core' 'compiz')
install=compiz-ubuntu.install
source=("https://launchpad.net/ubuntu/+archive/primary/+files/compiz_${_actual_ver}${_extra_ver}.orig.tar.gz"
"https://launchpad.net/ubuntu/+archive/primary/+files/compiz_${_actual_ver}${_extra_ver}-${_ubuntu_rel}.diff.gz"
'compiz.reset'
'0002_Fix_cmake_install_dir.patch'
'0003_Fix_python_install_command.patch'
'0004_Use_python2.patch'
'0005_Disable_Werror.patch')
sha512sums=('56b0f28a7a276670bdd9eebb439e1c2412e16219dd6b02adcf5bd00b148f20c171dd7b6a284e5796c5c2a33fbe8f88cc5779ce4b529c367b454c9e6cd4aa5970'
'4552ab425d4383563b1174893c055ba715c53f2c1e85d979dc6de1455cf3821ea8a7aa29ad0d76b7a11cad4c8eb0dff10620ad899ce3e945b108c7eb2b7863d3'
'4fd96e13e6df21977a04a00a2bc440683a80d11d23c8e7dd9ad357ce833e8c18e2445998f514ef4ae9cdf05872bbbed6a46deec4eaf869ee414b6d75c760aa4d'
'ba80a6e5c3a7b488974046f8c1b906bb178691a9224b5c8f3542e0948099e2291b8888fbd4f591eaa16f9209e7288f11e122d1673731e7f1aa7c84aa6e3207c6'
'bd7c8c0bf4cb3767c5b4b6d9c2d79e958ff9f34375a8223b509aec16b3682e219568e17378fa392f6ca4267f695835d83ef1c5db12898ea7b7cc75e1151d02b2'
'8ee87a9de58d2ca4c9d64da24ff690dcce3f77aebbc45c6add5d6324b67862472ea7b6260e9019fe2a5ff0accf94e29bb7171cbd6f6982e973eecfeab564cfb3'
'c20c1e9b7cd44681c1fa76e6db3861f6ec7539d2047fe6be3be72d86d4d38c173f863f224a1111e36553b0ef38d5b1f0471e355785f6da041e7fb596e1940924')
prepare() {
cd "${srcdir}/compiz-${_actual_ver}${_extra_ver}"
# Fix the directory for FindCompiz.cmake and FindCompizConfig.cmake
patch -p1 -i "${srcdir}/0002_Fix_cmake_install_dir.patch"
# Compiz's build system appends --install-layout=deb to the python 2 install
# command (for python-compizconfig and ccsm) whether or not COMPIZ_DEB_BUILD
# is set to 1
patch -p1 -i "${srcdir}/0003_Fix_python_install_command.patch"
# Use python 2
patch -p1 -i "${srcdir}/0004_Use_python2.patch"
# Don't treat warnings as errors
patch -p1 -i "${srcdir}/0005_Disable_Werror.patch"
# Apply Ubuntu patches
patch -p1 -i "${srcdir}/compiz_${_actual_ver}${_extra_ver}-${_ubuntu_rel}.diff"
for i in $(grep -v '#' debian/patches/series); do
patch -p1 -i "debian/patches/${i}"
done
}
build() {
cd "${srcdir}/compiz-${_actual_ver}${_extra_ver}"
# Disable '-Bsymbolic-functions' if present so libcompiz_core won't be
# loaded once per plugin
export LDFLAGS="$(echo ${LDFLAGS} | sed 's/-B[ ]*symbolic-functions//')"
# Disable rpath in Python 2 bindings
export COMPIZ_DISABLE_RPATH=1
# Compiz will segfault if the CMake built target is set to 'Release'
# Disable tests since they can't run on a headless build server
[[ -d build ]] && rm -rvf build/
mkdir build/
cd build/
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCOMPIZ_BUILD_WITH_RPATH=FALSE \
`# -DCMAKE_BUILD_TYPE=RelWithDebInfo` \
-DCMAKE_BUILD_TYPE=Debug \
-DCOMPIZ_PACKAGING_ENABLED=TRUE \
-DUSE_GSETTINGS=ON \
-DUSE_GCONF=OFF \
-DCOMPIZ_DISABLE_GS_SCHEMAS_INSTALL=OFF \
-DCOMPIZ_BUILD_TESTING=OFF \
-DCOMPIZ_DISABLE_PLUGIN_KDE=ON \
-DUSE_KDE4=OFF \
`# Necessary for new versions of Compiz` \
`# https://bugs.launchpad.net/compiz/+bug/1070211` \
-DPYTHON_INCLUDE_DIR=/usr/include/python2.7 \
-DPYTHON_LIBRARY=/usr/lib/libpython2.7.so
make
}
package() {
cd "${srcdir}/compiz-${_actual_ver}${_extra_ver}/build"
make install DESTDIR="${pkgdir}"
# Stupid findcompiz_install needs COMPIZ_DESTDIR and install needs DESTDIR
#make findcompiz_install
CMAKE_DIR=$(cmake --system-information | grep '^CMAKE_ROOT' \
| awk -F\" '{print $2}')
install -dm755 "${pkgdir}${CMAKE_DIR}/Modules/"
install -m644 ../cmake/FindCompiz.cmake \
"${pkgdir}${CMAKE_DIR}/Modules/"
# Install documentation
install -dm755 "${pkgdir}/usr/share/doc/compiz/"
install ../{AUTHORS,NEWS,README} \
"${pkgdir}/usr/share/doc/compiz/"
# Install Ubuntu's files
install -dm755 "${pkgdir}/usr/share/man/man1/"
install -dm755 "${pkgdir}/etc/X11/xinit/xinitrc.d/"
install -dm755 "${pkgdir}/etc/compizconfig/upgrades/"
install -dm755 "${pkgdir}/usr/share/gnome/wm-properties/"
# Install manual pages
install -m644 ../debian/{ccsm,compiz,gtk-window-decorator}.1 \
"${pkgdir}/usr/share/man/man1/"
# Window manager desktop file for GNOME
install -m644 \
"${pkgdir}/usr/share/applications/compiz.desktop" \
"${pkgdir}/usr/share/gnome/wm-properties/"
# Install X11 startup script
install -m755 ../debian/65compiz_profile-on-session \
"${pkgdir}/etc/X11/xinit/xinitrc.d/"
# Unity Compiz profile configuration file
install -m644 ../debian/unity.ini "${pkgdir}/etc/compizconfig/"
# Install Compiz profile configuration file
install -m644 ../debian/config "${pkgdir}/etc/compizconfig/"
# Compiz profile upgrade helper files for ensuring smooth upgrades from older
# configuration files
pushd ../debian/profile_upgrades/
find . -type f -name '*.upgrade' -exec \
install -m644 {} "${pkgdir}"/etc/compizconfig/upgrades/{} \;
popd
install -dm755 "${pkgdir}/usr/lib/compiz/migration/"
pushd ../postinst/convert-files/
find . -type f -name '*.convert' -exec \
install -m644 {} "${pkgdir}"/usr/lib/compiz/migration/{} \;
popd
# Install keybinding files
install -dm755 "${pkgdir}/usr/share/gnome-control-center/keybindings/"
install -dm755 "${pkgdir}/usr/share/unity-control-center/keybindings/"
find ../*/gtk/gnome/ -name *.xml -exec install {} \
"${pkgdir}/usr/share/gnome-control-center/keybindings/" \;
find ../*/gtk/gnome/ -name *.xml -exec install {} \
"${pkgdir}/usr/share/unity-control-center/keybindings/" \;
# Default GSettings settings
install -m644 ../debian/compiz-gnome.gsettings-override \
"${pkgdir}/usr/share/glib-2.0/schemas/10_compiz-ubuntu.gschema.override"
# Install script for resetting all of Compiz's settings
install "${srcdir}/compiz.reset" "${pkgdir}/usr/bin/compiz.reset"
# Remove GConf schemas
rm -rv "${pkgdir}/usr/share/gconf/"
# Don't disable gnomecompat plugin
rm "${pkgdir}/etc/compizconfig/upgrades/com.canonical.unity.unity.07.upgrade"
sed -ri '/s0_active_plugins/s/$/;gnomecompat/g' \
"${pkgdir}/etc/compizconfig/unity.ini"
}
# vim:set ts=2 sw=2 et: