# $Id$ PNAME="mage" PVER="0.4.9" PBUILD="r1" PCATEGORIE="app-mage" STATE="unstable" DESCRIPTION="Magellan Package Manager." HOMEPAGE="http://magellan-linux.de/" DEPEND="" SRCFILE="${PNAME}-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude cvs rsync alx # avaible options are source/rsync/cvs METHOD=source case ${METHOD} in cvs) SDEPEND=">= dev-util/cvs-1.11" ;; rsync) SDEPEND=">= net-misc/rsync-2.6.9" ;; source) SDEPEND="" ;; esac [[ ${METHOD} = source ]] && SRC_URI=( mirror://${PNAME}/${SRCFILE} ) src_prepare() { [[ ${METHOD} = source ]] && { munpack ${SRCFILE} || die; } if [[ ${METHOD} = rsync ]] then RSYNC_URI="rsync://magellan-linux.de/${PNAME}-${PVER}-${PBUILD}" rsync_fetch_source || die fi if [[ ${METHOD} = cvs ]] then MY_CVS_MODULE="magellan-src/mage" # $PVER must be eg 0_3_3 MY_CVS_OPTS="-r mage-$(echo ${PVER}| sed -e "s|\.|\_|g")-${PBUILD}" export CVSROOT=:pserver:anonymous:@magellan-linux.de:/magellan-cvs cvs_fetch_source || die fi } src_install() { cd ${SRCDIR} make DESTDIR=${BINDIR} install || die # fix version echo "${PVER}-${PBUILD}" > ${BINDIR}/usr/lib/mage/version || die } postinstall() { local PVER PVER="$(echo ${PKGNAME} | cut -d- -f2)" echo echo -e "Important:" echo -e "\tIf you upgraded mage from a version < ${PVER}," echo -e "\tcheck '/etc/mage.rc.example' for new pathnames" echo -e "\tand copy expected files there." echo -e "\tEdit your /etc/mage.rc that it fits to the example file." echo echo -e "\tAlso select an profile from ${MAGEDIR}/profiles and link" echo -e "\tit to /etc/mage-profile." echo -e "\tex. 'ln -snf ${MAGEDIR}/profiles/kernel26 /etc/mage-profile'" echo }