forked from Lainports/freebsd-ports
79 lines
2.3 KiB
Text
79 lines
2.3 KiB
Text
# Set up the build variables which are used by a given build
|
|
#
|
|
# Code fragment used by other scripts for commonality
|
|
|
|
buildenv () {
|
|
pb=$1
|
|
arch=$2
|
|
branch=$3
|
|
|
|
case "x$branch" in
|
|
x4)
|
|
export PKGSUFFIX=.tgz
|
|
export PKGZIPCMD=gzip
|
|
export INDEXFILE=INDEX
|
|
;;
|
|
x4-exp)
|
|
export PKGSUFFIX=.tgz
|
|
export PKGZIPCMD=gzip
|
|
export PORTS_AUDIT=1
|
|
export INDEXFILE=INDEX
|
|
;;
|
|
x5)
|
|
export PKGSUFFIX=.tbz
|
|
export PKGZIPCMD=bzip2
|
|
export INDEXFILE=INDEX-5
|
|
;;
|
|
*)
|
|
echo "buildenv: invalid branch"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
export ARCH=${arch}
|
|
export MACHINE_ARCH=${arch}
|
|
|
|
export XFREE86_VERSION=4
|
|
|
|
# Have to use realpath because 'make index' doesn't deal with symlinks in PORTSDIR
|
|
# - kk 020311
|
|
export PORTSDIR=$(realpath ${pb}/${arch}/${branch}/ports)
|
|
export SRCBASE=$(realpath ${pb}/${arch}/${branch}/src)
|
|
export SRCPREFIX=${SRCBASE} #XXX Which one is canonical?
|
|
|
|
export OSVERSION=$(awk '/^#define __FreeBSD_version/ {print $3}' < ${SRCBASE}/sys/sys/param.h)
|
|
export OSREL=$(awk 'BEGIN {FS="\""}; /^REVISION/ {print $2}' < ${SRCBASE}/sys/conf/newvers.sh)
|
|
export BRANCH=$(awk 'BEGIN {FS="\""}; /^BRANCH/ {print $2}' < ${SRCBASE}/sys/conf/newvers.sh)
|
|
|
|
export __MAKE_CONF=${pb}/${arch}/make.conf
|
|
|
|
export DISTDIR=${pb}/${arch}/${branch}/distfiles
|
|
export PACKAGES=${pb}/${arch}/${branch}/packages
|
|
|
|
export UNAME_m=${ARCH}
|
|
export UNAME_n=freebsd.org
|
|
export UNAME_p=${ARCH}
|
|
export UNAME_r=${OSREL}-${BRANCH}
|
|
export UNAME_s=FreeBSD
|
|
export UNAME_v="FreeBSD ${OSREL}-${BRANCH} #0: $(date) kris@freebsd.org:/usr/src/sys/magic/kernel/path"
|
|
|
|
export BATCH=1
|
|
export PACKAGE_BUILDING=1
|
|
|
|
export USA_RESIDENT=yes
|
|
|
|
# Old and mouldy?
|
|
export PORTOBJFORMAT=elf
|
|
export PARALLEL_PACKAGE_BUILD=1
|
|
export HAVE_MOTIF=1
|
|
|
|
export FTP_PASSIVE_MODE=yes
|
|
#export FETCH_BEFORE_ARGS=-vvv
|
|
|
|
# Need to make it fetch a full set say once a week to catch distfiles
|
|
# which change md5 sum but not name
|
|
if [ "X${FETCH_ORIGINAL}" = "X" ]; then
|
|
export MASTER_SITE_OVERRIDE='ftp://ftp-master.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/'
|
|
fi
|
|
export MASTER_SITE_OVERRIDE="${MASTER_SITE_OVERRIDE} ftp://bento.freebsd.org/pub/FreeBSD/distfiles/\${DIST_SUBDIR}/"
|
|
}
|