2 # Contributor: Balwinder S Dheeman <bdheeman@gmail.com>
7 pkgdesc='Lightweight X11 Display Manager (part of LXDE)'
9 url="http://blog.lxde.org/?p=531"
13 depends=('gtk2' 'xorg-server')
14 makedepends=('autoconf' 'automake' 'intltool' 'gcc' 'make' 'pkgconfig' 'rsync' 'subversion')
15 backup=('etc/lxdm/default.conf')
17 _svntrunk=https://lxde.svn.sourceforge.net/svnroot/lxde/trunk/lxdm
20 source=('PKGBUILD.local' 'Xsession' 'custom.desktop' 'lxdm.pam' 'lxdm.rc' 'startcustom.sh')
22 source=(${source[@]} ${p##*/})
25 # Include local code, huh
26 if [ -x PKGBUILD.local ]; then
31 msg2 "Connecting to SVN server..."
33 if [ -d ${_svnmod}/.svn ]; then
34 cd ${_svnmod} && svn up
36 svn co ${_svntrunk} ${_svnmod}
38 msg2 "SVN checkout done or server timeout"
40 msg2 "Preparing builddir..."
42 rm -rf ${_svnmod}-build
43 rsync -av --delete --exclude '.svn*' ${_svnmod}/ ${_svnmod}-build
45 for p in $srcdir/*.patch; do
46 msg2 "Applying patch ${p##*/}"
47 patch -sp1 < ${p} || return $?
50 msg2 "Starting the ./autogen.sh; make all install..."
52 config_file="/etc/lxdm/default.conf"
53 LDFLAGS="-Wl,-z,defs -Wl,-O2 -Wl,--as-needed" \
54 CFLAGS="-DCONFIG_FILE=\\\"$config_file\\\"" \
55 ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/lxdm || return 1
60 cd ${_svnmod}-build || return 1
61 make DESTDIR=${pkgdir} install || return 1
63 msg2 "Making it nice..."
64 sed -e 's|^# arg=.*|arg=/usr/bin/X vt5 -nolisten tcp|; s|\${exec_prefix}|/usr|' \
65 -i ${pkgdir}/etc/lxdm/lxdm.conf
66 cp ${pkgdir}/etc/lxdm/lxdm.conf ${pkgdir}/etc/lxdm/default.conf
67 mv ${pkgdir}/usr/sbin/lxdm-binary ${pkgdir}/usr/sbin/lxdm
68 install -Dm755 ${srcdir}/Xsession ${pkgdir}/etc/lxdm/Xsession || return 1
69 install -Dm755 ${srcdir}/custom.desktop ${pkgdir}/usr/share/xsessions/custom.desktop || return 1
70 install -Dm644 ${srcdir}/lxdm.pam ${pkgdir}/etc/pam.d/lxdm || return 1
71 install -Dm755 ${srcdir}/lxdm.rc ${pkgdir}/etc/rc.d/lxdm || return 1
72 install -Dm755 ${srcdir}/startcustom.sh ${pkgdir}/usr/bin/startcustom || return 1
75 # vim:set ts=4 sw=4 et:
76 md5sums=('86ba7f04bf9a291dc827738bda7c9b4a'
77 '49785674285bfed32d02516f4f769e48'
78 'fa80f01323a765f5f667c7ed31aa4af3'
79 '3bb03543d1e05168f394d9e35051237a'
80 '35ebe5ea58406eaa1e6d51579618f551'
81 'd23ae9e7e2a6948b68007e6c1744fb29'
82 '7efff99b0f95bbcbdba339b14aca3039'
83 'b5c4e469cab84b236d300d20cfd92608'
84 'd422789783b1d3bdd09be0d49e101476'
85 '833873b4708994ffc7e0b74ff70e22f2')