# $Id$ PNAME="slim" PVER="1.3.5" PBUILD="r3" PCAT="x11-misc" DESCRIPTION="SLiM is a Desktop-independent graphical login manager for X11." HOMEPAGE="http://slim.berlios.de/" DEPEND=">= x11-libs/libXmu-1.1 >= x11-libs/libX11-1.4 >= x11-libs/libXpm-3.5 >= x11-libs/libXft-2.2 >= media-libs/libpng-1.5 >= media-libs/libjpeg-8 >= sys-libs/pam-1.1 >= sys-libs/libstdc++-4.6" SDEPEND=">= dev-util/pkgconfig-0.25 >= x11-proto/xproto-7 >= sys-apps/sed-4" PROVIDE="virtual/graphical-login" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" SVC_REV=1.4 TMPFILES_REV=1.2 PAMD_REV=1.3 sminclude mtools cmake SRC_URI=( http://download.berlios.de/${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/slim.service-${SVC_REV} mirror://${PNAME}/slim.tmpfiles-${TMPFILES_REV} mirror://${PNAME}/slim.logrotate mirror://${PNAME}/slim.pamd-${PAMD_REV} mirror://${PNAME}/magellan-slim.theme mirror://${PNAME}/magellan-panel.png mirror://${PNAME}/magellan-wallpaper.png ) UP2DATE="updatecmd_berlios ${PNAME}" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # rename sim.lock to sim.pid and enable daemon mode by default # fix the shutdown and reboot commands to match busybox # secure x11 with -nolisten tcp # and usr /run instead of /var/run sed -i -e "s:/var/run/slim.lock:/run/slim.pid:" \ -e "s:/var/run/slim.auth:/run/slim.auth:" \ -e "s:# daemon.*:daemon\tyes:" \ -e "s:^\(halt_cmd.*\):\1\t/sbin/halt:" \ -e "s:^\(reboot_cmd.*\):\1\t/sbin/reboot:" \ -e "s:#xserver_arguments.*:xserver_arguments\t-nolisten tcp vt01:" \ slim.conf || die } src_compile() { cd ${SRCDIR} cmake_configure $(cmake_opt USE_PAM yes) $(cmake_opt USE_CONSOLEKIT no) || die mmake || die } src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} install || die minstallunit slim.service-${SVC_REV} slim.service || die minstalltmp slim.tmpfiles-${TMPFILES_REV} slim.conf || die minstallpam slim.pamd-${PAMD_REV} slim || die minstalllog slim.logrotate slim || die # theme minstallfile -s magellan-slim.theme /usr/share/slim/themes/default/slim.theme || die minstallfile -s magellan-panel.png /usr/share/slim/themes/default/panel.png || die minstallfile -s magellan-wallpaper.png /usr/share/slim/themes/default/background.png || die if [ -f ${BINDIR}/usr/share/slim/themes/default/background.jpg ] then rm ${BINDIR}/usr/share/slim/themes/default/background.jpg || die fi } postinstall() { mstartunit slim.service } postremove() { mstopunit slim.service }