### this file is sourced not run
PKGVER=0.5.3
PKGBUILD=1
PKGARCH=x86_64

# BLFS 8.2
TARBALL=lxdm-$PKGVER.tar.xz
MD5SUM=061caae432634e6db38bbdc84bc6ffa0
SRC_URL=http://downloads.sourceforge.net/lxdm/$TARBALL
BUNDLE=

# Require the xvkbd virtual keyboard so that it gets co-installed. Then the
# graphical login will display the virtual keyboard without further ado. If the
# user will remove the xvkbd package subsequently, the graphical login will
# continue working but without a virtual keyboard. Note that xvkbd is
# terminated when the user logs in so that a user who wants to use a virtual
# keyboard during the session may choose to autostart xvkbd or florence or yet
# another keyboard. xvkbd is required prior to login because florence can't
# focus lxdm's input entry field.
SLACKREQ='xvkbd'

SLACKDESC="lxdm: lxdm $PKGVER (Login Manager)
lxdm: The LXDM is a lightweight Display Manager (aka Login Manager) for the LXDE
lxdm: desktop. It does not require LXDE therefore it can also be used as an
lxdm: alternative to other Display Managers such as GNOME's GDM or LightDM.
lxdm: With the xvkbd package installed, lxdm will provide the graphical login
lxdm: screen with a virtual keyboard.
lxdm:
lxdm: https://sourceforge.net/projects/lxdm/
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/lxdm* &&
	while read p; do
		echo "+ patch -Np1 -i $p" >&2
		patch -Np1 -i "../pkg/$p" || return 1
	done < ../pkg/series
}

### default pkg_package
### build
pkg_build() {
	CONFFLAGS="$CONFFLAGS --disable-consolekit --enable-password --without-pam \
		--with-systemdsystemunitdir=/tmp"
	pkg_build_autoconf &&
	pkg_build_slackdesc &&
	install -m644 -t /install /tmp/pkg/install/{doinst.sh,slack-uninstall.sh} &&

	mkdir -p /etc/lxdm &&
	install -m755 -t /etc/lxdm \
		/tmp/pkg/lxdm/{LoginReady,PostLogin,PostLogout,PreLogin,PreReboot,PreShutdown,Xsession} &&
	install -m644 -t /etc/lxdm /tmp/pkg/lxdm/lxdm.conf
}


