summaryrefslogtreecommitdiff
path: root/community/lxdm/PKGBUILD
blob: 5b5edba39ceffd5c521629d1a143e8e243b4d3c4 (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
# $Id: PKGBUILD 101508 2013-11-26 19:15:27Z bgyorgy $
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: AndyRTR <andyrtr@archlinux.org>
# Contributor: kiefer <jorgelmadrid@gmail.com>

pkgname=lxdm
pkgver=0.4.1
pkgrel=29
pkgdesc='Lightweight X11 Display Manager'
arch=('i686' 'x86_64')
url="http://sourceforge.net/projects/lxdm/"
license=('GPL')
groups=('lxde')
depends=('gtk2' 'xorg-server')
makedepends=('intltool' 'iso-codes')
optdepends=('gtk-engines: default GTK+ theme'
            'librsvg: display the default background')
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/lxde/$pkgname-$pkgver.tar.gz
        git-fixes.patch
        default-config.patch
        lxdm.pam
        Xsession)
md5sums=('8da1cfc2be6dc9217c85a7cf51e1e821'
         'e9367cec197fa2919531f5c623ecec47'
         '2ba18992efef43f84061717f0550e4b6'
         'c941ef896248bc7c03901b513490425c'
         'd9c8f8c9e6de52dbc389696454c8f572')

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

  # Apply various fixes from git
  patch -Np1 -i ../git-fixes.patch

  # 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

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

build() {
  cd "$srcdir/$pkgname-$pkgver"
  autoreconf -fi
  ./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"
}