summaryrefslogtreecommitdiffstats
path: root/tarball.sh
blob: c9718bcf59d372a3a1574b8e8a4e359ffa0e4441 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# $Id: /var/cvsroot/gentoo-src/portage/Attic/tarball.sh,v 1.181.2.2 2005/05/01 16:04:51 jstubbs Exp $

if [ -z "$1" ]; then
	echo
	echo "You need to have the version specified."
	echo "e.g.: $0 2.0.39-r37"
	echo
	exit 0
fi

export PKG="portage"
export TMP="/tmp"
export V="$1"
export DEST="${TMP}/${PKG}-${V}"
export PREVEB="2.0.49_pre2"

./tabcheck.py bin/emerge `find ./ -type f -name '*.py'`

if [ -e $TMP/${PKG}-${V} ]; then
	echo EXISTS ALREADY
	exit 1
fi

rm -rf ${DEST}
install -d -m0755 ${DEST}
#get any binaries out of the way
cd src/sandbox-1.1
make clean
cd ../..
for x in bin cnf man pym src 
do
	cp -ax $x ${DEST}
done
# Clean invalid sandbox sources
rm -rf ${DEST}/src/{sandbox,sandbox-dev}
cp ${DEST}/pym/portage.py ${DEST}/pym/portage.py.orig
sed '/^VERSION=/s/^.*$/VERSION="'${V}'"/' < ${DEST}/pym/portage.py.orig > ${DEST}/pym/portage.py
cp ${DEST}/man/emerge.1 ${DEST}/man/emerge.1.orig
sed "s/##VERSION##/${V}/g" < ${DEST}/man/emerge.1.orig > ${DEST}/man/emerge.1
rm ${DEST}/pym/portage.py.orig ${DEST}/man/emerge.1.orig
rm ${DEST}/man/*.eclass.5

sed -i -e "s:\t:  :g" ChangeLog
cp ChangeLog ${DEST}

cd ${DEST}
find -name CVS -exec rm -rf {} \;
find -name '*~' -exec rm -rf {} \;
find -name '*.pyc' -exec rm -rf {} \;
find -name '*.pyo' -exec rm -rf {} \;
chown -R root:root ${DEST}
cd $TMP
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]
tar cjvf ${TMP}/${PKG}-${V}.tar.bz2 ${PKG}-${V}

#scp ${TMP}/${PKG}-${V}.tar.bz2 carpaski@twobit.net:/home/html/gentoo/portage/
#scp ${TMP}/${PKG}-${V}.tar.bz2 carpaski@zarquon.twobit.net:/home/www/localhost/htdocs/gentoo/portage/