# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=switchboard-plug-parental-controls
pkgver=2.1.5
pkgrel=2
pkgdesc='Switchboard Parental Controls Plug'
arch=(x86_64)
url=https://github.com/elementary/switchboard-plug-parental-controls
license=(GPL3)
groups=(pantheon)
depends=(
  accountsservice
  gdk-pixbuf2
  glib2
  gtk3
  libgee
  libgranite.so
  libswitchboard-2.0.so
  polkit
)
makedepends=(
  git
  meson
  vala
)
source=(git+https://github.com/elementary/switchboard-plug-parental-controls.git#tag=${pkgver})
sha256sums=(SKIP)

prepare() {
  cd switchboard-plug-parental-controls

  git cherry-pick -n 4bcc9d40aba87b96e01c25ae29831dbf3148ca7e
  git cherry-pick -n 9ef9b91c58df6026d90b2a9e4583daf057029e94
  sed "s/dbus_dep.get_pkgconfig_variable('sysconfdir')/dbus_dep.get_pkgconfig_variable('datadir')/" -i data/meson.build
}

build() {
  arch-meson switchboard-plug-parental-controls build
  ninja -C build
}

package() {
  DESTDIR="${pkgdir}" ninja -C build install
}

# vim: ts=2 sw=2 et:
