Separate buildtree and buildpkg code
Code is now located via BUILDPKG_SCRIPTS while the buildtree is located via BUILDPKG_BASE.
This commit is contained in:
parent
2c45b58592
commit
80e4a9d3fc
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# This is a buildpkg build.sh script
|
||||
# build.sh helper functions
|
||||
. ${BUILDPKG_BASE}/scripts/build.sh.functions
|
||||
. ${BUILDPKG_SCRIPTS}/build.sh.functions
|
||||
#
|
||||
###########################################################
|
||||
# Check the following 4 variables before running the script
|
||||
@ -13,7 +13,7 @@ source[0]=$topdir-$version.tar.gz
|
||||
patch[0]=
|
||||
|
||||
# Source function library
|
||||
. ${BUILDPKG_BASE}/scripts/buildpkg.functions
|
||||
. ${BUILDPKG_SCRIPTS}/buildpkg.functions
|
||||
|
||||
reg prep
|
||||
prep()
|
||||
|
@ -24,7 +24,15 @@
|
||||
#
|
||||
buildpkgbase=${BUILDPKG_BASE-'x'}
|
||||
if [ "$buildpkgbase" == "x" ]; then
|
||||
echo "You *Must* define BUILDPKG_BASE environment variable"
|
||||
echo "You *must* define BUILDPKG_BASE environment variable"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We rely on an environment variable called BUILDPKG_SCRIPTS to
|
||||
# define where the buildpkg code is located
|
||||
buildpkgscripts=${BUILDPKG_SCRIPTS-'x'}
|
||||
if [ "$buildpkgscripts" == "x" ]; then
|
||||
echo "You *must* define BUILDPKG_SCRIPTS environment variable"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -46,11 +54,10 @@ fi
|
||||
# patches must be in uncompressed format
|
||||
|
||||
# Define tools programs in __ prefixed namespace
|
||||
. $BUILDPKG_BASE/scripts/buildpkg.tools
|
||||
. $BUILDPKG_SCRIPTS/buildpkg.tools
|
||||
|
||||
# Define defaults
|
||||
pkgdir=${PWD##*/} # topdir under $BUILDPKG_BASE
|
||||
buildpkgbase=$BUILDPKG_BASE
|
||||
stagedir=$buildpkgbase/$pkgdir/stage
|
||||
srcdir=$buildpkgbase/$pkgdir/src
|
||||
patchdir=$srcdir # Allow the possibility of easily putting a load of patches in a different location
|
||||
@ -955,9 +962,9 @@ generic_install_perl()
|
||||
# This function should be implemented in the pr. packaging system
|
||||
# function library.
|
||||
case $OSTYPE in
|
||||
solaris*) . $buildpkgbase/scripts/buildpkg.packaging.solaris
|
||||
solaris*) . $buildpkgscripts/buildpkg.packaging.solaris
|
||||
;;
|
||||
irix*) . $buildpkgbase/scripts/buildpkg.packaging.irix
|
||||
irix*) . $buildpkgscripts/buildpkg.packaging.irix
|
||||
;;
|
||||
*) echo "No packaging system function library available for this OS"
|
||||
;;
|
||||
|
@ -30,8 +30,8 @@ SHOWFILES="/usr/sbin/showfiles"
|
||||
HOSTNAME=/usr/bsd/hostname
|
||||
|
||||
# Configuration vars
|
||||
imageconf=$buildpkgbase/scripts/image.conf
|
||||
subsysconf=$buildpkgbase/scripts/subsys.conf
|
||||
imageconf=$buildpkgscripts/image.conf
|
||||
subsysconf=$buildpkgscripts/subsys.conf
|
||||
idbfile=$metadir/$topdir.idb
|
||||
specfile=$metadir/$topdir.spec
|
||||
depends=$metadir/depends
|
||||
@ -140,7 +140,7 @@ configure_args='--prefix=$prefix --mandir=${prefix}/${_mandir} --infodir=${prefi
|
||||
META_CLEAN="$topdir.spec $topdir.idb files.tmp ${depends##*/}_auto ${depends##*/}_all sums"
|
||||
|
||||
# Host specific configuration
|
||||
[ -r $buildpkgbase/scripts/config.$($HOSTNAME -s).irix ] && . $buildpkgbase/scripts/config.$($HOSTNAME -s).irix
|
||||
[ -r $buildpkgscripts/config.$($HOSTNAME -s).irix ] && . $buildpkgscripts/config.$($HOSTNAME -s).irix
|
||||
|
||||
distfile='$topdir-$version-$pkgver.tgc-$os-$cpu-$pkgdirdesig.tardist'
|
||||
|
||||
@ -1049,7 +1049,7 @@ auto_rel()
|
||||
done
|
||||
if [ -z ${rn} ]; then
|
||||
echo "auto_rel: Using global relnotes template"
|
||||
rn=${BUILDPKG_BASE}/scripts/relnotes.template.irix
|
||||
rn=$buildpkgscripts/relnotes.template.irix
|
||||
fi
|
||||
local relmetadir=${stagedir}${metainstalldir}relnotes/$topdir-$version-$pkgver
|
||||
# compute configure info for relnotes
|
||||
|
@ -64,7 +64,7 @@ os=sunos`${__uname} -r`
|
||||
#esac
|
||||
|
||||
# Default pkginfo.in file
|
||||
pkginfo=$buildpkgbase/scripts/pkginfo.in
|
||||
pkginfo=$buildpkgscripts/pkginfo.in
|
||||
|
||||
# Variables that control functionality
|
||||
usedepend=1 # default to looking for a depend file in $metadir
|
||||
@ -94,7 +94,7 @@ _infodir=share/info
|
||||
configure_args='--prefix=$prefix --mandir=${prefix}/${_mandir} --infodir=${prefix}/${_infodir}'
|
||||
|
||||
# Host specific configuration
|
||||
[ -r $buildpkgbase/scripts/config.`hostname`.solaris ] && . $buildpkgbase/scripts/config.`hostname`.solaris
|
||||
[ -r $buildpkgscripts/config.`hostname`.solaris ] && . $buildpkgscripts/config.`hostname`.solaris
|
||||
|
||||
# Distfiles should be named like this
|
||||
# <name>-<version>-<pkgver>.sb-<os>-<arch>-<pkgdirdesig>
|
||||
@ -357,7 +357,7 @@ auto_rel()
|
||||
# No local relnotes use global template
|
||||
if [ ! -r "${rn}" ]; then
|
||||
echo "auto_rel: Using global relnotes template"
|
||||
rn=${BUILDPKG_BASE}/scripts/relnotes.template.irix
|
||||
rn=$buildpkgscripts/relnotes.template.irix
|
||||
fi
|
||||
local relmetadir=${stagedir}${metainstalldir}relnotes/$secname-$version-$pkgver
|
||||
### compute configure info for relnotes
|
||||
|
10
newpkg
10
newpkg
@ -4,7 +4,7 @@
|
||||
#
|
||||
# params: $1=topdir ie. bash
|
||||
#
|
||||
. ${BUILDPKG_BASE}/scripts/buildpkg.functions
|
||||
. ${BUILDPKG_SCRIPTS}/buildpkg.functions
|
||||
|
||||
REQ_DIRS="stage src meta"
|
||||
|
||||
@ -22,17 +22,17 @@ do
|
||||
${__mkdir} $arg1/$i
|
||||
done
|
||||
|
||||
${__cp} scripts/build.sh.generic $arg1/build.sh
|
||||
${__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} scripts/pkgdef.template.irix $arg1/meta/pkgdef
|
||||
${__cp} $buildpkgscripts/pkgdef.template.irix $arg1/meta/pkgdef
|
||||
fi
|
||||
|
||||
if [ "$(${__uname} -s)" == "SunOS" ]; then
|
||||
${__cp} scripts/pkgdef.template $arg1/meta/pkgdef
|
||||
${__cp} $buildpkgscripts/pkgdef.template $arg1/meta/pkgdef
|
||||
fi
|
||||
|
||||
${__cp} scripts/relnotes.template.irix $arg1/meta/relnotes
|
||||
${__cp} $buildpkgscripts/relnotes.template.irix $arg1/meta/relnotes
|
||||
# Make build script executable
|
||||
chmod 755 $arg1/build.sh
|
||||
|
Loading…
x
Reference in New Issue
Block a user