From 5947a9d4fad95c84271d4bb8c2301d2a7d2f64fa Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Mon, 26 Apr 2021 17:24:27 +0200 Subject: extra/polkit-duktape: for i486 only replacing mozjs78-baed polkit --- extra/polkit-duktape/PKGBUILD | 65 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 extra/polkit-duktape/PKGBUILD (limited to 'extra/polkit-duktape/PKGBUILD') diff --git a/extra/polkit-duktape/PKGBUILD b/extra/polkit-duktape/PKGBUILD new file mode 100644 index 00000000..d2898e2a --- /dev/null +++ b/extra/polkit-duktape/PKGBUILD @@ -0,0 +1,65 @@ +# Maintainer: Jan de Groot + +_pkgname=polkit +pkgname=${_pkgname}-duktape +pkgver=0.118 +pkgrel=3 +pkgdesc="polkit with duktape as the javascript engine" +arch=(x86_64) +license=(LGPL) +url="https://www.freedesktop.org/wiki/Software/polkit/" +depends=(glib2 pam expat systemd duktape) +makedepends=(intltool gtk-doc gobject-introspection git autoconf-archive) +conflicts=(polkit) +provides=(polkit) +backup=(etc/pam.d/polkit-1) +_commit=ff4c2144f0fb1325275887d9e254117fcd8a1b52 +source=("git+https://gitlab.freedesktop.org/polkit/polkit.git#commit=$_commit" + "0001-Add-duktape-as-javascript-engine.patch") +sha256sums=('SKIP' + '4b6b90ca0f2fa44115027cc6bb98fa43fede46e7fa31a6fd52f8ec142c0073f1') + +pkgver() { + cd $_pkgname + git describe --tags | sed 's/-/+/g' +} + +prepare() { + cd $_pkgname + patch -p1 -i ../0001-Add-duktape-as-javascript-engine.patch + NOCONFIGURE=1 ./autogen.sh +} + +build() { + cd $_pkgname + + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --libexecdir=/usr/lib \ + --enable-libsystemd-login=yes --disable-static \ + --enable-gtk-doc --with-os-type=redhat --with-duktape + + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + + make +} + +check() { + cd $_pkgname + make -k check || : +} + +package() { + cd $_pkgname + make DESTDIR="$pkgdir" install \ + dbusconfdir=/usr/share/dbus-1/system.d \ + rulesdir=/usr/share/polkit-1/rules.d + + install -d -o root -g 102 -m 750 "$pkgdir"/{etc,usr/share}/polkit-1/rules.d + + install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" <