#!/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.21.2} export BUILD=${BUILD:-1} slack_var_pkgseries # If building in /patches for a Stable Release, we drop the packages into /tmp/patches/ slack_findpkgstore_is_stablerelease && { export PKGSTORE=/tmp/ export PKGSERIES=/patches/ export BUILD=1_slack15.0 mkdir -vpm755 $PKGSTORE/$PKGSERIES ;} # Set package name: export SLACKPACKAGE=$PKGNAM-$VERSION-$PKGARCH-$BUILD.txz # 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; } # # Won't be picked up by lddslack, but are needed at build time: #{ slackcheckpkgdeps python-dnspython || installpkg $PKGSTORE/l/python-dnspython-[0-9]*.t?z || exit 99; } #{ slackcheckpkgdeps python-markdown || installpkg $PKGSTORE/l/python-markdown-[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${LIBDIRSUFFIX}/libcom_err.a{,save} # Launch the package build script: BUILDLOG=$SLKPORTARCH-$( basename $SLACKPACKAGE .t?z ).build.log ( ./$PKGNAM.SlackBuild ) >& /dev/stdout | tee $BUILDLOG # Put it back: mv -fv /lib${LIBDIRSUFFIX}/libcom_err.asave /lib${LIBDIRSUFFIX}/libcom_err.a # Compress the build log: bzip2 -9fvz $BUILDLOG