# $Id: PKGBUILD 97333 2013-09-18 07:35:44Z alucryd $ # Maintainer: Maxime Gauduin # Contributor: Morfeo pkgbase=lightdm pkgname=('lightdm' 'liblightdm-qt4' 'liblightdm-qt5') pkgver=1.6.2 pkgrel=1 epoch=1 pkgdesc="A lightweight display manager" arch=('i686' 'x86_64') url="https://launchpad.net/lightdm" license=('GPL3' 'LGPL3') makedepends=('gobject-introspection' 'gtk-doc' 'intltool' 'itstool' 'libxklavier' 'polkit' 'qt4' 'qt5-base') options=('!libtool') source=("https://launchpad.net/lightdm/1.6/${pkgver}/+download/${pkgbase}-${pkgver}.tar.xz" 'lightdm.service' 'lightdm.tmpfiles' 'lightdm.pam' 'lightdm-autologin.pam' 'lightdm.rules' 'lightdm-default-config.patch' 'lightdm-lock-screen-before-switch.patch' 'lightdm-use-login1.patch' 'Xsession') sha256sums=('b0de1dc81bb5ce81800feafb9fbc7806ef4dfc83733f0df058568e55b8a045f3' '0d2adba25cdbe59e97ffd302083db9d5e23920780f41e04f64512cd6b633289a' 'b29521fbd7a48a8f60b93ecca3b30c30bcb71560de8033c8d39b25c22c6f696f' 'e8c4c5fd3b801a390d201166fd1fb9730e78a5c62928768103b870b6bd980ea0' '33e3c3d6e16c8d30756754ea3f31f5457c5be0343686aad287692be34958984a' 'a89566307e1c81c24f037d854cbd472d2f94f8a4b759877a01563a332319f7d6' '15f75ffe122fa86c0c4b3558b9d73e151ba89355093036ffc64110c5e306216b' '4793eaee5915f5c519f569a4cd9158822d4c57c8b6e405895d2eddf82fa00822' 'a760c7b4d8c0b54bb204b5d6e574c82360a90464ac06042409a17f950d2c1194' '7fb85a1b54406032a922e8fd6f45d869fcfe5681df630e74e8e50c040b786ee4') prepare() { cd ${pkgbase}-${pkgver} patch -Np1 -i ../lightdm-default-config.patch patch -Np1 -i ../lightdm-lock-screen-before-switch.patch patch -Np0 -i ../lightdm-use-login1.patch } build() { cd ${pkgbase}-${pkgver} export MOC4='moc-qt4' export MOC5='moc-qt5' ./configure --prefix='/usr' --sbindir='/usr/bin' --sysconfdir='/etc' --localstatedir='/var' --libexecdir="/usr/lib/${pkgbase}" --with-greeter-user='lightdm' --with-greeter-session='lightdm-gtk-greeter' --disable-{static,tests} make } package_lightdm() { depends=('libxklavier' 'polkit' 'systemd') optdepends=('xorg-server-xephyr: LightDM test mode' 'accountsservice: limit visible accounts') backup=('etc/apparmor.d/lightdm-guest-session' 'etc/lightdm/keys.conf' 'etc/lightdm/lightdm.conf' 'etc/lightdm/users.conf' 'etc/lightdm/Xsession' 'etc/pam.d/lightdm' 'etc/pam.d/lightdm-autologin' 'etc/pam.d/lightdm-greeter') install="${pkgbase}.install" cd ${pkgbase}-${pkgver} make DESTDIR="${pkgdir}" install make DESTDIR="${pkgdir}" -C liblightdm-qt uninstall install -m 755 ../Xsession "${pkgdir}"/etc/lightdm/Xsession rm -rf "${pkgdir}"/etc/init rm -rf "${pkgdir}"/usr/include/lightdm-qt{,5}-2 install -dm 770 "${pkgdir}"/var/lib/lightdm install -dm 711 "${pkgdir}"/var/log/lightdm chmod +t "${pkgdir}"/var/lib/lightdm echo 'GDK_CORE_DEVICE_EVENTS=true' > "${pkgdir}"/var/lib/lightdm/.pam_environment chmod 644 "${pkgdir}"/var/lib/lightdm/.pam_environment chown 620:620 -R "${pkgdir}"/var/{lib,log}/lightdm # PAM install -m 644 ../lightdm.pam "${pkgdir}"/etc/pam.d/lightdm install -m 644 ../lightdm-autologin.pam "${pkgdir}"/etc/pam.d/lightdm-autologin # PolicyKit install -dm 700 -o polkitd "${pkgdir}"/usr/share/polkit-1/rules.d install -m 644 ../lightdm.rules "${pkgdir}"/usr/share/polkit-1/rules.d/lightdm.rules # Systemd install -dm 755 "${pkgdir}"/usr/lib/{systemd/system,tmpfiles.d} install -m 644 ../lightdm.service "${pkgdir}"/usr/lib/systemd/system/lightdm.service install -m 644 ../lightdm.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/lightdm.conf } package_liblightdm-qt4() { pkgdesc=('LightDM Qt client library') depends=('lightdm' 'qt4') options+=('!emptydirs') cd ${pkgbase}-${pkgver} make DESTDIR="${pkgdir}" -C liblightdm-gobject install make DESTDIR="${pkgdir}" -C liblightdm-qt install make DESTDIR="${pkgdir}" -C liblightdm-gobject uninstall find "${pkgdir}" -type d -name *qt5* -exec rm -rf {} + find "${pkgdir}" -type f -name *qt5* -exec rm {} + find "${pkgdir}" -type l -name *qt5* -exec rm {} + } package_liblightdm-qt5() { pkgdesc=('LightDM Qt client library') depends=('lightdm' 'qt5-base') options+=('!emptydirs') cd ${pkgbase}-${pkgver} make DESTDIR="${pkgdir}" -C liblightdm-gobject install make DESTDIR="${pkgdir}" -C liblightdm-qt install make DESTDIR="${pkgdir}" -C liblightdm-gobject uninstall find "${pkgdir}" -type d -name *qt[!5]* -exec rm -rf {} + find "${pkgdir}" -type f -name *qt[!5]* -exec rm {} + find "${pkgdir}" -type l -name *qt[!5]* -exec rm {} + } # vim: ts=2 sw=2 et: