aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlectrode2024-04-30 15:58:07 -0600
committerlectrode2024-04-30 15:58:07 -0600
commit20eeef4786d51538d18b2cd3e9335667abc7b6ae (patch)
tree1f1b2f5897db68ab71e56b2dda7de55ad4afbf2c
parent1c920fe105a0e4ff4885574dced1195ffef7ff46 (diff)
downloadaur-20eeef4786d51538d18b2cd3e9335667abc7b6ae.tar.gz
[no vsn change] formatting changes
* adopt formatting changes and option to compile latest git from compiz AUR package
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD313
2 files changed, 196 insertions, 141 deletions
diff --git a/.SRCINFO b/.SRCINFO
index afe8d705a3ab..09f89dbaff30 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,8 +6,8 @@ pkgbase = compiz-easy-patch
install = compiz-easy-patch.install
arch = i686
arch = x86_64
- license = GPL
- license = LGPL
+ license = GPL-2.0-or-later
+ license = LGPL-2.1-or-later
license = MIT
makedepends = boost
makedepends = cmake
@@ -23,20 +23,20 @@ pkgbase = compiz-easy-patch
depends = libxslt
depends = metacity
depends = protobuf
- depends = python-gobject
depends = python-cairo
+ depends = python-gobject
depends = xorg-server
depends = zenity
optdepends = xorg-xprop: grab various window properties for use in window matching rules
optdepends = xfce-theme-greybird: A grey and blue Xfce theme
- provides = ccsm=0.9.14.2
- provides = compiz-bcop=0.9.14.2
- provides = compiz-core=0.9.14.2
- provides = compiz-plugins-extra=0.9.14.2
- provides = compiz-plugins-main=0.9.14.2
- provides = compizconfig-python=0.9.14.2
- provides = libcompizconfig=0.9.14.2
- provides = compiz=0.9.14.2
+ provides = ccsm=0.9.14
+ provides = compiz-bcop=0.9.14
+ provides = compiz-core=0.9.14
+ provides = compiz-plugins-extra=0.9.14
+ provides = compiz-plugins-main=0.9.14
+ provides = compizconfig-python=0.9.14
+ provides = libcompizconfig=0.9.14
+ provides = compiz=0.9.14
conflicts = ccsm
conflicts = compiz-bcop
conflicts = compiz-core
@@ -50,7 +50,7 @@ pkgbase = compiz-easy-patch
conflicts = compiz
conflicts = compiz-manjaro
replaces = compiz-manjaro
- source = https://launchpad.net/compiz/0.9.14/0.9.14.2/+download/compiz-0.9.14.2.tar.xz
+ source = compiz-0.9.14.2.tar.xz::https://launchpad.net/compiz/0.9.14/0.9.14.2/+download/compiz-0.9.14.2.tar.xz
source = focus-prevention-disable.patch
source = gtk-extents.patch
source = reverse-unity-config.patch
diff --git a/PKGBUILD b/PKGBUILD
index 990b25baf098..aadd8b988fdc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,102 +7,158 @@
# Contributor: Iven Hsu <ivenvd AT gmail>
# Contributor: Nathan Hulse <nat.hulse@gmail.com>
-_name=compiz
-pkgname=compiz-easy-patch
+## options
+: ${_build_git:=false}
+
+unset _pkgtype
+[[ "${_build_git::1}" == "t" ]] && _pkgtype+="-git"
+
+## basic info
+_name='compiz'
+_pkgname='compiz-easy-patch'
+pkgname="$_pkgname${_pkgtype:-}"
pkgver=0.9.14.2
pkgrel=5
pkgdesc="OpenGL compositing window manager. Includes friendly defaults, GWD theme selector and autostart for Xfce & MATE."
-arch=('i686' 'x86_64')
url="https://launchpad.net/compiz"
-license=('GPL' 'LGPL' 'MIT')
-depends=(
- 'boost-libs'
- 'fuse2'
- 'glibmm'
- 'glu'
- 'libnotify'
- 'libwnck3'
- 'libxslt'
- 'metacity'
- 'protobuf'
- 'python-gobject'
- 'python-cairo'
- 'xorg-server'
- 'zenity'
-)
-makedepends=(
- 'boost'
- 'cmake'
- 'cython'
- 'intltool'
- 'python-setuptools'
-)
-optdepends=(
- 'xorg-xprop: grab various window properties for use in window matching rules'
- 'xfce-theme-greybird: A grey and blue Xfce theme'
-)
-replaces=('compiz-manjaro')
-conflicts=(
- 'ccsm'
- 'compiz-bcop'
- 'compiz-core'
- 'compiz-fusion-plugins-experimental'
- 'compiz-fusion-plugins-extra'
- 'compiz-fusion-plugins-main'
- 'compiz-gtk'
- 'compizconfig-python'
- 'libcompizconfig'
- 'simple-ccsm'
- 'compiz'
- 'compiz-manjaro'
-)
-provides=(
- "ccsm=$pkgver"
- "compiz-bcop=$pkgver"
- "compiz-core=$pkgver"
- "compiz-plugins-extra=$pkgver"
- "compiz-plugins-main=$pkgver"
- "compizconfig-python=$pkgver"
- "libcompizconfig=$pkgver"
- "compiz=${pkgver}"
-)
-source=(
- "https://launchpad.net/${_name}/${pkgver:0:6}/${pkgver}/+download/${_name}-${pkgver}.tar.xz"
- "focus-prevention-disable.patch"
- "gtk-extents.patch"
- "reverse-unity-config.patch"
- "screenshot-launch-fix.patch"
- "no-compile-gschemas.patch"
- "compiz-easy-defaults.patch"
- "compiz-easy.gschema.override"
- "compiz-gtk-decorator-theme-selector"
- "compiz-gtk-decorator-theme-selector.desktop"
- "compiz-xfce-autostart-setup"
- "compiz-xfce-autostart-setup.desktop"
- "compiz-xfce-uninstall-helper"
- "compiz-xfce-uninstall-helper.desktop"
-)
-sha256sums=(
- 'cfa061e93b032275ff9e7041f582a8f6d5ae271cf8a89e6bc74e3d3635999d3c'
- 'f4897590b0f677ba34767a29822f8f922a750daf66e8adf47be89f7c2550cf4b'
- '16ddb6311ce42d958505e21ca28faae5deeddce02cb558d55e648380274ba4d9'
- '6ec9c04540ca1649c687d9ab2c8311caea7075831e2cffe719ec7958c9ebab7b'
- '89ee91a8ea6b1424ef76661ea9a2db43412366aacddc12d24a7adf5e04bfbc61'
- '4ab3277da201314b3f65e30128bc30704ddee584fdbbfc8d0d83c7e0de91fa9a'
- '4d28bc2cefbfae77b9157f39876f5296b5edb7fb00de2a391a262688d2f7590c'
- 'b549d6a61115ab0cbd6bf74be79cd449477aaadb6a9968743236e3ed3d93f668'
- '28d14e5ec0694b4a451540f35210eac5699e9daf1b00020bf59d8b0296d7d9bf'
- '0faaf9e9df28d2857108ccd0910d50ba631c34c2b1659b8860da8c2b552fc889'
- '3e46a0b50a16d9fd6fd4f9d28f6082fc76f39dff8a82a79af312126a6bcf7cc2'
- 'd23b8633186bb3a2a841734ad0b917500f3536a67046f5d8fbb08818eab59160'
- '5c471a34a1d79a45e8c4a924f0f58d71199328e45c80472fe32ecaac76c987ee'
- '02eec20f75eb1f9571a2cf92013fc3c78d13c155a8ede0467cc10b83cdeba43c'
+arch=('i686' 'x86_64')
+license=(
+ 'GPL-2.0-or-later'
+ 'LGPL-2.1-or-later'
+ 'MIT'
)
-install="${pkgname}.install"
+# main package
+_main_package() {
+ depends=(
+ 'boost-libs'
+ 'fuse2'
+ 'glibmm'
+ 'glu'
+ 'libnotify'
+ 'libwnck3'
+ 'libxslt'
+ 'metacity'
+ 'protobuf'
+ 'python-cairo'
+ 'python-gobject'
+ 'xorg-server'
+ 'zenity'
+ )
+ makedepends=(
+ 'boost'
+ 'cmake'
+ 'cython'
+ 'intltool'
+ 'python-setuptools'
+ )
+ optdepends=(
+ 'xorg-xprop: grab various window properties for use in window matching rules'
+ 'xfce-theme-greybird: A grey and blue Xfce theme'
+ )
+ replaces=('compiz-manjaro')
+ conflicts=(
+ 'ccsm'
+ 'compiz-bcop'
+ 'compiz-core'
+ 'compiz-fusion-plugins-experimental'
+ 'compiz-fusion-plugins-extra'
+ 'compiz-fusion-plugins-main'
+ 'compiz-gtk'
+ 'compizconfig-python'
+ 'libcompizconfig'
+ 'simple-ccsm'
+ "$_name"
+ 'compiz-manjaro'
+ )
+ provides=(
+ "ccsm=${pkgver:0:6}"
+ "compiz-bcop=${pkgver:0:6}"
+ "compiz-core=${pkgver:0:6}"
+ "compiz-plugins-extra=${pkgver:0:6}"
+ "compiz-plugins-main=${pkgver:0:6}"
+ "compizconfig-python=${pkgver:0:6}"
+ "libcompizconfig=${pkgver:0:6}"
+ "$_name=${pkgver:0:6}"
+ )
+
+ if [ "${_build_git::1}" != "t" ] ; then
+ _main_stable
+ else
+ _main_git
+ fi
+
+ source+=(
+ "focus-prevention-disable.patch"
+ "gtk-extents.patch"
+ "reverse-unity-config.patch"
+ "screenshot-launch-fix.patch"
+ "no-compile-gschemas.patch"
+ "compiz-easy-defaults.patch"
+ "compiz-easy.gschema.override"
+ "compiz-gtk-decorator-theme-selector"
+ "compiz-gtk-decorator-theme-selector.desktop"
+ "compiz-xfce-autostart-setup"
+ "compiz-xfce-autostart-setup.desktop"
+ "compiz-xfce-uninstall-helper"
+ "compiz-xfce-uninstall-helper.desktop"
+ )
+ sha256sums+=(
+ 'f4897590b0f677ba34767a29822f8f922a750daf66e8adf47be89f7c2550cf4b'
+ '16ddb6311ce42d958505e21ca28faae5deeddce02cb558d55e648380274ba4d9'
+ '6ec9c04540ca1649c687d9ab2c8311caea7075831e2cffe719ec7958c9ebab7b'
+ '89ee91a8ea6b1424ef76661ea9a2db43412366aacddc12d24a7adf5e04bfbc61'
+ '4ab3277da201314b3f65e30128bc30704ddee584fdbbfc8d0d83c7e0de91fa9a'
+ '4d28bc2cefbfae77b9157f39876f5296b5edb7fb00de2a391a262688d2f7590c'
+ 'b549d6a61115ab0cbd6bf74be79cd449477aaadb6a9968743236e3ed3d93f668'
+ '28d14e5ec0694b4a451540f35210eac5699e9daf1b00020bf59d8b0296d7d9bf'
+ '0faaf9e9df28d2857108ccd0910d50ba631c34c2b1659b8860da8c2b552fc889'
+ '3e46a0b50a16d9fd6fd4f9d28f6082fc76f39dff8a82a79af312126a6bcf7cc2'
+ 'd23b8633186bb3a2a841734ad0b917500f3536a67046f5d8fbb08818eab59160'
+ '5c471a34a1d79a45e8c4a924f0f58d71199328e45c80472fe32ecaac76c987ee'
+ '02eec20f75eb1f9571a2cf92013fc3c78d13c155a8ede0467cc10b83cdeba43c'
+ )
+
+install="${_pkgname}.install"
+}
+
+# stable package
+_main_stable() {
+ _pkgsrc="$_name-${pkgver%%.r*}"
+ _pkgext="tar.xz"
+ source+=(
+ "$_pkgsrc.$_pkgext"::"https://launchpad.net/$_name/${pkgver:0:6}/${pkgver%%.r*}/+download/$_pkgsrc.$_pkgext"
+ )
+ sha256sums+=(
+ 'cfa061e93b032275ff9e7041f582a8f6d5ae271cf8a89e6bc74e3d3635999d3c'
+ )
+
+ pkgver() {
+ echo "${pkgver%%.r*}"
+ }
+}
+
+# git package
+_main_git() {
+ makedepends+=('git')
+
+ conflicts+=("$_pkgname")
+ provides+=("$_pkgname=${pkgver:0:6}")
+
+ _pkgsrc="$_name"
+ source+=("$_pkgsrc"::"git+https://git.launchpad.net/compiz")
+ sha256sums+=('SKIP')
+
+ pkgver() {
+ cd "$_pkgsrc"
+ git describe --long --tags --abbrev=8 --exclude='*[a-zA-Z][a-zA-Z]*' | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
+ }
+}
+
+# common functions
prepare() {
- cd "$srcdir/${_name}-$pkgver"
+ cd "$_pkgsrc"
# Reverse Unity specific configuration patches
patch -p1 -i "$srcdir/reverse-unity-config.patch"
@@ -120,80 +176,79 @@ prepare() {
patch -p1 -i "$srcdir/no-compile-gschemas.patch"
# Easy defaults
- patch -p1 -i "${srcdir}/compiz-easy-defaults.patch"
+ patch -p1 -i "$srcdir/compiz-easy-defaults.patch"
}
build() {
- cd "$srcdir/${_name}-$pkgver"
-
- mkdir -p build
- cd build
-
- cmake .. \
- -DCMAKE_CXX_STANDARD=17 \
- -DCMAKE_BUILD_TYPE="Release" \
- -DCMAKE_INSTALL_PREFIX="/usr" \
- -DCMAKE_INSTALL_LIBDIR="/usr/lib" \
- -DCOMPIZ_DISABLE_SCHEMAS_INSTALL=On \
- -DCOMPIZ_BUILD_WITH_RPATH=Off \
- -DCOMPIZ_PACKAGING_ENABLED=On \
- -DBUILD_GTK=On \
- -DBUILD_METACITY=On \
- -DBUILD_KDE4=Off \
- -DCOMPIZ_BUILD_TESTING=Off \
- -DCOMPIZ_WERROR=Off \
+ local _cmake_options=(
+ -B build
+ -S "$_pkgsrc"
+
+ -DCMAKE_CXX_STANDARD=17
+ -DCMAKE_BUILD_TYPE="Release"
+ -DCMAKE_INSTALL_PREFIX="/usr"
+ -DCMAKE_INSTALL_LIBDIR="/usr/lib"
+ -DCOMPIZ_DISABLE_SCHEMAS_INSTALL=ON
+ -DCOMPIZ_BUILD_WITH_RPATH=OFF
+ -DCOMPIZ_PACKAGING_ENABLED=ON
+ -DBUILD_GTK=ON
+ -DBUILD_METACITY=ON
+ -DBUILD_KDE4=OFF
-DCOMPIZ_DEFAULT_PLUGINS="composite,opengl,decor,resize,place,move,compiztoolbox,staticswitcher,expo,grid,regex,animation,ccp"
- #A race condition consistently causes build to fail when using a faster processor with a slower drive
- #Limiting max simultaneous make jobs to 4 or less seems to work around the issue
- mjobs=4; [[ "$(nproc)" -lt 4 ]] && mjobs="$(nproc)"
- make -j$mjobs
+ -DCOMPIZ_BUILD_TESTING=OFF
+ -DCOMPIZ_WERROR=OFF
+ -Wno-dev
+ )
+
+ cmake "${_cmake_options[@]}"
+ cmake --build build
}
package() {
- cd "$srcdir/${_name}-$pkgver"
- cd build
-
- make DESTDIR="$pkgdir" install
+ DESTDIR="$pkgdir" cmake --install build
# 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 -Dm644 ../cmake/FindCompiz.cmake \
+ install -Dm644 "$_pkgsrc/cmake/FindCompiz.cmake" \
-t "${pkgdir}${CMAKE_DIR}/Modules/"
- # Add documentation
- install -Dm644 ../{AUTHORS,NEWS,README} \
+ # documentation
+ install -Dm644 "$_pkgsrc"/{AUTHORS,NEWS,README} \
-t "$pkgdir/usr/share/doc/compiz/"
- # Add the gsettings schema files
- if ls generated/glib-2.0/schemas/ | grep -qm1 .gschema.xml; then
- install -Dm644 generated/glib-2.0/schemas/*.gschema.xml \
+ # gsettings schema files
+ if ls build/generated/glib-2.0/schemas/ | grep -qm1 .gschema.xml; then
+ install -Dm644 build/generated/glib-2.0/schemas/*.gschema.xml \
-t "$pkgdir/usr/share/glib-2.0/schemas/"
fi
- # Install licenses
- install -Dm644 "$srcdir/${_name}-$pkgver"/{COPYING,COPYING.GPL,COPYING.LGPL,COPYING.MIT} \
+ # licenses
+ install -Dm644 "$_pkgsrc"/{COPYING,COPYING.GPL,COPYING.LGPL,COPYING.MIT} \
-t "$pkgdir/usr/share/licenses/$pkgname"
## Easy Patch Stuff ##
# Add dconf/gsettings schema override file
- install -Dm644 "${srcdir}/compiz-easy.gschema.override" \
+ install -Dm644 "$srcdir/compiz-easy.gschema.override" \
-t "$pkgdir/usr/share/glib-2.0/schemas/"
# Make ccsm icon appear in Xfce settings manager
- sed -i 's|Categories=Settings;DesktopSettings;|Categories=Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-OtherSettings;|' "${pkgdir}/usr/share/applications/ccsm.desktop"
+ sed -i 's|Categories=Settings;DesktopSettings;|Categories=Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-OtherSettings;|' "$pkgdir/usr/share/applications/ccsm.desktop"
# Install GWD theme selector app
- install -Dm755 "${srcdir}/compiz-gtk-decorator-theme-selector" \
+ install -Dm755 "$srcdir/compiz-gtk-decorator-theme-selector" \
-t "$pkgdir/usr/bin/"
- install -Dm644 "${srcdir}/compiz-gtk-decorator-theme-selector.desktop" \
+ install -Dm644 "$srcdir/compiz-gtk-decorator-theme-selector.desktop" \
-t "$pkgdir/usr/share/applications/"
# Place autostart/theme scripts/enablers
- install -Dm755 "${srcdir}"/compiz-xfce-{'autostart-setup','uninstall-helper'} \
+ install -Dm755 "$srcdir"/compiz-xfce-{'autostart-setup','uninstall-helper'} \
-t "${pkgdir}/usr/bin/"
- install -Dm644 "${srcdir}"/compiz-xfce-{'autostart-setup','uninstall-helper'}.desktop \
+ install -Dm644 "$srcdir"/compiz-xfce-{'autostart-setup','uninstall-helper'}.desktop \
-t "${pkgdir}/etc/xdg/autostart/"
}
+
+# execute
+_main_package