Lionel Sambuc 0a6a1f1d05 NetBSD re-synchronization of the source tree
This brings our tree to NetBSD 7.0, as found on -current on the
10-10-2015.

This updates:
 - LLVM to 3.6.1
 - GCC to GCC 5.1
 - Replace minix/commands/zdump with usr.bin/zdump
 - external/bsd/libelf has moved to /external/bsd/elftoolchain/
 - Import ctwm
 - Drop sprintf from libminc

Change-Id: I149836ac18e9326be9353958bab9b266efb056f0
2016-01-13 20:32:14 +01:00

53 lines
1.3 KiB
Bash

#!/bin/sh
# Id
dbase=`dirname $0`
base=`cd $dbase && pwd`
config=${base}/../../configure
destdir=`pwd`/destdir
builddir=`pwd`/builddir
imgdir=`pwd`/imgdir
rm -rf ${destdir} ${builddir} ${imgdir} || exit 1
mkdir ${destdir} || exit 1
mkdir ${builddir} || exit 1
mkdir ${imgdir} || exit 1
cd ${builddir} || exit 1
version=`sh ${config} --help 2>/dev/null | head -1 | sed 's/.*Heimdal \([^ ]*\).*/\1/'`
echo "Building Mac universal binary package for Heimdal ${version}"
echo "Configure"
env \
CFLAGS="-arch i386 -arch x86_64" \
LDFLAGS="-arch i386 -arch x86_64" \
${config} --disable-dependency-tracking > log || exit 1
echo "Build"
make all > /dev/null || exit 1
echo "Run regression suite"
make check > /dev/null || exit 1
echo "Install"
make install DESTDIR=${destdir} > /dev/null || exit 1
echo "Build package"
xcrun productbuild \
--identifier org.h5l.heimdal \
--version ${version} \
--root ${destdir} / \
--resources ${base}/Resources \
--sign 'Developer ID Installer:' \
${imgdir}/Heimdal-${version}.pkg
cd ..
echo "Build disk image"
rm "heimdal-${version}.dmg"
/usr/bin/hdiutil create -volname "Heimdal-${version}" -srcfolder ${imgdir} "heimdal-${version}.dmg" || exit 1
echo "Clean"
rm -rf ${destdir} ${builddir} ${imgdir} || exit 1
echo "Done!"
exit 0