# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Christopher Reimer <mail@c-reimer.de>
# Contributor: Dimitris Kiziridis <ragouel@outlook.com>
# Contributor: Dan Beste <dan.ray.beste@gmail.com>
# Contributor: Carl George <carl@george.computer>

pkgname=pop-gtk-theme
pkgver=5.5.1.r7.25ea85d9
pkgrel=2
pkgdesc='System76 Pop GTK+ Theme'
arch=(any)
url=https://github.com/pop-os/gtk-theme
license=(
  CCPL
  GPL3
  LGPL2.1
  LGPL3
)
makedepends=(
  git
  meson
  sassc
)
optdepends=(
  'ttf-fira-mono: Recommended monospace font'
  'ttf-fira-sans: Recommended interface font'
)
_commit=25ea85d97126992024b03bfb4e4c3b0711c749ed
source=(pop-gtk-theme::git+https://github.com/pop-os/gtk-theme.git#commit=${_commit})
b2sums=('f56e7ce19f1c22b5f291cc5a95ee574d01337246f9fe72c681161912e4a10a218794253f3a40aada4702b25d82073993c36b160104b14b259e9f805f9ad7ea75')

pkgver() {
  cd pop-gtk-theme
  git describe --tags | sed 's/^v//;s/-/.r/;s/-g/./'
}

build() {
  arch-meson pop-gtk-theme build
  meson compile -C build
}

package() {
  DESTDIR="${pkgdir}" meson install -C build
  # https://github.com/pop-os/gtk-theme/issues/436
  ln -s /usr/share/gnome-shell/theme/Pop-dark "${pkgdir}"/usr/share/themes/Pop-dark/gnome-shell
}

# vim: ts=2 sw=2 et:
