summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schendel2023-03-27 20:15:58 +0200
committerChristian Schendel2023-03-27 20:15:58 +0200
commit358f57a5ea6567af7e41d7de4ee319f9537ee6a7 (patch)
treebb741e88a54093e2c56511d1c467e13318ad86f0
parentfcf1de3e894cc50a59daf7fcafefe946ba03ba94 (diff)
downloadaur-358f57a5ea6567af7e41d7de4ee319f9537ee6a7.tar.gz
Almost complete rewrite of PKGBUILD:
remove .install file remove glib2 makedepends add zip to makedepends (for a clean chroot build) remove stripping move gschema xml to /usr/share/glib-2.0/schemas/ move locale to /usr/share/locale/ move README.md to /usr/share/doc/ move LICENCE to /usr/share/licenses/
-rw-r--r--.SRCINFO10
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD46
-rw-r--r--gnome-shell-extension-gnome-clipboard-history-git.install30
4 files changed, 33 insertions, 54 deletions
diff --git a/.SRCINFO b/.SRCINFO
index aff23dde4f8b..43813877ef0c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,17 @@
pkgbase = gnome-shell-extension-gnome-clipboard-history-git
pkgdesc = Gnome Clipboard History is a Gnome extension that saves what you've copied into an easily accessible, searchable history panel.
- pkgver = 37.r220.g348685b
- pkgrel = 2
+ pkgver = 37.r228.g51a9e18
+ pkgrel = 1
url = https://github.com/SUPERCILEX/gnome-clipboard-history
- install = gnome-shell-extension-gnome-clipboard-history-git.install
arch = any
license = MIT
makedepends = git
- makedepends = glib2
+ makedepends = zip
depends = gnome-shell>=1:40
provides = gnome-shell-extension-gnome-clipboard-history
+ conflicts = gnome-shell-extension-gnome-clipboard-history
conflicts = gnome-shell-extension-clipboard-indicator-git
- options = !strip
+ conflicts = gnome-shell-extension-clipboard-indicator
source = gnome-shell-extension-gnome-clipboard-history::git+https://github.com/SUPERCILEX/gnome-clipboard-history.git
sha256sums = SKIP
diff --git a/.gitignore b/.gitignore
index 71c77ca06f0d..b39f3b2a183f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,3 @@
!PKGBUILD
!.gitignore
!.SRCINFO
-!gnome-shell-extension-gnome-clipboard-history-git.install
diff --git a/PKGBUILD b/PKGBUILD
index 9ef9b04eb07c..9c1d35683d05 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,17 @@
# Maintainer: Christian Schendel <doppelhelix@gmail.com>
pkgname=gnome-shell-extension-gnome-clipboard-history-git
-pkgver=37.r220.g348685b
-pkgrel=2
+pkgver=37.r228.g51a9e18
+pkgrel=1
pkgdesc="Gnome Clipboard History is a Gnome extension that saves what you've copied into an easily accessible, searchable history panel."
arch=('any')
url="https://github.com/SUPERCILEX/gnome-clipboard-history"
-install="${pkgname}.install"
license=('MIT')
depends=('gnome-shell>=1:40')
makedepends=('git'
- 'glib2')
+ 'zip')
provides=("${pkgname%-git}")
-conflicts=('gnome-shell-extension-clipboard-indicator-git')
-options=('!strip')
+conflicts=("${pkgname%-git}" "gnome-shell-extension-clipboard-indicator-git" "gnome-shell-extension-clipboard-indicator")
source=("${pkgname%-git}::git+${url}.git")
sha256sums=('SKIP')
@@ -25,20 +23,32 @@ pkgver() {
)
}
+build() {
+ cd "$(dirname $(find -name 'metadata.json' -print -quit))"
+ make bundle
+}
+
package() {
- cd "${srcdir}/${pkgname%-git}"
- make compile-locales
+ cd "$(dirname $(find -name 'metadata.json' -print -quit))"
+
local uuid=$(grep -Po '(?<="uuid": ")[^"]*' metadata.json)
local schema=org.gnome.shell.extensions.clipboard-indicator.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)$" -exec\
- install -Dm 644 {} ${destdir}/{} \;
- install -Dm644 "${srcdir}/${pkgname%-git}/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
-}
+ install -d "$pkgdir/usr/share/gnome-shell/extensions/${uuid}"
+ bsdtar -xvf "bundle.zip" -C \
+ "$pkgdir/usr/share/gnome-shell/extensions/${uuid}/"
+
+ install -Dm644 "$destdir/schemas/$schema" -t \
+ "$pkgdir/usr/share/glib-2.0/schemas/"
+ rm -rf "$pkgdir/usr/share/gnome-shell/extensions/${uuid}/schemas/"
+
+ cp -r "$pkgdir/usr/share/gnome-shell/extensions/${uuid}/locale" "$pkgdir/usr/share/"
+ rm -rf "$pkgdir/usr/share/gnome-shell/extensions/${uuid}/locale/"
+
+ install -Dm644 "$pkgdir/usr/share/gnome-shell/extensions/${uuid}/LICENSE" -t "$pkgdir/usr/share/licenses/${pkgname}"
+ rm -f "$pkgdir/usr/share/gnome-shell/extensions/${uuid}/LICENSE"
+
+ install -Dm644 "$pkgdir/usr/share/gnome-shell/extensions/${uuid}/README.md" -t "$pkgdir/usr/share/doc/${pkgname}"
+ rm -f "$pkgdir/usr/share/gnome-shell/extensions/${uuid}/README.md"
+}
diff --git a/gnome-shell-extension-gnome-clipboard-history-git.install b/gnome-shell-extension-gnome-clipboard-history-git.install
deleted file mode 100644
index 7f4546e45017..000000000000
--- a/gnome-shell-extension-gnome-clipboard-history-git.install
+++ /dev/null
@@ -1,30 +0,0 @@
-post_install() {
- /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/
- instructions_install
-}
-
-post_upgrade() {
- /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/
- instructions_upgrade
-}
-
-post_remove() {
- /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/
-}
-
-instructions_install() {
- /bin/cat << EOF
-
-Restart GNOME Shell ([Alt]+[F2], r).
-Activate the extension with gnome-tweak-tool.
-
-EOF
-}
-
-instructions_upgrade() {
- /bin/cat << EOF
-
-Restart GNOME Shell ([Alt]+[F2], r) to load the upgraded extension.
-
-EOF
-}