diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 104 |
1 files changed, 74 insertions, 30 deletions
@@ -1,47 +1,91 @@ -# Maintainer: Llewelyn Trahaearn <WoefulDerelict at GMail dot com> -# Contributor: Janne Haapsaari <haaja at iki dot fi> -# Contributor: Christopher Krooß <didi2002 at web dot de> +# Maintainer: XZS <d dot f dot fischer at web dot de> +# Contributor: Llewelyn Trahaearn <WoefulDerelict at GMail dot com> +# Contributor: Janne Haapsaari <haaja@iki.fi> +# Contributor: Christopher Krooß <didi2002 at web.de> +# This PKGBUILD is maintained on GitHub <https://github.com/dffischer/gnome-shell-extensions>. +# You may find it convenient to file issues and pull requests there. pkgname=gnome-shell-extension-dash-to-dock-git -pkgver=46.r10.gaa1720b +pkgver=46.r15.gc28e564 pkgrel=1 -pkgdesc="Extends the dash, transforming it into an intellihide dock." +pkgdesc="A gnome-shell extension that transforms the dash into an intellihide dock" arch=('any') -url="https://github.com/micheleg/dash-to-dock/" +url="https://micheleg.github.io/dash-to-dock/" +_giturl="git+https://github.com/micheleg/dash-to-dock/" license=('GPL') depends=('dconf') -makedepends=('git' 'gnome-common' 'intltool') -provides=('gnome-shell-extension-dash-to-dock') -conflicts=('gnome-shell-extensions-git' 'gnome-shell-extension-dash-to-dock') -install="gschemas.install" -source=("${pkgname}::git+https://github.com/micheleg/dash-to-dock.git") -sha512sums=('SKIP') -_branch=master +makedepends=('intltool') +makedepends+=('git') +source+=("${_gitname:=${pkgname%-git}}::${_giturl:-git+$url}") +md5sums+=('SKIP') +provides+=($_gitname) +conflicts+=($_gitname) pkgver() { - cd "${srcdir}/${pkgname}" - git checkout ${_branch} --quiet - ( set -o pipefail - git describe --long --tags 2>/dev/null | sed 's/^extensions.gnome.org.v//;s/\([^-]*-g\)/r\1/;s/-/./g' || - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" - ) + cd ${_gitname:-$pkgname} + git describe --long --tags 2>/dev/null | sed 's/[^[:digit:]]*\(.\+\)-\([[:digit:]]\+\)-g\([[:xdigit:]]\{7\}\)/\1.r\2.g\3/;t;q1' + [ ${PIPESTATUS[0]} -ne 0 ] && \ +printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } +depends[gnomeshell]=gnome-shell -prepare() { - cd "${srcdir}/${pkgname}" - git checkout ${_branch} - sed -i 's/INSTALLBASE = ~\/.local\/share\/gnome-shell\/extensions/INSTALLBASE = ${DESTDIR}/' Makefile +package_20_version() { + local compatibles=($(\ + find -path ./pkg -type d -prune -o \ + -name metadata.json -exec grep -Pzo '(?s)(?<="shell-version": \[)[^\[\]]*(?=\])' '{}' \; | \ + tr '\n," ' '\n' | sed 's/3\.//g;/^$/d' | sort -n -t. -k 1,1)) + depends+=("gnome-shell>=3.${compatibles[0]}") + local max="${compatibles[-1]}" + if [ "3.$max" != $( + gnome-shell --version | grep -Po '(?<=GNOME Shell 3\.)[[:digit:]]+' + ) ]; then + depends+=("gnome-shell<3.$((${max%%.*} + 1))") + fi + unset depends[gnomeshell] } build() { - cd "${srcdir}/${pkgname}" - make + cd "$_gitname" + make _build } package() { - cd "${srcdir}/${pkgname}" - mkdir -p "${pkgdir}/usr/share/gnome-shell/extensions" "${pkgdir}/usr/share/glib-2.0/schemas/" - make DESTDIR="${pkgdir}/usr/share/gnome-shell/extensions" install - install -m644 "schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml" \ - "${pkgdir}/usr/share/glib-2.0/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml" + for function in $(declare -F | grep -Po 'package_[[:digit:]]+[[:alpha:]_]*$') + do + $function + done +} +package_01_locate() { + msg2 'Locating extension...' + cd "$(dirname $(find -name 'metadata.json' -print -quit))" + extname=$(grep -Po '(?<="uuid": ")[^"]*' metadata.json) + destdir="$pkgdir/usr/share/gnome-shell/extensions/$extname" +} + +package_02_install() { + msg2 'Installing extension code...' + find -maxdepth 1 \( -iname '*.js*' -or -iname '*.css' -or -iname '*.ui' \) -exec install -Dm644 -t "$destdir" '{}' + +} +if [ -z "$install" ] +then + install=gschemas.install +fi + +package_10_schemas() { + msg2 'Installing schemas...' + find -name '*.xml' -exec install -Dm644 -t "$pkgdir/usr/share/glib-2.0/schemas" '{}' + +} +package_10_locale() { + msg2 'Installing translations...' + ( + cd locale + for locale in */ + do + install -Dm644 -t "$pkgdir/usr/share/locale/$locale/LC_MESSAGES" "$locale/LC_MESSAGES"/*.mo + done + ) +} + +package_09_media() { + cp -r --no-preserve=ownership,mode media "$destdir" } |