# $Id$ PNAME="slim" PVER="1.3.6" PBUILD="r10" 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/libstdc++-8.3" SDEPEND=">= dev-util/pkgconfig-0.25 >= virtual/xproto >= virtual/sed >= x11-libs/libXmu-dev-1.1 >= x11-libs/libX11-dev-1.6 >= x11-libs/libXpm-dev-3.5 >= x11-libs/libXft-dev-2.2 >= x11-libs/libXrandr-dev-1.5 >= media-libs/libpng-dev-1.5 >= virtual/libjpeg-dev >= sys-libs/libstdc++-dev-8.3" PROVIDE="virtual/graphical-login" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" ALX_PKG_KEEP="etc/slim.conf etc/tmpfiles.d usr/bin/slim usr/$(mlibdir)/libslim.so.* usr/lib/systemd usr/share/slim/themes/default" sminclude mtools cmake systemd alx-split SVC_REV=1.4 TMPFILES_REV=1.2 # += to add injection files (alx.sminc) 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}/${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 # alx: enable autologin for user station sed -i -e "s:#default_user.*:default_user station:" \ -e "s:#auto_login.*:auto_login yes:" \ slim.conf || die } src_compile() { cd ${SRCDIR} cmake_configure $(cmake_opt USE_PAM no) $(cmake_opt USE_CONSOLEKIT no) || die mmake || die } alx_generic_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 # install a custom slim.conf echo -e ${COLGREEN}" injecting custom slim-configs"${COLDEFAULT} mcinjectfile alx-slim.theme /usr/share/slim/themes/default/slim.theme || die mcinjectfile alx-panel.png /usr/share/slim/themes/default/panel.png || die mcinjectfile alx-thinclient-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 } preinstall() { add_conf_prot_mask /etc/slim.conf /etc/tmpfiles.d } postinstall() { mstartunit slim.service } postremove() { mstopunit slim.service }