diff options
author | Christian Schendel | 2023-03-27 20:15:58 +0200 |
---|---|---|
committer | Christian Schendel | 2023-03-27 20:15:58 +0200 |
commit | 358f57a5ea6567af7e41d7de4ee319f9537ee6a7 (patch) | |
tree | bb741e88a54093e2c56511d1c467e13318ad86f0 /PKGBUILD | |
parent | fcf1de3e894cc50a59daf7fcafefe946ba03ba94 (diff) | |
download | aur-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/
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 46 |
1 files changed, 28 insertions, 18 deletions
@@ -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" +} |