summaryrefslogtreecommitdiff
path: root/pcr/lxdm-consolekit/PKGBUILD
blob: 6a03efded5a923841b515fd6055dffe45d8137c5 (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: David P. <megver83@openmailbox.org>
# Contributor: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: AndyRTR <andyrtr@archlinux.org>
# Contributor: kiefer <jorgelmadrid@gmail.com>
# Maintainer: Aaditya Bagga <aaditya_gnulinux@zoho.com>

pkgname=lxdm-consolekit
_pkgname=lxdm
pkgver=0.5.3
pkgrel=1.1
pkgdesc='LXDM with consolekit support enabled'
arch=('armv7h' 'i686' 'x86_64')
url="https://sourceforge.net/projects/lxdm/"
license=('GPL')
groups=('lxde')
depends=('gtk2' 'xorg-server' 'consolekit')
makedepends=('intltool' 'iso-codes')
optdepends=('gtk-engines: default GTK+ theme'
            'iso-codes: show language names in language chooser'
            'librsvg: display the default background')
conflicts=('lxdm')
provides=('lxdm')
install=$_pkgname.install
backup=('etc/lxdm/lxdm.conf' 'etc/pam.d/lxdm' 'etc/lxdm/Xsession'
        'etc/lxdm/PreLogin' 'etc/lxdm/LoginReady' 'etc/lxdm/PostLogin'
        'etc/lxdm/PostLogout' 'etc/lxdm/PreReboot' 'etc/lxdm/PreShutdown')
source=(http://downloads.sourceforge.net/lxdm/$_pkgname-$pkgver.tar.xz
        default-config.patch
        lxdm.pam
        Xsession)
md5sums=('061caae432634e6db38bbdc84bc6ffa0'
         'd42d17443e544beee46a9ab47cb24b86'
         '06f54c141668495b1e600dc56d3cec1a'
         '6ceea02bf33f6d122365f83435f976ab')

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

  # Adjust Arch-specific settings
  patch -Np1 -i ../default-config.patch

  # Use our custom pam and Xsession files
  cp ../lxdm.pam pam/lxdm
  cp ../Xsession data/Xsession

  # Support for pulseaudio
  echo 'test -x /usr/bin/pax11publish && /usr/bin/pax11publish -r' >> data/PostLogout.in
}

build() {
  cd "$srcdir/$_pkgname-$pkgver"
  ./configure --prefix=/usr --sbindir=/usr/bin --libexecdir=/usr/lib/lxdm \
              --sysconfdir=/etc --localstatedir=/var
  make
}

package() {
  cd "$srcdir/$_pkgname-$pkgver"
  make DESTDIR="$pkgdir" install
  chmod 644 "$pkgdir/etc/lxdm/lxdm.conf"

  # Home directory
  install -dm 755 "$pkgdir/var/lib/lxdm"
  echo 'GDK_CORE_DEVICE_EVENTS=true' > "$pkgdir"/var/lib/lxdm/.pam_environment
  chown -R 121:121 "$pkgdir/var/lib/lxdm"
}