summaryrefslogtreecommitdiff
path: root/pcr/consolekit/PKGBUILD
blob: 8b2ee8bdf402b8bb622b5987c8432ad61281f086 (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
66
67
# Maintainer (Manjaro): artoo <artoo@manjaro.org>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

_pkgname=ConsoleKit2

pkgname=consolekit
pkgver=1.0.0
pkgrel=3
pkgdesc="A framework for defining and tracking users, login sessions, and seats"
arch=('i686' 'x86_64' 'armv7h')
url="https://github.com/ConsoleKit2/ConsoleKit2"
license=('GPL')
depends=('dbus' 'glib2' 'libx11' 'polkit' 'udev' 'zlib')
optdepends=('consolekit-openrc: consolekit openrc initscript'
			'cgmanager-openrc: cgmanager openrc initscript')
makedepends=('xmlto' 'docbook-xsl' 'cgmanager')
options=('libtool')
source=("$url/releases/download/$pkgver/$_pkgname-$pkgver.tar.bz2"
		'consolekit.tmpfiles.conf'
		'75-consolekit.rules'
		'consolekit.pamd')
sha256sums=('30b8026e62246593637bacf99ab9cbea18e7fea6ee07c45ae2a351912aacda4b'
            '778552dc12b3c235bde200e476d4262da0c135f3f6f8b3e975a87881d1f154d1'
            'c5159d9fe8fdd52ad0d6a84af7ba00bac09edaae965896ab0d099a4df1c5ea6b'
            'f7b88e87f447e2d37c12886f57d932c385f19a8fef238e0f1de7a1746d8be69e')

prepare(){
	cd $srcdir/$_pkgname-$pkgver
}

build(){
	cd $srcdir/$_pkgname-$pkgver

	./configure  \
		--prefix=/usr \
		--sysconfdir=/etc \
		--sbindir=/usr/bin \
		--with-rundir=/run \
		--libexecdir=/usr/lib/ConsoleKit \
		--localstatedir=/var \
		--enable-polkit \
		--enable-pam-module \
		--enable-udev-acl \
		--enable-docbook-docs \
		--enable-cgroups \
		--with-dbus-services=/usr/share/dbus-1/services \
		--with-xinitrc-dir=/etc/X11/xinit/xinitrc.d \
		--with-pam-module-dir=/usr/lib/security \
		--without-systemdsystemunitdir

		make
}

package() {
	cd $srcdir/$_pkgname-$pkgver
	make DESTDIR="$pkgdir" install

	install -Dm644 "$srcdir"/consolekit.tmpfiles.conf "$pkgdir"/usr/lib/tmpfiles.d/consolekit.conf

	rm -rf "${pkgdir}"/run

	install -dm 700 -o polkitd "${pkgdir}"/usr/share/polkit-1/rules.d
	install -m 644 ${srcdir}/75-consolekit.rules $pkgdir/usr/share/polkit-1/rules.d/75-consolekit.rules

	install -dm755 $pkgdir/etc/pam.d/
	install -Dm755 ${srcdir}/consolekit.pamd $pkgdir/etc/pam.d/consolekit
}