diff --git a/system/lxdm/README b/system/lxdm/README new file mode 100644 index 0000000000..774b64c87e --- /dev/null +++ b/system/lxdm/README @@ -0,0 +1,3 @@ +LXDM - GUI login manager for LXDE + +LXDM is a lightweight drop-in replacement for GDM or KDM. diff --git a/system/lxdm/doinst.sh b/system/lxdm/doinst.sh new file mode 100644 index 0000000000..cf5a8ab51d --- /dev/null +++ b/system/lxdm/doinst.sh @@ -0,0 +1,22 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/lxdm/LoginReady.new +config etc/lxdm/PostLogin.new +config etc/lxdm/PostLogout.new +config etc/lxdm/PreLogin.new +config etc/lxdm/PreReboot.new +config etc/lxdm/PreShutdown.new +config etc/lxdm/lxdm.conf.new +config etc/lxdm/xinitrc.new + diff --git a/system/lxdm/lxdm.SlackBuild b/system/lxdm/lxdm.SlackBuild new file mode 100644 index 0000000000..fd990cd44d --- /dev/null +++ b/system/lxdm/lxdm.SlackBuild @@ -0,0 +1,121 @@ +#!/bin/sh + +# Slackware build script for lxdm + +# Copyright 2010 Robby Workman, Northport, Alabama, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=lxdm +VERSION=${VERSION:-0.2.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Patch the Xsession file to source /etc/profile and xprofile on session start +patch -p1 < $CWD/source_profile_in_Xsession.diff + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --without-pam \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +# We said --without-pam +rm -rf $PKG/etc/pam.d + +# Install a to-be-customized-if-needed /etc/lxdm/xinitrc +cat << EOF > $PKG/etc/lxdm/xinitrc.new +#!/bin/sh +# This file is referenced from /etc/lxdm/Xsession +# This is for system-specific customization if desired + +EOF + +# Don't clobber configs on upgrade +# But *do* clobber Xsession +for file in LoginReady PostLogin PostLogout PreLogin PreReboot PreShutdown lxdm.conf ; + do mv $PKG/etc/lxdm/$file $PKG/etc/lxdm/$file.new ; +done + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/lxdm/lxdm.info b/system/lxdm/lxdm.info new file mode 100644 index 0000000000..2f6b2d489d --- /dev/null +++ b/system/lxdm/lxdm.info @@ -0,0 +1,10 @@ +PRGNAM="lxdm" +VERSION="0.2.0" +HOMEPAGE="http://lxde.org/" +DOWNLOAD="http://downloads.sourceforge.net/lxde/lxdm-0.2.0.tar.gz" +MD5SUM="e539f81ba691f2b0cb2017b82dfee58f" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Robby Workman" +EMAIL="rw@rlworkman.net" +APPROVED="Erik Hanson" diff --git a/system/lxdm/slack-desc b/system/lxdm/slack-desc new file mode 100644 index 0000000000..39f0de243a --- /dev/null +++ b/system/lxdm/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +lxdm: LXDM (GUI login manager for LXDE) +lxdm: +lxdm: LXDM is a lightweight drop-in replacement for GDM or KDM. +lxdm: +lxdm: +lxdm: +lxdm: +lxdm: +lxdm: +lxdm: +lxdm: diff --git a/system/lxdm/source_profile_in_Xsession.diff b/system/lxdm/source_profile_in_Xsession.diff new file mode 100644 index 0000000000..8f19e31284 --- /dev/null +++ b/system/lxdm/source_profile_in_Xsession.diff @@ -0,0 +1,17 @@ +diff -Nur lxdm-0.2.0.orig//data/Xsession lxdm-0.2.0/data/Xsession +--- lxdm-0.2.0.orig//data/Xsession 2010-04-12 11:49:44.000000000 -0500 ++++ lxdm-0.2.0/data/Xsession 2010-06-26 04:55:43.301983179 -0500 +@@ -2,6 +2,13 @@ + + # use bash for "exec -l", howto run login shell by /bin/sh ? + ++# First read /etc/profile and .profile ++test -f /etc/profile && . /etc/profile ++test -f "$HOME/.profile" && . "$HOME/.profile" ++# Second read /etc/xprofile and .xprofile for X specific setup ++test -f /etc/xprofile && . /etc/xprofile ++test -f "$HOME/.xprofile" && . "$HOME/.xprofile" ++ + if [ $# -eq 1 -a -n "$1" ]; then + LXSESSION=$1 + else