#!/bin/bash # arm/build # Check package dependencies, set metadata and launch # package build script. # by Stuart Winter # source /usr/share/slackdev/buildkit.sh # Package metadata: export PKGNAM=samba export VERSION=${VERSION:-4.6.16} export BUILD=${BUILD:-2_slack14.2} export PKGSERIES=${PKGSERIES:-patches} export SLACKPACKAGE=$PKGNAM-$VERSION-$PKGARCH-$BUILD.txz ## ******************************************************************* ## # For test packages - best to store in another location rather than # overwriting the working copy in the main tree: export PKGSTORE=/tmp/ mkdir -vpm755 $PKGSTORE/$PKGSERIES ## ******************************************************************* ## # Ensure base ARM packages are installed first: slackbasedeps # Ensure build dependencies (mainly libraries): # Need attr/xattr.h from a/attr: { slackcheckpkgdeps acl || installpkg $PKGSTORE/a/acl-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps attr || installpkg $PKGSTORE/a/attr-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps cups || installpkg $PKGSTORE/a/cups-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps dmapi || installpkg $PKGSTORE/ap/dmapi-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps python || installpkg $PKGSTORE/d/python-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libaio || installpkg $PKGSTORE/l/libaio-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libcap || installpkg $PKGSTORE/l/libcap-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps popt || installpkg $PKGSTORE/l/popt-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps cyrus-sasl || installpkg $PKGSTORE/n/cyrus-sasl-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps gnutls || installpkg $PKGSTORE/n/gnutls-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libgcrypt || installpkg $PKGSTORE/n/libgcrypt-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps openldap-client || installpkg $PKGSTORE/n/openldap-client-[0-9]*.t?z || exit 99; } # Ensure $PKGNAM isn't already installed: slackfailpkgdeps $PKGNAM || removepkg $PKGNAM # This causes build failures as Samba tries to link dynamic with static which # cannot be done on ARM: mv -fv /lib/libcom_err.a{,save} # Launch the package build script: BUILDLOG=$( basename $SLACKPACKAGE .t?z ).build.log ( ./$PKGNAM.SlackBuild ) >& /dev/stdout | tee $BUILDLOG # Put it back: mv -fv /lib/libcom_err.asave /lib/libcom_err.a # Compress the build log: bzip2 -9fvz $BUILDLOG