# $Id$ PNAME="slim" PVER="1.3.6" PBUILD="r8" 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.6 >= x11-libs/libXpm-3.5 >= x11-libs/libXft-2.2 >= x11-libs/libXrandr-1.5 >= media-libs/libpng-1.5 >= virtual/libjpeg >= sys-libs/pam-1.1 >= sys-libs/libstdc++-6.3 >= app-crypt/libgcrypt-1.7" SDEPEND=">= dev-util/pkgconfig-0.25 >= virtual/xproto >= virtual/sed" 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 systemd 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 mirror://${PNAME}/${PNAME}-${PVER}-add-sessiondir.patch mirror://${PNAME}/${PNAME}-${PVER}-fix-libslim-libraries.patch mirror://${PNAME}/${PNAME}-${PVER}-only-build-slimlock-with-pam.patch ) UP2DATE="updatecmd_berlios ${PNAME}" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # fix linking mpatch ${PNAME}-${PVER}-fix-libslim-libraries.patch || die # enable the new session dir support mpatch ${PNAME}-${PVER}-add-sessiondir.patch || die # fix build without pam enabled mpatch ${PNAME}-${PVER}-only-build-slimlock-with-pam.patch || die # fix location of systemd services and libslim sed -i -e 's:set(LIBDIR "/lib"):set(LIBDIR "/usr/lib"):' \ -e "s:LIBRARY DESTINATION lib:LIBRARY DESTINATION $(mlibdir):" \ -e "s:ARCHIVE DESTINATION lib:ARCHIVE DESTINATION $(mlibdir):" \ CMakeLists.txt || die # 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 # we use our own service file to honor plymouth and tty1 X11 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 }