summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorChristian Schendel2022-08-27 11:51:38 +0200
committerChristian Schendel2022-08-27 11:51:38 +0200
commit2dafcef239b83612bd3a4ce85a42853b7e6c2f9c (patch)
treea940f98b744c58245133e03c7da795e5cb64dcb4 /PKGBUILD
downloadaur-2dafcef239b83612bd3a4ce85a42853b7e6c2f9c.tar.gz
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD54
1 files changed, 54 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3159eb07d698
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer: Christian Schendel (doppelhelix@gmail.com)
+
+pkgname=gnome-shell-extension-pano-git
+pkgver=3.r0.gb93936f
+pkgrel=1
+pkgdesc="Next-gen Clipboard Manager"
+arch=('any')
+url="https://github.com/oae/gnome-shell-pano"
+install=${pkgname%-git}.install
+license=('GPL')
+groups=('gnome-shell-extensions')
+depends=('gnome-shell>=42')
+makedepends=('git'
+ 'glib2'
+ 'yarn'
+ 'appstream')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=("${pkgname%-git}::git+${url}.git")
+options=('!strip')
+md5sums=('SKIP')
+
+pkgver() {
+ cd "${srcdir}/${pkgname%-git}"
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "${srcdir}/${pkgname%-git}"
+ yarn install
+}
+
+build() {
+ cd "${srcdir}/${pkgname%-git}"
+ yarn build
+
+}
+
+package() {
+ cd "${srcdir}/${pkgname%-git}/dist"
+ local uuid=$(grep -Po '(?<="uuid": ")[^"]*' metadata.json)
+ local schema=org.gnome.shell.extensions.extensions-sync.gschema.xml
+ local destdir="${pkgdir}/usr/share/gnome-shell/extensions/${uuid}"
+ install -dm755 "${destdir}"
+ find . -regextype posix-egrep -regex ".*\.(js|json|xml|css|mo|compiled|svg|png)$" -exec\
+ install -Dm 644 {} ${destdir}/{} \;
+ install -Dm644 "${srcdir}/${pkgname%-git}/dist/schemas/${schema}" \
+ "${pkgdir}/usr/share/glib-2.0/schemas/${schema}"
+# rebuild compiled GSettings schemas if missing
+ if [[ ! -f "${destdir}/schemas/gschemas.compiled" ]]; then
+ glib-compile-schemas "${destdir}/schemas"
+ fi
+}
+