buildpkg/newpkg
Tom G. Christensen 80e4a9d3fc Separate buildtree and buildpkg code
Code is now located via BUILDPKG_SCRIPTS while the buildtree is located
via BUILDPKG_BASE.
2010-01-10 11:51:27 +01:00

39 lines
954 B
Bash

#!/bin/bash
#
# A simple script to create a sandbox for a new package
#
# params: $1=topdir ie. bash
#
. ${BUILDPKG_SCRIPTS}/buildpkg.functions
REQ_DIRS="stage src meta"
arg1=${1-'x'}
if [ "$arg1" == "x" ]; then
error $E_MISSING_ARGS
else
setdir "$buildpkgbase"
fi
echo "Creating sandbox for $arg1"
${__mkdir} "$arg1"
for i in $REQ_DIRS
do
${__mkdir} $arg1/$i
done
${__cp} $buildpkgscripts/build.sh.generic $arg1/build.sh
if [ "$(${__uname} -s)" == "IRIX" -o "$(${__uname} -s)" == "IRIX64" ]; then
${__sed} -e 's;bin/bash;usr/tgcware/bin/bash;g' $arg1/build.sh > $arg1/build.sh.tmp
${__mv} $arg1/build.sh.tmp $arg1/build.sh
${__cp} $buildpkgscripts/pkgdef.template.irix $arg1/meta/pkgdef
fi
if [ "$(${__uname} -s)" == "SunOS" ]; then
${__cp} $buildpkgscripts/pkgdef.template $arg1/meta/pkgdef
fi
${__cp} $buildpkgscripts/relnotes.template.irix $arg1/meta/relnotes
# Make build script executable
chmod 755 $arg1/build.sh