# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="SLiM - Simple Login Manager" HOMEPAGE="http://slim.berlios.de/" SRC_URI="http://download.berlios.de/${PN}/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" DEPEND="virtual/x11 media-libs/freetype media-libs/libpng" S=${WORKDIR}/${P} src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/${PN}-cflags.patch # epatch ${FILESDIR}/${P}-daemon-configoption.patch if [ -e /etc/init.d/xdm ] && [ -z "`grep slim /etc/init.d/xdm`" ]; then einfo "Patching /etc/init.d/xdm file..." cp /etc/init.d/xdm . epatch ${FILESDIR}/${PN}-xdm.patch fi # Remove all X11R6 references from slim.conf sed -i -e 's#X11R6/##g' -e 's#/usr/bin:##' slim.conf } src_compile() { emake CXXFLAGS="${CXXFLAGS}" CFLAGS="${CFLAGS}" || die "emake failed" } src_install() { make DESTDIR=${D} install || die dodoc xinitrc.sample README TODO THEMES exeinto /etc/init.d newexe ${FILESDIR}/slim.rc slim doexe xdm } pkg_postinst() { einfo "The configuration file for SLiM is located at /etc/slim.conf." einfo "You will need to make changes to this file based on your" einfo "preferences and system. If you wish SLiM to start automatically" einfo "run rc-update add xdm default and edit rc.conf." einfo einfo "SLiM uses .xinitrc in the user's home directory and /etc/slim.conf" einfo "for session management. For further information, see README and" einfo "xinitrc.sample in /usr/share/doc/${PF}" } pkg_postrm() { patch -R --no-backup-if-mismatch /etc/init.d/xdm ${FILESDIR}/${PN}-xdm.patch }