#!/bin/bash

source /usr/share/slackdev/buildkit.sh

# Package metadata:
export PACKAGE=glibc
export PKGSERIES=/
export PKGSTORE=/tmp
export VERSION=2.7
export BUILD=1
export ARCH=i486
export SLACKPACKAGE=$PACKAGE-$VERSION-$ARCH-$BUILD.tgz

# Reset the ARM file system: restore it to the 'factory settings'
# as it were (this has no effect when building natively):
sboxsysrestore

# Ensure base ARM packages are installed first:
slackbasedeps

# Launch the package build script:
( ./$PACKAGE.SlackBuild ) >& /dev/stdout | tee build.$ARCH.log

# Compress the build log:
bzip2 -9f build.$ARCH.log
