NAME="polkit"
DESC="Toolkit for defining and handling authorizations"
VERSION="123"
FILES=("https://gitlab.freedesktop.org/polkit/polkit/-/archive/$VERSION/polkit-$VERSION.tar.gz")
HASHES=("36540b837c588e1e77145523bb39f511")
DEPENDS=(
  "glib" "duktape" "gobject-introspection"
  "libxslt" "linux-pam" "systemd"
)

PACKAGE() {
  tar xf $NAME-$VERSION.tar.gz
  cd $NAME-$VERSION

  mkdir build
  cd    build

  meson setup ..                          \
      --prefix=/usr                       \
      --buildtype=release                 \
      -Dman=true                          \
      -Dsession_tracking=libsystemd-login \
      -Dtests=true                       
  ninja && DESTDIR="$ROOTDIR" ninja install

  cd ../.. && rm -r $NAME-$VERSION
}

INSTALL(){
  groupadd -fg 27 polkitd
  useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27         -g polkitd -s /bin/false polkitd
  exit 0
}
