blob: 0b74fc69cf94987dd735d06acb630dccd27353fc (
plain)
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
|
# Maintainer: Christian Schendel <doppelhelix at gmail dot com>
pkgname=gnome-shell-extension-useless-gaps-git
pkgver=8.r35.g8968946
pkgrel=1
pkgdesc="Useless Gaps is a GNOME Shell Extension which for aesthetic purposes adds 'useless gaps' around windows."
arch=(any)
url="https://github.com/mipmip/gnome-shell-extensions-useless-gaps"
license=(
GPL-3.0-or-later
)
depends=(
'gnome-shell>=1:45'
)
makedepends=(
gettext
git
glib2
)
conflicts=("${pkgname%-git}")
provides=("${pkgname%-git}")
source=("${pkgname%-git}::git+$url.git")
sha256sums=('SKIP')
pkgver() {
cd "${pkgname%-git}"
# support repositories that start without a tag but get tagged later on
(
set -o pipefail
git describe --long 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}
build() {
cd "${pkgname%-git}"
mkdir build
gnome-extensions pack src \
--force \
--podir="../po" \
--extra-source="ui.js" \
--extra-source="../LICENSE" \
--extra-source="../CHANGELOG.md" \
--out-dir=build
}
package() {
local uuid
local schema
local destdir
cd "$srcdir/${pkgname%-git}/src"
uuid=$(grep -Po '(?<="uuid": ")[^"]*' metadata.json)
schema=$(grep -Po '(?<="settings-schema": ")[^"]*' metadata.json).gschema.xml
destdir="$pkgdir/usr/share/gnome-shell/extensions/$uuid"
cd "$srcdir/${pkgname%-git}/build"
bsdtar -xf "$uuid.shell-extension.zip" -C .
rm "$uuid.shell-extension.zip"
rm LICENSE
install -Dm0644 -t "$pkgdir/usr/share/doc/${pkgname%-git}" CHANGELOG.md
rm CHANGELOG.md
install -Dm644 "schemas/$schema" \
"$pkgdir/usr/share/glib-2.0/schemas/$schema"
rm -r schemas
install -dm755 "$destdir"
cp --preserve=mode -r ./* "$destdir"
}
# vim: set ts=4 sw=4 et:
|