summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorShadowKyogre2016-05-07 12:15:02 -0700
committerShadowKyogre2016-05-07 14:49:53 -0700
commitaf4142f182be40ae4f839eec87ed9ad8250af4d3 (patch)
tree72bd7c96a8e871c945ff10a811607fa91fc9cf44 /PKGBUILD
parent145e9a14e1fb64c704e57e4a22603b1285893250 (diff)
downloadaur-af4142f182be40ae4f839eec87ed9ad8250af4d3.tar.gz
PKGBUILD shouldn't fail on not building gtk deco
However, compiz-gtk-git shouldn't be created if gtk2's missing. Also, add .gitignore for easier maintenance
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD42
1 files changed, 35 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index aa1bd5946896..493f568f06de 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@ _upstream="compiz"
pkgbase=compiz-core-git
pkgname=(compiz-core-git compiz-gtk-git)
pkgver=0.8.12.3.r0.g59328f2
-pkgrel=1
+pkgrel=2
pkgdesc="This is the latest git release of Compiz without DE deps"
url="https://github.com/compiz-reloaded/${_upstream}"
license=('GPL' 'LGPL' 'MIT')
@@ -54,6 +54,12 @@ build()
NOCONFIGURE=1 ./autogen.sh
./configure "${_configure_opts[@]}"
+ if ! grep -q pkg_cv_GTK config.log;then
+ # make sure only compiz-core-git is created if gtk is missing
+ msg "Making sure only $pkgbase is made, gtk+2 is missing"
+ pkgname=("$pkgbase")
+ fi
+
make
}
@@ -65,9 +71,19 @@ package_compiz-core-git() {
conflicts=('compiz' 'compiz-core')
make DESTDIR="$pkgdir" install
- rm "${pkgdir}/usr/bin/gtk-window-decorator"
- rm "${pkgdir}/usr/share/glib-2.0/schemas/org.compiz-0.gwd.gschema.xml"
- rm "${pkgdir}/usr/share/icons/hicolor/"*"/apps/gtk-decorator."*
+
+ local REMOVE_THESE=(
+ "${pkgdir}/usr/bin/gtk-window-decorator"
+ "${pkgdir}/usr/share/glib-2.0/schemas/org.compiz-0.gwd.gschema.xml"
+ "${pkgdir}/usr/share/icons/hicolor/"*"/apps/gtk-decorator."*
+ )
+ # Believe it or not, you CAN fill an array using wildcards in bash
+
+ for fname in "${REMOVE_THESE[@]}";do
+ if [ -e "$fname" ];then
+ rm "$fname"
+ fi
+ done
}
package_compiz-gtk-git()
@@ -75,6 +91,8 @@ package_compiz-gtk-git()
if (("${_use_marco}"));then
#separating libmarco-private would be nice, but this is a workaround for now
depends+=('marco')
+ else
+ depends+=('gtk2')
fi
pkgdesc+=" (GTK+ window decorator)"
provides=("compiz-gtk=$pkgver")
@@ -82,10 +100,20 @@ package_compiz-gtk-git()
cd "${srcdir}/${_upstream}/gtk"
make DESTDIR="${pkgdir}" install
- rm "${pkgdir}/usr/share/applications/compiz.desktop"
cd "${srcdir}/${_upstream}/images"
make DESTDIR="${pkgdir}" install
- rm "${pkgdir}/usr/share/icons/hicolor/"*"/apps/compiz."*
- rm "${pkgdir}/usr/share/compiz/"*.png
+
+ local REMOVE_THESE=(
+ "${pkgdir}/usr/share/icons/hicolor/"*"/apps/compiz."*
+ "${pkgdir}/usr/share/compiz/"*.png
+ "${pkgdir}/usr/share/applications/compiz.desktop"
+ )
+ # Believe it or not, you CAN fill an array using wildcards in bash
+
+ for fname in "${REMOVE_THESE[@]}";do
+ if [ -e "$fname" ];then
+ rm "$fname"
+ fi
+ done
}