summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4c5b7ba0df73238347fa02abb9f756c35436cf4d (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
49
# Maintainer: Ewout van Mansom <ewout@vanmansom.name>

_extname=bedtime-mode
_reponame=gnome-bedtime-mode
_uuid=gnomebedtime@ionutbortis.gmail.com
pkgname=gnome-shell-extension-bedtime-mode
pkgver=v13.0
pkgrel=1
pkgdesc='Converts to grayscale the entire GNOME workspace by using a smooth transition.'
arch=('any')
url='https://github.com/ionutbortis/gnome-bedtime-mode'
license=('GPL3')
groups=('gnome-shell-extensions')
depends=('gnome-shell>=1:43')
makedepends=('git' 'glib2' 'unzip')
_commit=a6cd7636488dcca7a22b227bd862932410a1f602  # main^0
source=(
  "git+${url}.git#commit=${_commit}"
)
b2sums=('SKIP')

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

build() {
  cd "${srcdir}/${_reponame}"
  ./scripts/build.sh
}

package() {
  cd "${srcdir}/${_reponame}"

  install -d "$pkgdir/usr/share/gnome-shell/extensions/$_uuid"
  install -d "$pkgdir/usr/share/glib-2.0/schemas"

  # copy extension schema to system-wide glib-2.0 location
  cp -r src/schemas/*gschema.* "$pkgdir/usr/share/glib-2.0/schemas"

  unzip build/"$_reponame"_13.0.zip -d "$pkgdir/usr/share/gnome-shell/extensions/$_uuid"

  # remove redundant gschema, as it available to glib-2.0 system wide
  rm "$pkgdir/usr/share/gnome-shell/extensions/$_uuid/schemas/org.gnome.shell.extensions.bedtime-mode.gschema.xml"
  rm "$pkgdir/usr/share/gnome-shell/extensions/$_uuid/schemas/gschemas.compiled"
  rmdir "$pkgdir/usr/share/gnome-shell/extensions/$_uuid/schemas"

  chown root:root -R "$pkgdir/usr/share/gnome-shell/extensions/$_uuid"
}