Reynir Björnsson
e887cd761b
Solo5-tenders.0.7.3 is the same as solo5.0.7.3 with only the tenders and solo5-elftool. Solo5-tenders opam file conflicts with solo5 as they provide the same binaries. The OS packages are named solo5 and conflict with solo5-hvt. Reviewed-on: https://git.robur.io/robur/unikernel-repo/pulls/2 Co-authored-by: Reynir Björnsson <reynir@reynir.dk> Co-committed-by: Reynir Björnsson <reynir@reynir.dk>
35 lines
1.1 KiB
Bash
Executable file
35 lines
1.1 KiB
Bash
Executable file
#!/bin/sh -e
|
|
|
|
# only execute anything if either
|
|
# - running under orb with package = solo5-tenders
|
|
# - not running under opam at all
|
|
if [ "$ORB_BUILDING_PACKAGE" != "solo5-tenders" -a "$OPAM_PACKAGE_NAME" != "" ]; then
|
|
exit 0;
|
|
fi
|
|
|
|
basedir=$(realpath "$(dirname "$0")"/../..)
|
|
tmpd=$basedir/_build/stage
|
|
rootdir=$tmpd/rootdir
|
|
bindir=$rootdir/usr/bin
|
|
debiandir=$rootdir/DEBIAN
|
|
|
|
trap 'rm -rf $tmpd' 0 INT EXIT
|
|
|
|
mkdir -p "$bindir" "$debiandir"
|
|
|
|
# stage app binaries
|
|
install $basedir/elftool/solo5-elftool $bindir/solo5-elftool
|
|
install $basedir/tenders/hvt/solo5-hvt $bindir/solo5-hvt
|
|
install $basedir/tenders/spt/solo5-spt $bindir/solo5-spt
|
|
|
|
# install debian metadata
|
|
install -m 0644 $basedir/packaging/debian/control $debiandir/control
|
|
install -m 0644 $basedir/packaging/debian/changelog $debiandir/changelog
|
|
install -m 0644 $basedir/packaging/debian/copyright $debiandir/copyright
|
|
|
|
ARCH=$(dpkg-architecture -q DEB_TARGET_ARCH)
|
|
sed -i -e "s/^Architecture:.*/Architecture: ${ARCH}/" $debiandir/control
|
|
|
|
dpkg-deb --build $rootdir $basedir/solo5.deb
|
|
echo 'bin: [ "solo5.deb" ]' > $basedir/solo5-tenders.install
|
|
echo 'doc: [ "README.md" ]' >> $basedir/solo5-tenders.install
|