# Tanım: hafif linux giriş yöneticisi
# URL: http://sourceforge.net/projects/lxdm/
# Paketçi: milisarge
# Gerekler: iso-codes librsvg xorg-libxinerama xorg-libxrandr xorg-libxcursor xorg-libxdamage gtk2 consolekit2 mate-themes

isim=lxdm
surum=0.5.3
devir=7
uisim=lxdm-a548c73
tema=lxdm-tema
tsurum=1.1

kaynak=(http://kaynaklar.milislinux.org/$uisim.tar.xz
https://github.com/yasarciv/$tema/archive/$tsurum.tar.gz
lxdm.in.patch
lxdm.conf.in.patch
lxdm.pam
Xsession)

derle() {
    
    cd $uisim
    patch -Np1 < ../lxdm.in.patch
    patch -Np1 < ../lxdm.conf.in.patch
	cp ../lxdm.pam pam/lxdm
	cp ../Xsession data/Xsession
    ./autogen.sh   
    ./configure --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc \
    	    --libexecdir=/usr/lib/lxdm --localstatedir=/var 
    make
    make DESTDIR=$PKG install
    
    install -dm 755 ${PKG}/var/lib/lxdm    
    echo 'GDK_CORE_DEVICE_EVENTS=true' > "$PKG"/var/lib/lxdm/.pam_environment
    
    #milis linux temasının ayarlanması
	cp -r ${SRC}/$tema-$tsurum/lxdm-themes/Milis-Lxdm-Tema "$PKG/usr/share/lxdm/themes"
	cp ${SRC}/$tema-$tsurum/lxdm/lxdm.conf "$PKG/etc/lxdm/" 
	cd /sources/milis.git/ayarlar/servisler
	make DESTDIR=$PKG kur-lxdm       
}