# $Id$ PNAME="alxconfig-ng" PVER="0.6.8.99" PBUILD="r1" PCATEGORIE="app-alx" DESCRIPTION="alxconfig-ng, configures alx clients via mysql." HOMEPAGE="http://www.magellan-linux.net" DEPEND=">= sys-apps/mage-release-0 >= app-text/xmlstarlet-1.1 >= dev-db/mysql-5.1 >= sys-apps/hwinfo-18" SRCFILE="${PNAME}-${PVER/_/-}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER/_/-}" REMOVE_DEPRECATED_MAGE_TARGETS=1 sminclude mtools alx SRC_URI=( mirror://${PNAME}/${SRCFILE} ) src_prepare() { munpack ${SRCFILE} || die } src_install() { cd ${SRCDIR} make DESTDIR=${BINDIR} install || die } preinstall() { add_conf_prot_mask /etc/rc.d /etc/alxconfig-ng/skel \ /etc/alxconfig-ng/ica-sessions/icons \ /etc/conf.d/hwsetup add_conf_prot_ignore /etc/alxconfig-ng/config.rc } postinstall() { # install user station if needed (uucp is needed to access serial ports [ica-mappings]) ${MLIBDIR}/museradd -o "-g users -G audio,video,uucp -d /home/station -s /bin/bash" station [ ! -d ${MROOT}/home/station ] && install -o station -g users -d ${MROOT}/home/station # setup runlevels # but never start the services! MAGE_BOOTSTRAP=true mstartservice alxsettings MAGE_BOOTSTRAP=true mstartservice alxsetstate # not needed with alxconfig >= 0.6.0 local i for i in skel/fluxbox/init \ skel/fluxbox/apps \ skel/fluxbox/keys \ skel/idesk \ skel/samba \ skel/xtdesktop do if [[ -f ${MROOT}/etc/alxconfig-ng/${i} ]] then rm ${MROOT}/etc/alxconfig-ng/${i} || die ${i} fi if [[ -d ${MROOT}/etc/alxconfig-ng/${i} ]] then rm -r ${MROOT}/etc/alxconfig-ng/${i} || die ${i} fi done alx_postinstall }