summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9502cee4d0795e66306403eeeb2c82da328849db (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=gnome-shell-extension-tweaks-system-menu-git
_uuid=tweaks-system-menu@extensions.gnome-shell.fifi.org
pkgver=19.r0.g15d8650
pkgrel=1
pkgdesc="GNOME Shell Extension to put Gnome Tweaks in the system menu."
arch=('any')
url="https://github.com/F-i-f/tweaks-system-menu"
license=('GPL-3.0-or-later')
depends=('gnome-shell')
makedepends=('git' 'meson')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/F-i-f/tweaks-system-menu.git'
        'git+https://github.com/F-i-f/meson-gse.git')
sha256sums=('SKIP'
            'SKIP')

pkgver() {
  cd tweaks-system-menu
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd tweaks-system-menu
  git submodule init
  git config submodule.meson-gse.url "$srcdir/meson-gse"
  git -c protocol.file.allow=always submodule update

  sed -i "s/home + '\/.local/'\/usr/g" meson.build meson-gse/meson.build.m4
}

build() {
  arch-meson tweaks-system-menu build
  meson compile -C build
}

package() {
  meson install -C build --destdir "$pkgdir"

  cd tweaks-system-menu
  install -Dm644 "schemas/org.gnome.shell.extensions.tweaks-system-menu.gschema.xml" -t \
    "$pkgdir/usr/share/glib-2.0/schemas/"

  mv "$pkgdir/usr/share/gnome-shell/extensions/${_uuid}/locale" "$pkgdir/usr/share"

  rm -rf "$pkgdir/usr/share/gnome-shell/extensions/${_uuid}/schemas"
}