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
4 pkgname=lightdm-ubuntu-bzr
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' 'bzr' 'gtk-doc')
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://archive.ubuntu.com/ubuntu/pool/main/l/${pkgname%-*-*}/${pkgname%-*-*}_${_ubuntu_ver}-${_ubuntu_rel}.diff.gz"
32 'lightdm-gtk-greeter.conf'
34 install=lightdm.install
35 sha512sums=('03b7c111db5335e6d22ab6cb7f060395f0f6ce48833e0b028a81b474c412b6bda951b9bdf24dba22fcbbb6177b415c48d164939384212a05b14623a816f0b13c'
36 'c4813ae27d81ece8bf66e89c1adbb215443076cb6a2b1da28a5ea9528b25052715331a1d76711a2d06cbf9d41f46afa9a868b404112035db2295c177e7f99cc0'
37 '0698d702540b5ea0f8935e8b26c3511f40c681dbf885241b63d4e73e94aff98bb37c8efe4c96f0d8caaefa7be774db49936921f46df3543191515f609154147f'
38 'fa35ece114255abfc409f1c9da1eb7129055d8669aad11fe3d69084bf2216e93bf09864ac4e8874e88f166be9735fc55ed899056eb3bd94c5b33d3b2cbd55f4d'
39 'ed928f9e7609e98b42783810274586b3a0da224ee6053de38273b6e54a13a2a5ce8c7095e281df38d99c3e2fc6530af988628f5a66166d18e46a24e694b500a4')
41 _bzrtrunk="lp:lightdm"
42 _bzrmod="lightdm-trunk"
46 msg "Connecting to Bazaar server...."
48 if [[ -d "${_bzrmod}" ]]; then
49 pushd "${_bzrmod}" && bzr pull "${_bzrtrunk}" -r "${pkgver}" && popd
51 bzr branch "${_bzrtrunk}" "${_bzrmod}" -q -r "${pkgver}"
54 if [ -d "${_bzrmod}-build" ]; then
55 rm -rvf "${_bzrmod}-build"
58 cp -rv "${_bzrmod}" "${_bzrmod}-build"
63 patch -Np1 -i "${srcdir}/lightdm_${_ubuntu_ver}-${_ubuntu_rel}.diff"
65 #These patches do not apply
67 sed -i '/00bzr_guest_session_wrapper.diff/d' 'debian/patches/series'
68 sed -i '/04_dmrc_set_LANG_only.patch/d' 'debian/patches/series'
69 sed -i '/05_gdmflexiserver_not_in_PATH.patch/d' 'debian/patches/series'
70 sed -i '/06_accounts_service_timeout.patch/d' 'debian/patches/series'
71 sed -i '/07_long_password_crash.patch/d' 'debian/patches/series'
72 sed -i '/08_correct_ck_ref.patch/d' 'debian/patches/series'
74 for i in $(cat 'debian/patches/series' | grep -v '#'); do
75 patch -Np1 -i "debian/patches/${i}"
82 --libexecdir=/usr/lib/lightdm \
83 --localstatedir=/var \
84 --with-user-session=ubuntu \
85 --with-greeter-user=lightdm #\
86 #--with-greeter-session=lightdm-gtk-greeter
92 cd "${srcdir}/${_bzrmod}-build"
93 make DESTDIR="${pkgdir}/" install
95 install -dm755 "${pkgdir}/etc/rc.d/"
96 install -dm755 "${pkgdir}/lib/systemd/system/"
99 install -dm755 "${pkgdir}/etc/pam.d/"
100 install -m644 "${srcdir}/lightdm.pam" "${pkgdir}/etc/pam.d/lightdm"
102 #Install configuration files
103 install -d -m755 "${pkgdir}/usr/share/doc/lightdm/"
104 install -d -m755 "${pkgdir}/etc/lightdm/"
105 install -m644 "${pkgdir}/etc/lightdm/lightdm.conf" "${pkgdir}/usr/share/doc/lightdm/"
106 install -m644 "${pkgdir}/etc/lightdm/keys.conf" "${pkgdir}/usr/share/doc/lightdm/"
107 install -m644 "debian/lightdm-gtk-greeter-ubuntu.conf" "${pkgdir}/etc/lightdm/"
108 install -m644 "${srcdir}/lightdm-gtk-greeter.conf" "${pkgdir}/etc/lightdm/"
110 #Install binaries and scripts
111 install -d -m755 "${pkgdir}/usr/sbin/"
112 install -d -m755 "${pkgdir}/usr/lib/lightdm/"
113 install -m755 "debian/lightdm-session" "${pkgdir}/usr/sbin/"
114 install -m755 "debian/guest-account" "${pkgdir}/usr/sbin/"
115 install -m755 "debian/lightdm-greeter-session" "${pkgdir}/usr/lib/lightdm/"
116 chmod +x "${pkgdir}/usr/lib/lightdm/lightdm-greeter-session"
118 #Install init script and SystemD service
119 install -m755 ../lightdm $pkgdir/etc/rc.d
120 install -m644 ../lightdm.service $pkgdir/lib/systemd/system/
122 #Configuration settings that differ from Ubuntu
123 sed -i -e 's/^\(minimum-uid=\).*$/\11000/g' "${pkgdir}/etc/lightdm/users.conf"
124 sed -i -e 's@/usr\(/sbin/nologin\)$@\1@g' "${pkgdir}/etc/lightdm/users.conf"
126 #Configuration files specific to Ubuntu
127 rm -rvf "${pkgdir}/etc/init/"