summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 819dd4fb9f88737f5116b6136e6b319b428a535e (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
# Maintainer: Igor Dyatlov <dyatlov.igor@protonmail.com>

pkgname=gnome-shell-extension-nightthemeswitcher
pkgver=77
pkgrel=1
pkgdesc="Automatically toggle your light and dark themes variants"
arch=('any')
url="https://gitlab.com/rmnvgr/nightthemeswitcher-gnome-shell-extension"
license=('GPL3')
groups=('gnome-shell-extensions')
depends=('gnome-shell>=1:46')
makedepends=('git' 'glib2' 'npm' 'meson')
checkdepends=('reuse' 'eslint')
source=($pkgname::git+$url.git#tag=$pkgver)
b2sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

build() {
  cd $pkgname
  export npm_config_cache="$srcdir/npm_cache"
  npm install

  arch-meson . build
  meson compile -C build
}

check() {
  cd $pkgname
  meson test -C build --print-errorlogs || :
}

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