2 # $Id: /var/cvsroot/gentoo-src/portage/Attic/tarball.sh,v 1.181.2.2 2005/05/01 16:04:51 jstubbs Exp $
6 echo "You need to have the version specified."
7 echo "e.g.: $0 2.0.39-r37"
15 export DEST="${TMP}/${PKG}-${V}"
16 export PREVEB="2.0.49_pre2"
18 ./tabcheck.py bin/emerge `find ./ -type f -name '*.py'`
20 if [ -e $TMP/${PKG}-${V} ]; then
26 install -d -m0755 ${DEST}
27 #get any binaries out of the way
31 for x in bin cnf man pym src
35 # Clean invalid sandbox sources
36 rm -rf ${DEST}/src/{sandbox,sandbox-dev}
37 cp ${DEST}/pym/portage.py ${DEST}/pym/portage.py.orig
38 sed '/^VERSION=/s/^.*$/VERSION="'${V}'"/' < ${DEST}/pym/portage.py.orig > ${DEST}/pym/portage.py
39 cp ${DEST}/man/emerge.1 ${DEST}/man/emerge.1.orig
40 sed "s/##VERSION##/${V}/g" < ${DEST}/man/emerge.1.orig > ${DEST}/man/emerge.1
41 rm ${DEST}/pym/portage.py.orig ${DEST}/man/emerge.1.orig
42 rm ${DEST}/man/*.eclass.5
44 sed -i -e "s:\t: :g" ChangeLog
48 find -name CVS -exec rm -rf {} \;
49 find -name '*~' -exec rm -rf {} \;
50 find -name '*.pyc' -exec rm -rf {} \;
51 find -name '*.pyo' -exec rm -rf {} \;
52 chown -R root:root ${DEST}
54 rm -f ${PKG}-${V}/bin/emerge.py ${PKG}-${V}/bin/{pmake,sandbox} ${PKG}-${V}/{bin,pym}/'.#'* ${PKG}-${V}/{bin,pym}/*.{orig,diff} ${PKG}-${V}/{bin,pym}/*.py[oc]
55 tar cjvf ${TMP}/${PKG}-${V}.tar.bz2 ${PKG}-${V}
57 #scp ${TMP}/${PKG}-${V}.tar.bz2 carpaski@twobit.net:/home/html/gentoo/portage/
58 #scp ${TMP}/${PKG}-${V}.tar.bz2 carpaski@zarquon.twobit.net:/home/www/localhost/htdocs/gentoo/portage/