From fa7b702dbc758a3f03276daebc78d3a4f5df555a Mon Sep 17 00:00:00 2001 From: Leleat Date: Wed, 18 Oct 2023 13:55:06 +0200 Subject: [PATCH] scripts: Update PKGBUILD to compile completely from source Closes https://github.com/Leleat/Tiling-Assistant/issues/296 --- scripts/aur-build/PKGBUILD | 57 +++++++++++++++++++------------------- scripts/release.sh | 2 +- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/scripts/aur-build/PKGBUILD b/scripts/aur-build/PKGBUILD index 53b14a5..c5c375a 100644 --- a/scripts/aur-build/PKGBUILD +++ b/scripts/aur-build/PKGBUILD @@ -1,39 +1,40 @@ -# Maintainer: Leleat -pkgname='gnome-shell-extension-tiling-assistant' +# Contributor: VeldoraTheDragon <127216238+VeldoraTheDragon@users.noreply.github.com> + +pkgname=gnome-shell-extension-tiling-assistant pkgver=44 pkgrel=1 pkgdesc="A GNOME Shell extension to expand GNOME's native 2 column design." -arch=('x86_64') +arch=('any') url="https://github.com/Leleat/Tiling-Assistant" -license=('GPL') -depends=('gnome-shell>=40') -install='INSTALL' -source=("${url}/archive/refs/tags/v${pkgver}.tar.gz") -noextract=("*tiling-assistant@leleat-on-github*") -md5sums=('SKIP') +license=('GPL2') +depends=('gnome-shell') +makedepends=('gettext') +provides=("${pkgname}") +conflicts=("${pkgname}") +source=("${pkgname}::git+https://github.com/Leleat/Tiling-Assistant.git#commit=b1daf9d58b82d190ba5d2801ce32eda25f96bad4") +sha256sums=('SKIP') + +_uuid="tiling-assistant@leleat-on-github" + +prepare() { + install -dm755 "${srcdir}/${pkgname}/${_uuid}/locale" +} build() { - # cd into repo dir - cd "${srcdir}/Tiling-Assistant-${pkgver}" + cd "${srcdir}/${pkgname}/${_uuid}" + + # compile gschema + glib-compile-schemas ./schemas/ - # package extension to compile settings and translations - gnome-extensions pack tiling-assistant@leleat-on-github \ - --force \ - --podir="../translations" \ - --extra-source="src" \ - --extra-source="media" + # compile tl + for FILE in ${srcdir}/${pkgname}/translations/*.po; do + LANG=$(basename "$FILE" .po) + mkdir -p "${srcdir}/${pkgname}/${_uuid}/locale/$LANG/LC_MESSAGES" + msgfmt -c "$FILE" -o "${srcdir}/${pkgname}/${_uuid}/locale/$LANG/LC_MESSAGES/${_uuid}.mo" + done } package() { - # cd into repo dir - cd "${srcdir}/Tiling-Assistant-${pkgver}" - - # instead of using gnome-extensions to install the extension package - # unzip to $pkgdir/usr/share/gnome-shell/extensions/ since gnome-extensions - # installs the extension locally while on Arch it seems like /usr/ is the - # convention - _UUID="tiling-assistant@leleat-on-github" - mkdir -p "${pkgdir}/usr/share/gnome-shell/extensions" - unzip ${_UUID}.shell-extension.zip \ - -d "${pkgdir}/usr/share/gnome-shell/extensions/${_UUID}" + install -dm755 "${pkgdir}/usr/share/gnome-shell/extensions" + cp -r "${srcdir}/${pkgname}/${_uuid}" "${pkgdir}/usr/share/gnome-shell/extensions/${_uuid}" } diff --git a/scripts/release.sh b/scripts/release.sh index 733149e..a608f1d 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -53,5 +53,5 @@ echo echo TODO: echo echo [] Push release branch and and create pull request -echo [] Create and push tag +echo [] Create and push tag, Update PKGBUILD with new commit echo [] Upload the extension to EGO