summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 25d5f5b392f4e2f3ca1c2b343fb6b3da5410ae73 (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=gnome-shell-extension-display-brightness-ddcutil-git
_uuid=display-brightness-ddcutil@themightydeity.github.com
pkgver=r164.4ef77a8
pkgrel=2
pkgdesc="Display brightness slider for gnome shell using ddcutil backend"
arch=('any')
url="https://github.com/daitj/gnome-display-brightness-ddcutil"
license=('GPL3')
depends=('ddcutil' 'gnome-shell<=1:44.6')
makedepends=('git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/daitj/gnome-display-brightness-ddcutil.git')
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/gnome-display-brightness-ddcutil"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir/gnome-display-brightness-ddcutil"
  make
}

package() {
  cd "$srcdir/gnome-display-brightness-ddcutil"
  install -d "$pkgdir/usr/share/gnome-shell/extensions/${_uuid}"
  bsdtar xvf "dist/${_uuid}.shell-extension.zip" -C \
    "$pkgdir/usr/share/gnome-shell/extensions/${_uuid}/"

  install -Dm644 README.md screenshot.jpg -t "$pkgdir/usr/share/doc/${pkgname%-git}/"

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

  install -Dm644 "${_uuid}/schemas/org.gnome.shell.extensions.display-brightness-ddcutil.gschema.xml" -t \
    "$pkgdir/usr/share/glib-2.0/schemas/"
  rm -rf "$pkgdir/usr/share/gnome-shell/extensions/${_uuid}/schemas"
}