#!/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.15.5} #export BUILD=${BUILD:-1_slack14.2} export BUILD=${BUILD:-1} export PKGSERIES=${PKGSERIES:-n} 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 dbus || installpkg $PKGSTORE/a/dbus-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps e2fsprogs || installpkg $PKGSTORE/a/e2fsprogs-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps pam || installpkg $PKGSTORE/a/pam-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps cups || installpkg $PKGSTORE/ap/cups-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps dmapi || installpkg $PKGSTORE/ap/dmapi-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps python3 || installpkg $PKGSTORE/d/python3-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps gamin || installpkg $PKGSTORE/l/gamin-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps glib2 || installpkg $PKGSTORE/l/glib2-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps icu4c || installpkg $PKGSTORE/l/icu4c-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps jansson || installpkg $PKGSTORE/l/jansson-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libarchive || installpkg $PKGSTORE/l/libarchive-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libcap || installpkg $PKGSTORE/l/libcap-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libnsl || installpkg $PKGSTORE/l/libnsl-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libtasn1 || installpkg $PKGSTORE/l/libtasn1-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libunwind || installpkg $PKGSTORE/l/libunwind-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps lmdb || installpkg $PKGSTORE/l/lmdb-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps ncurses || installpkg $PKGSTORE/l/ncurses-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps popt || installpkg $PKGSTORE/l/popt-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps readline || installpkg $PKGSTORE/l/readline-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps talloc || installpkg $PKGSTORE/l/talloc-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps tdb || installpkg $PKGSTORE/l/tdb-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps tevent || installpkg $PKGSTORE/l/tevent-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps gnutls || installpkg $PKGSTORE/n/gnutls-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps gpgme || installpkg $PKGSTORE/n/gpgme-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps krb5 || installpkg $PKGSTORE/n/krb5-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libtirpc || installpkg $PKGSTORE/n/libtirpc-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps openldap || installpkg $PKGSTORE/n/openldap-[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