1 # Maintainer: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
2 #Most of this was taken from Morfeo's lightdm PKDBUILD, but modified to use Ubuntu's patches
7 pkgver=1.1.0.${_ubuntu_rel}
9 pkgdesc="A lightweight display manager"
10 arch=('i686' 'x86_64')
11 url="https://launchpad.net/lightdm"
12 license=('GPL3' 'LGPL3')
13 depends=('gnome-themes-standard' 'gnome-backgrounds' 'gnome-icon-theme' 'libwebkit' 'dbus-glib' 'gtk3' 'libxklavier' 'intltool' 'accountsservice')
14 options=(!libtool !emptydirs)
15 optdepends=('xorg-server-xephyr: run lightdm in test mode'
16 'lightdm-webkit-greeter-bzr'
17 'unity-greeter: default Ubuntu 11.10 greeter')
18 makedepends=('gnome-doc-utils' 'gobject-introspection' 'pkg-config')
19 provides=("lightdm=${pkgver}")
21 backup=('etc/apparmor.d/lightdm-guest-session'
22 'etc/dbus-1/system.d/org.freedesktop.DisplayManager.conf'
24 'etc/lightdm/keys.conf'
25 'etc/lightdm/lightdm.conf'
26 'etc/lightdm/lightdm-gtk-greeter.conf'
27 'etc/lightdm/lightdm-gtk-greeter-ubuntu.conf'
28 'etc/lightdm/users.conf')
29 source=("http://people.ubuntu.com/~robert-ancell/${pkgname%-*}/releases/${pkgname%-*}-${pkgver%.*}.tar.gz"
30 "http://archive.ubuntu.com/ubuntu/pool/main/l/${pkgname%-*}/${pkgname%-*}_${_ubuntu_ver}-${_ubuntu_rel}.diff.gz"
33 'lightdm-gtk-greeter.conf'
35 'fix-x11-link-error.patch')
36 install=lightdm.install
37 sha512sums=('62350392530de61f8409dcd4e33a8940e0634b84056903fb12ca639bd899595ab2c79b178322aeafd04826ceda38e0d6988994cb3568151ee8d1fea17804a2cc'
38 '03b7c111db5335e6d22ab6cb7f060395f0f6ce48833e0b028a81b474c412b6bda951b9bdf24dba22fcbbb6177b415c48d164939384212a05b14623a816f0b13c'
39 'c4813ae27d81ece8bf66e89c1adbb215443076cb6a2b1da28a5ea9528b25052715331a1d76711a2d06cbf9d41f46afa9a868b404112035db2295c177e7f99cc0'
40 '0698d702540b5ea0f8935e8b26c3511f40c681dbf885241b63d4e73e94aff98bb37c8efe4c96f0d8caaefa7be774db49936921f46df3543191515f609154147f'
41 'fa35ece114255abfc409f1c9da1eb7129055d8669aad11fe3d69084bf2216e93bf09864ac4e8874e88f166be9735fc55ed899056eb3bd94c5b33d3b2cbd55f4d'
42 'ed928f9e7609e98b42783810274586b3a0da224ee6053de38273b6e54a13a2a5ce8c7095e281df38d99c3e2fc6530af988628f5a66166d18e46a24e694b500a4'
43 '43b68a519f501bfaed0e1478d6f767dee227ae96f456e57778e92d46bfc4832dd8f65915d589e02c0895ca0afe7a916ece3cb339e3074ff42ef57b1f3c90ca45')
46 cd "${srcdir}/${pkgname%-*}-${pkgver%.*}"
49 patch -Np1 -i "${srcdir}/lightdm_${_ubuntu_ver}-${_ubuntu_rel}.diff"
51 #These patches do not apply
53 sed -i '/00bzr_guest_session_wrapper.diff/d' 'debian/patches/series'
54 sed -i '/04_dmrc_set_LANG_only.patch/d' 'debian/patches/series'
55 sed -i '/05_gdmflexiserver_not_in_PATH.patch/d' 'debian/patches/series'
56 sed -i '/06_accounts_service_timeout.patch/d' 'debian/patches/series'
57 sed -i '/07_long_password_crash.patch/d' 'debian/patches/series'
58 sed -i '/08_correct_ck_ref.patch/d' 'debian/patches/series'
60 #for i in $(cat 'debian/patches/series' | grep -v '#'); do
61 # patch -Np1 -i "debian/patches/${i}"
64 # Fix x11 linker error
65 patch -Np1 -i "${srcdir}/fix-x11-link-error.patch"
67 # Fix moc error with Qt 4.8
68 find . -type f -iname '*moc*' -exec rm {} \;
69 sed -i -e 's/\(dist_pkglibexec_SCRIPTS = gdmflexiserver\)/#\1/g' utils/Makefile.am
77 --libexecdir=/usr/lib/lightdm \
78 --localstatedir=/var \
79 --with-user-session=ubuntu \
80 --with-greeter-user=lightdm #\
81 #--with-greeter-session=lightdm-gtk-greeter
83 #Lightdm make target does not exist
84 sed -i 's/lightdm-session//' tests/src/Makefile
90 cd "${srcdir}/${pkgname%-*}-${pkgver%.*}"
91 make DESTDIR="${pkgdir}/" install
93 install -dm755 "${pkgdir}/etc/rc.d/"
94 install -dm755 "${pkgdir}/lib/systemd/system/"
97 install -dm755 "${pkgdir}/etc/pam.d/"
98 install -m644 "${srcdir}/lightdm.pam" "${pkgdir}/etc/pam.d/lightdm"
100 #Install configuration files
101 install -d -m755 "${pkgdir}/usr/share/doc/lightdm/"
102 install -d -m755 "${pkgdir}/etc/lightdm/"
103 install -m644 "${pkgdir}/etc/lightdm/lightdm.conf" "${pkgdir}/usr/share/doc/lightdm/"
104 install -m644 "${pkgdir}/etc/lightdm/keys.conf" "${pkgdir}/usr/share/doc/lightdm/"
105 install -m644 "debian/lightdm-gtk-greeter-ubuntu.conf" "${pkgdir}/etc/lightdm/"
106 install -m644 "${srcdir}/lightdm-gtk-greeter.conf" "${pkgdir}/etc/lightdm/"
108 #Install binaries and scripts
109 install -d -m755 "${pkgdir}/usr/sbin/"
110 install -d -m755 "${pkgdir}/usr/lib/lightdm/"
111 install -m755 "debian/lightdm-session" "${pkgdir}/usr/sbin/"
112 install -m755 "debian/guest-account" "${pkgdir}/usr/sbin/"
113 install -m755 "debian/lightdm-greeter-session" "${pkgdir}/usr/lib/lightdm/"
114 chmod +x "${pkgdir}/usr/lib/lightdm/lightdm-greeter-session"
116 #Install init script and SystemD service
117 install -m755 ../lightdm $pkgdir/etc/rc.d
118 install -m644 ../lightdm.service $pkgdir/lib/systemd/system/
120 #Configuration settings that differ from Ubuntu
121 sed -i -e 's/^\(minimum-uid=\).*$/\11000/g' "${pkgdir}/etc/lightdm/users.conf"
122 sed -i -e 's@/usr\(/sbin/nologin\)$@\1@g' "${pkgdir}/etc/lightdm/users.conf"
124 #Configuration files specific to Ubuntu
125 rm -rvf "${pkgdir}/etc/init/"