diff options
author | Bart Ribbers <bribbers@disroot.org> | 2017-08-23 00:46:46 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-08-30 16:34:57 +0000 |
commit | d7f4c260d1287526e7030413504fef9e52c5b9a3 (patch) | |
tree | 4bac9494d56be94c074748c2af4a97c44d8b56ec /main/consolekit2 | |
parent | 24e6b26f69a01184a93003a97f816c6452ae46b3 (diff) | |
download | aports-d7f4c260d1287526e7030413504fef9e52c5b9a3.tar.bz2 aports-d7f4c260d1287526e7030413504fef9e52c5b9a3.tar.xz |
main/consolekit: replaced by consolekit2
Diffstat (limited to 'main/consolekit2')
-rw-r--r-- | main/consolekit2/0001-busybox-reboot-and-poweroff-support.patch | 40 | ||||
-rw-r--r-- | main/consolekit2/APKBUILD | 49 | ||||
-rw-r--r-- | main/consolekit2/ac_disable_static.patch | 13 | ||||
-rw-r--r-- | main/consolekit2/pam-foreground-compat.ck | 17 |
4 files changed, 119 insertions, 0 deletions
diff --git a/main/consolekit2/0001-busybox-reboot-and-poweroff-support.patch b/main/consolekit2/0001-busybox-reboot-and-poweroff-support.patch new file mode 100644 index 0000000000..2db9f032bd --- /dev/null +++ b/main/consolekit2/0001-busybox-reboot-and-poweroff-support.patch @@ -0,0 +1,40 @@ +From 5e557dd212657f7e75a0c4bd70d11ca06ccb3f84 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Mon, 4 Apr 2011 18:46:25 +0000 +Subject: [PATCH] busybox reboot and poweroff support + +--- + tools/linux/ck-system-restart | 3 +++ + tools/linux/ck-system-stop | 3 +++ + 2 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/tools/linux/ck-system-restart b/tools/linux/ck-system-restart +index 8e0664e..5cabb3d 100755 +--- a/tools/linux/ck-system-restart ++++ b/tools/linux/ck-system-restart +@@ -7,6 +7,9 @@ if [ -x "/sbin/shutdown" ] ; then + elif [ -x "/usr/sbin/shutdown" ] ; then + /usr/sbin/shutdown -r now + exit $? ++elif [ -x "/sbin/reboot" ]; then ++ /sbin/reboot ++ exit $? + else + exit 1 + fi +diff --git a/tools/linux/ck-system-stop b/tools/linux/ck-system-stop +index e26bca3..a0be3ac 100755 +--- a/tools/linux/ck-system-stop ++++ b/tools/linux/ck-system-stop +@@ -7,6 +7,9 @@ if [ -x "/sbin/shutdown" ] ; then + elif [ -x "/usr/sbin/shutdown" ] ; then + /usr/sbin/shutdown -h now + exit $? ++elif [ -x "/sbin/poweroff" ] ; then ++ /sbin/poweroff ++ exit $? + else + exit 1 + fi +-- +1.7.4.2 diff --git a/main/consolekit2/APKBUILD b/main/consolekit2/APKBUILD new file mode 100644 index 0000000000..669c215d46 --- /dev/null +++ b/main/consolekit2/APKBUILD @@ -0,0 +1,49 @@ +# Contributor: Bart Ribbers <bribbers@disroot.org> +# Maintainer: Bart Ribbers <bribbers@disroot.org> +pkgbase=ConsoleKit2 +pkgname=consolekit2 +pkgver=1.2.0 +pkgrel=2 +pkgdesc="A framework for defining and tracking users, login sessions, and seats" +provides="consolekit=$pkgver" +replaces=consolekit +arch=all +url="https://consolekit2.github.io/ConsoleKit2" +license=GPL2 +depends="polkit eudev" +makedepends="git automake autoconf gettext-dev glib-dev zlib-dev libxslt-dev + polkit-dev eudev-dev libdrm-dev libnih-dev libtool + xorg-server-dev" +source="$pkgname-$pkgver.tar.gz::https://github.com/${pkgname}/${pkgname}/archive/${pkgver}.tar.gz + ac_disable_static.patch + 0001-busybox-reboot-and-poweroff-support.patch + pam-foreground-compat.ck" +subpackages="$pkgname-dev $pkgname-doc $pkgname-lang" +builddir="$srcdir"/$pkgbase-$pkgver + +prepare() { + default_prepare + + cd "$srcdir"/$pkgbase-$pkgver + + NOCONFIGURE=1 ./autogen.sh +} + +build() { + cd "$srcdir"/$pkgbase-$pkgver + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --disable-static + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + make +} + +package() { + cd "$srcdir"/$pkgbase-$pkgver + make DESTDIR="$pkgdir" install + install -m 755 "$srcdir"/pam-foreground-compat.ck \ + "$pkgdir"/usr/lib/ConsoleKit/run-session.d/ +} +sha512sums="30f2ceec14044669f40676e9b17513874350e2b70f0a918be934f7e64309c8595dbec4ac0937044c98dda51eb97c99443dc9d1de33f08365d72da8600296ad78 consolekit2-1.2.0.tar.gz +0f628fd1589b1790ad9adcb2278de504b75cc6b4ec7284a1cbda44ebd34b9966014989f47f343cb936d8503acc4eeec43ddff07cb11f55388e47256b8420e2e8 ac_disable_static.patch +ec0c88e640afac0561c84131d63fa8c9e2e29611b789ae5c163cd11465b22017602d88dc853866624f57bce2ee466ab63af075d083a9ba6e87327ad8d0a0769f 0001-busybox-reboot-and-poweroff-support.patch +3b114fbbe74cfba0bfd4dad0eb1b85d08b4979a998980c1cbcd7f44b8a16b0ceca224680d4f4a1644cd24698f8817e5e8bdfcdc4ead87a122d0e323142f47910 pam-foreground-compat.ck" diff --git a/main/consolekit2/ac_disable_static.patch b/main/consolekit2/ac_disable_static.patch new file mode 100644 index 0000000000..38d6f12ac1 --- /dev/null +++ b/main/consolekit2/ac_disable_static.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index 071a0d8..7469697 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -30,7 +30,6 @@ AC_SEARCH_LIBS([strerror],[cposix]) + AC_PROG_CC + AM_PROG_CC_C_O + AC_HEADER_STDC +-AC_DISABLE_STATIC +-LT_INIT ++LT_INIT([disable-static]) + AC_HEADER_STDC + AC_FUNC_FORK diff --git a/main/consolekit2/pam-foreground-compat.ck b/main/consolekit2/pam-foreground-compat.ck new file mode 100644 index 0000000000..c9255503c4 --- /dev/null +++ b/main/consolekit2/pam-foreground-compat.ck @@ -0,0 +1,17 @@ +#!/bin/sh +TAGDIR=/var/run/console + +[ -n "$CK_SESSION_USER_UID" ] || exit 1 +[ "$CK_SESSION_IS_LOCAL" = "true" ] || exit 0 + +TAGFILE="$TAGDIR/`getent passwd $CK_SESSION_USER_UID | cut -f 1 -d:`" + +if [ "$1" = "session_added" ]; then + mkdir -p "$TAGDIR" + echo "$CK_SESSION_ID" >> "$TAGFILE" +fi + +if [ "$1" = "session_removed" ] && [ -e "$TAGFILE" ]; then + sed -i "\%^$CK_SESSION_ID\$%d" "$TAGFILE" + [ -s "$TAGFILE" ] || rm -f "$TAGFILE" +fi |