Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra/polkit-duktape/PKGBUILD
blob: d2898e2acbb9a8df55fdc4d997ea4af9c96ae919 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Maintainer: Jan de Groot <jgc@archlinux.org>

_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" <<END
u polkitd 102 "PolicyKit daemon"
m polkitd proc
END
}

# vim: ts=2 sw=2 et: