#Maintainer: George Vlahavas <vlahavas~at~gmail~dot~com>

pkgname=slim
pkgver=1.3.1
pkgrel=1gv
arch=i486
source=("http://download.berlios.de/slim/slim-1.3.1.tar.gz"
"http://download.berlios.de/slim/slim-fingerprint.tar.gz"
"http://download.berlios.de/slim/slim-flat.tar.gz"
"http://download.berlios.de/slim/slim-lake.tar.gz"
"http://download.berlios.de/slim/slim-rainbow.tar.gz"
"http://download.berlios.de/slim/slim-rear-window.tar.gz"
"http://download.berlios.de/slim/slim-scotland-road.tar.gz"
"http://download.berlios.de/slim/slim-wave.tar.gz"
"http://download.berlios.de/slim/slim-subway.tar.gz"
"http://download.berlios.de/slim/slim-parallel-dimensions.tar.gz"
"http://download.berlios.de/slim/slim-capernoited.tar.gz"
"http://download.berlios.de/slim/slim-mindlock.tar.gz"
"http://download.berlios.de/slim/slim-flower2.tar.gz")
sourcetemplate=http://pnboy.pinguix.com/gapan/$arch/$pkgname
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo" "themes")
url=http://slim.berlios.de/

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"slim - Simple Login Manager"
"SLiM is a Desktop-independent graphical login manager for X11, derived"
"from Login.app. It aims to be light and simple, although completely"
"configurable through themes and an option file; is suitable for"
"machines on which remote login functionalities are not needed."
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	sed -i "s/CFLAGS=/CFLAGS+= /" Makefile
	make || return 1
	make install DESTDIR=$startdir/pkg
	THEMES="fingerprint flat lake rainbow rear-window scotland-road wave subway parallel-dimensions capernoited mindlock flower2"
	for i in $THEMES; do
		cp -a $startdir/src/$i $startdir/pkg/usr/share/slim/themes
	done
	chown -R root:root $startdir/pkg/usr/share/slim/themes
	sed -i "s/current_theme\(.*\)/current_theme fingerprint/" $startdir/pkg/etc/slim.conf
}