#!/bin/bash source /usr/share/slackdev/buildkit.sh # Package metadata: export PKGNAM=python2 export VERSION=${VERSION:-2.7.18} export BUILD=${BUILD:-8} slack_var_pkgseries #export BUILD=${BUILD:-1_slack14.2} #export BUILD=${BUILD:-1_slack15.0} export SLACKPACKAGE=$PKGNAM-$VERSION-$PKGARCH-$BUILD.txz # 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/ mkdir -vpm755 $PKGSTORE/$PKGSERIES ;} # Ensure base ARM packages are installed first: slackbasedeps # Ensure $PKGNAM isn't already installed: #slackfailpkgdeps $PKGNAM || removepkg $PKGNAM # Ensure build dependencies are satisfied: { slackcheckpkgdeps bzip2 || installpkg $PKGSTORE/a/bzip2-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps sqlite || installpkg $PKGSTORE/ap/sqlite-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps db48 || installpkg $PKGSTORE/l/db48-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps expat || installpkg $PKGSTORE/l/expat-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps gdbm || installpkg $PKGSTORE/l/gdbm-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libffi || installpkg $PKGSTORE/l/libffi-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps ncurses || installpkg $PKGSTORE/l/ncurses-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps readline || installpkg $PKGSTORE/l/readline-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libtirpc || installpkg $PKGSTORE/n/libtirpc-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps openssl || installpkg $PKGSTORE/n/openssl-[0-9]*.t?z || exit 99; } # Python 2.3 can be built without these because ARMedslack's original Python # package was compiled long before any of these 4 packages were, but I'm # adding them as dependencies now because Slackware's d/python package # links against them: { slackcheckpkgdeps tcl || installpkg $PKGSTORE/tcl/tcl-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps tk || installpkg $PKGSTORE/tcl/tk-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libX11 || installpkg $PKGSTORE/x/libX11-[0-9]*.t?z || exit 99; } # Launch the package build script: BUILDLOG=$SLKPORTARCH-$( basename $SLACKPACKAGE .t?z ).build.log ( ./$PKGNAM.SlackBuild ) >& /dev/stdout | tee $BUILDLOG # Compress the build log: bzip2 -9fvz $BUILDLOG