Lo riporto dal forum Gentoo ritenendolo molto utile, questo scriptino di FonderiaDigitale permette di copiare una ebuild e modificarla, piazzandola nell'overlay.
http://forums.gentoo.org/viewtopic.php?t=188157
codice:
#!/bin/sh
versione="0.1"
source /etc/make.conf
function die
{
echo "$1"
exit 0
}
function help
{
echo "Ebuildcopy $versione by Giovanni Ferri <fonderiadigitale@gechi.it"
echo "License: GPL-2"
echo "Usage: ebuildcopy [=]package-version new_version_number"
echo "It will copy the old ebuild in your portage overlay (${PORTDIR_OVERLAY})"
echo "with the new version number and optionally, let you edit it."
exit 1
}
function ask
{
echo -n "Do you want to edit it right now?"
read a
case "$a" in
"y"|"yes")
[ -z "$EDITOR" ] && EDITOR=/bin/nano
$EDITOR ${NEWEBUILD}
;;
"n"|"no") continue
;;
*)
echo "Wrong answer."
ask
;;
esac
}
[ -z "$1" ] && help
[ -z "$2" ] && help
oldpkg=${1/=/}
ver=${oldpkg##*[a-Z]*-}
item=${oldpkg%%-$ver}
[ "$item" == "$ver" ] && help
[ -z "${PORTDIR}" ] && PORTDIR=/usr/portage
[ -z "${DISTDIR}" ] && DISTDIR=/usr/portage/distfiles
t=`expr "${PORTAGE_TMPDIR}" : "${PORTDIR}"`
[ "$t" > 0 ] && PURGETMP="-type d -name ${PORTAGE_TMPDIR} -prune"
if [ -z "${PORTDIR_OVERLAY}" ]
then
die "You need to set your overlay directory!"
else
MATCHLIST="`find ${PORTDIR} -type d -name ${PORTDIR_OVERLAY} -prune -type d -name ${DISTDIR} -prune $PURGETMP -o -iname $item -type d -maxdepth 2 -print`"
[ -z "$MATCHLIST" ] && die "No matches."
echo -e "\n\nFound package portage directory."
PACKAGE=`basename $MATCHLIST`
e=`dirname $MATCHLIST`
CATEGORY=`basename $e`
NEWDIR="${PORTDIR_OVERLAY}/$CATEGORY/$PACKAGE"
mkdir -p $NEWDIR/files
EBUILD=$MATCHLIST/$item-$ver.ebuild
NEWEBUILD=$NEWDIR/$item-$2.ebuild
[ -f ${EBUILD} ] || die "No ebuild found for the package specified. Sorry."
cp ${EBUILD} ${NEWEBUILD}
find $MATCHLIST/files -name *digest* -prune -o -type f -exec cp {} $NEWDIR/files \;
echo -e "Found package version. Ebuild copied and renamed.\n\n`ls -l --color ${NEWEBUILD}`"
fi
ask
echo -e "\nCreating digest for $PACKAGE version $2...\n"
ebuild ${NEWEBUILD} digest
echo "Done copying ebuild :)"
Lo so che risale a gennaio però magari può essere sfuggito.. Ho fatto una ricerca prima di postare e non ho trovato niente, nel caso fosse arcinoto, mi scuso