# $Id$ PNAME="mage" PVER="0.4.29" PBUILD="r3" PCATEGORIE="app-mage" # keep this state here for older smage versions (< 0.4.27) # which cannot handle a global distribution file # # on all other smagefiles this variable can be kept too, # but it gets always overriden by the global distribution # file params and it is suggested to drop the local STATE variable # STATE="unstable" DESCRIPTION="Magellan Package Manager." HOMEPAGE="http://magellan-linux.de/" DEPEND="" SRCFILE="${PNAME}-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" REMOVE_DEPRECATED_MAGE_TARGETS=1 sminclude alx SRC_URI=( mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-${PVER}-busybox-tar-does-not-support-J-option-for-xz.patch mirror://${PNAME}/${PNAME}-${PVER}-unpack-pkgs-while-installation.patch ) src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # unpack packages while installation phase, no extra unpack phase to save space # upstream patch from 0.4.94 mpatch ${PNAME}-${PVER}-unpack-pkgs-while-installation.patch || die # busybox tar does not support -J option for xz mpatch ${PNAME}-${PVER}-busybox-tar-does-not-support-J-option-for-xz.patch || die } src_install() { cd ${SRCDIR} make DESTDIR=${BINDIR} install || die # fix version echo "${PVER}-${PBUILD}" > ${BINDIR}/usr/lib/mage/version || die } preinstall() { add_conf_prot_mask /etc/mage.rc.example /etc/etc-update.conf } 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 alx_postinstall }