added extra/polkit

This commit is contained in:
Kevin Mihelich 2015-06-14 02:25:42 +00:00
parent 68acc2dab2
commit f87f82a6b3
3 changed files with 64 additions and 0 deletions

37
extra/polkit/PKGBUILD Normal file
View file

@ -0,0 +1,37 @@
# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - moved rules.d directory ownership to polkit.install
pkgname=polkit
pkgver=0.112
pkgrel=2.1
pkgdesc="Application development toolkit for controlling system-wide privileges"
arch=(i686 x86_64)
license=(LGPL)
url="http://www.freedesktop.org/wiki/Software/polkit"
depends=(glib2 pam expat systemd js17)
makedepends=(intltool gtk-doc gobject-introspection)
install=polkit.install
source=(http://www.freedesktop.org/software/polkit/releases/$pkgname-$pkgver.tar.gz
polkit.pam)
build() {
cd $pkgname-$pkgver
./configure --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var --libexecdir=/usr/lib/polkit-1 \
--enable-libsystemd-login=yes --disable-static \
--enable-gtk-doc
make
}
package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
install -m644 "$srcdir/polkit.pam" "$pkgdir/etc/pam.d/polkit-1"
}
md5sums=('b0f2fa00a55f47c6a5d88e9b73f80127'
'6564f95878297b954f0572bc1610dd15')

View file

@ -0,0 +1,20 @@
post_install() {
getent group polkitd >/dev/null || groupadd -g 102 polkitd
getent passwd polkitd >/dev/null || useradd -c 'Policy Kit Daemon' -u 102 -g polkitd -d '/' -s /bin/false polkitd
passwd -l polkitd &>/dev/null
chown 102 "$pkgdir/etc/polkit-1/rules.d"
chown 102 "$pkgdir/usr/share/polkit-1/rules.d"
}
post_upgrade() {
post_install
}
post_remove() {
if getent passwd polkitd >/dev/null; then
userdel polkitd
fi
if getent group polkitd >/dev/null; then
groupdel polkitd
fi
}

7
extra/polkit/polkit.pam Normal file
View file

@ -0,0 +1,7 @@
auth requisite pam_nologin.so
auth required pam_env.so
auth required pam_unix.so
account required pam_unix.so
session required pam_limits.so
session required pam_unix.so
password required pam_unix.so