adding lightdm to aur

This commit is contained in:
xenoxaos 2012-09-30 22:43:41 -04:00
parent be9e1d9d0f
commit 9f798a60f8
9 changed files with 273 additions and 0 deletions

78
aur/lightdm/PKGBUILD Normal file
View file

@ -0,0 +1,78 @@
#Mantainer: M0Rf30
pkgname=lightdm
pkgver=1.3.3
pkgrel=4
pkgdesc="A lightweight display manager"
arch=('i686' 'x86_64')
url="https://launchpad.net/lightdm"
license=('GPL3' 'LGPL3')
source=("https://launchpad.net/lightdm/1.4/$pkgver/+download/$pkgname-$pkgver.tar.gz"
lightdm.rc
lightdm.service
lightdm-plymouth.service
lightdm.tmpfiles
xsession
lightdm-autologin.pam
lightdm.pam)
depends=('dbus-glib' 'libxklavier')
options=(!libtool)
install=lightdm.install
optdepends=('accountsservice'
'lightdm-gtk-greeter: You need this package to test the default greeter'
'xorg-server-xephyr: run lightdm in test mode'
'lightdm-webkit-greeter-bzr: webkit lightdm greeter'
'lightdm-crowd-greeter: 3d lightdm greeter')
makedepends=('gobject-introspection' 'pkg-config' 'intltool' 'patch' 'itstool')
backup=(etc/apparmor.d/lightdm-guest-session
etc/dbus-1/system.d/org.freedesktop.DisplayManager.conf
etc/lightdm/keys.conf
etc/lightdm/lightdm.conf
etc/lightdm/users.conf
etc/pam.d/lightdm)
build() {
cd $srcdir/$pkgname-$pkgver
./configure --prefix=/usr \
--sysconfdir=/etc --disable-static --libexecdir=/usr/lib/lightdm \
--localstatedir=/var --with-greeter-user=lightdm \
--with-greeter-session=lightdm-gtk-greeter --disable-tests
make || return 1
}
package() {
cd $srcdir/$pkgname-$pkgver
make DESTDIR=$pkgdir install
# init services file
install -D -m755 ../lightdm.rc $pkgdir/etc/rc.d/lightdm
install -D -m644 ../lightdm.service $pkgdir/usr/lib/systemd/system/lightdm.service
install -D -m644 ../lightdm-plymouth.service $pkgdir/usr/lib/systemd/system/lightdm-plymouth.service
install -D -m644 ../lightdm.tmpfiles $pkgdir/usr/lib/tmpfiles.d/lightdm.conf
# some tweaks
rm -rf $pkgdir/etc/init
chmod +x ../xsession
install -D -m755 ../xsession $pkgdir/etc/lightdm
sed -i -e "s|#run-directory=/var/run/lightdm|run-directory=/run/lightdm|g" $pkgdir/etc/lightdm/lightdm.conf
sed -i -e "s|minimum-uid=500|minimum-uid=1000|g" $pkgdir/etc/lightdm/users.conf
sed -i -e "s|/usr/sbin/nologin|/sbin/nologin|g" $pkgdir/etc/lightdm/users.conf
sed -i -e "s|#session-wrapper=lightdm-session|session-wrapper=/etc/lightdm/xsession|g" $pkgdir/etc/lightdm/lightdm.conf
sed -i -e "s|#autologin-session=UNIMPLEMENTED|#autologin-session=UNIMPLEMENTED\n#pam-service=lightdm-autologin|g" $pkgdir/etc/lightdm/lightdm.conf
install -d -m770 $pkgdir/run/lightdm
# Doing Autologin and security fixes
cp ../lightdm-autologin.pam $pkgdir/etc/pam.d/lightdm-autologin
cp ../lightdm.pam $pkgdir/etc/pam.d/lightdm
}
md5sums=('bea9fc58a1798bcf76808225e0bf4f22'
'6699eb35f65ff498d1d05e6782f4f902'
'b9781cdb3aaae3755f21c7852dcc76bf'
'e6d573b1913f3aa020cbde3863ee80f0'
'b1e1baf7351ff58c7b3b9b204472f6bb'
'683bc8bc3f423157065dc6295f9fecef'
'9e39da461e36f9d3fdd4447a80ebd878'
'94b407926e12db7c79932a127e778a30')

View file

@ -0,0 +1,20 @@
#%PAM-1.0
auth requisite pam_nologin.so
auth required pam_env.so
auth requisite pam_permit.so
auth sufficient pam_succeed_if.so uid >= 1000 quiet
auth required pam_deny.so
account required pam_access.so
account required pam_time.so
account required pam_unix.so
password required pam_deny.so
session required pam_loginuid.so
-session optional pam_systemd.so
session optional pam_keyinit.so revoke
session required pam_limits.so
session required pam_unix.so

View file

@ -0,0 +1,14 @@
[Unit]
Description=LightDM Display Manager
After=systemd-user-sessions.service
Conflicts=plymouth-quit.service
After=plymouth-quit.service
[Service]
ExecStart=/usr/sbin/lightdm
StandardOutput=syslog
[Install]
WantedBy=graphical.target
Alias=display-manager.service

View file

@ -0,0 +1,19 @@
pkgname=lightdm
post_install() {
getent group lightdm > /dev/null 2>&1 || groupadd -g 620 lightdm
getent passwd lightdm > /dev/null 2>&1 || useradd -c 'LightDM Display Manager' -u 620 -g lightdm -d /var/run/lightdm -s /sbin/nologin lightdm
passwd -l lightdm > /dev/null
chown -R lightdm:lightdm /var/run/lightdm > /dev/null
chmod +r /etc/lightdm/lightdm.conf
echo "You need to install lightdm-gtk-greeter to run the default and most stable greeter"
}
post_upgrade() {
post_install
}
post_remove() {
getent passwd lightdm > /dev/null 2>&1 && userdel lightdm
getent group lightdm > /dev/null 2>&1 && groupdel lightdm
}

25
aur/lightdm/lightdm.pam Normal file
View file

@ -0,0 +1,25 @@
#%PAM-1.0
# Block login if they are disabled
auth required pam_nologin.so
# Load environment from /etc/environment and ~/.pam_environment
auth required pam_env.so
# Use /etc/passwd and /etc/shadow for passwords
auth required pam_unix.so
# Check account is active, change password if required
account required pam_unix.so
# Allow password to be changed
password required pam_unix.so
# Setup session
session required pam_unix.so
-session optional pam_systemd.so
session required pam_limits.so
# Allow user to automatically unlock the default gnome-keyring
-auth optional pam_gnome_keyring.so
-session optional pam_gnome_keyring.so auto_start

36
aur/lightdm/lightdm.rc Executable file
View file

@ -0,0 +1,36 @@
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
PID=$(pidof -o %PPID /usr/sbin/lightdm)
case "$1" in
start)
stat_busy "Starting LightDM"
[ -z "$PID" ] && /usr/sbin/lightdm &>/dev/null &
if [ $? -gt 0 ]; then
stat_fail
else
add_daemon lightdm
stat_done
fi
;;
stop)
stat_busy "Stopping LightDM"
[ ! -z "$PID" ] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon lightdm
stat_done
fi
;;
restart)
$0 stop
sleep 3
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0

View file

@ -0,0 +1,11 @@
[Unit]
Description=LightDM Display Manager
After=systemd-user-sessions.service
[Service]
ExecStart=/usr/sbin/lightdm
StandardOutput=syslog
[Install]
WantedBy=graphical.target
Alias=display-manager.service

View file

@ -0,0 +1 @@
d /run/lightdm 0770 lightdm lightdm -

69
aur/lightdm/xsession Executable file
View file

@ -0,0 +1,69 @@
#!/bin/sh
#
# LightDM wrapper to run around X sessions.
echo "Running X session wrapper"
# Load profile
for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do
if [ -f "$file" ]; then
echo "Loading profile from $file";
. "$file"
fi
done
# Load resources
for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do
if [ -f "$file" ]; then
echo "Loading resource: $file"
xrdb -nocpp -merge "$file"
fi
done
# Load keymaps
for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do
if [ -f "$file" ]; then
echo "Loading keymap: $file"
setxkbmap `cat "$file"`
XKB_IN_USE=yes
fi
done
# Load xmodmap if not using XKB
if [ -z "$XKB_IN_USE" ]; then
for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do
if [ -f "$file" ]; then
echo "Loading modmap: $file"
xmodmap "$file"
fi
done
fi
unset XKB_IN_USE
# Run all system xinitrc shell scripts.
xinitdir="/etc/X11/xinit/xinitrc.d"
if [ -d "$xinitdir" ]; then
for script in $xinitdir/*; do
echo "Loading xinit script $script"
if [ -x "$script" -a ! -d "$script" ]; then
. "$script"
fi
done
fi
# Load Xsession scripts
xsessionddir="/etc/X11/Xsession.d"
if [ -d "$xsessionddir" ]; then
for i in `ls $xsessionddir`; do
script="$xsessionddir/$i"
echo "Loading X session script $script"
if [ -r "$script" -a -f "$script" ] && expr "$i" : '^[[:alnum:]_-]\+$' > /dev/null; then
. "$script"
fi
done
fi
echo "X session wrapper complete, running session $@"
exec $@