#!/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=php export VERSION=${VERSION:-5.2.12} export PKGARCH=${PKGARCH:-arm} export PKGSERIES=${PKGSERIES:-n} export BUILD=${BUILD:-1_slack12.2} export SLACKPACKAGE=$PKGNAM-$VERSION-$PKGARCH-$BUILD.tgz # Reset the ARM file system: restore it to the 'factory settings' # as it were (this has no effect when building natively): sboxsysrestore ## ******************************************************************* ## # 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 $PKGNAM isn't already installed: slackfailpkgdeps $PKGNAM || removepkg $PKGNAM # Ensure specific build dependencies (mainly libraries): # ncurses is used for PINE (and we build PINE from PHP in order to use # its IMAP library): { slackcheckpkgdeps bzip2 || installpkg $PKGSTORE/a/bzip2-*.tgz || exit 99 ; } { slackcheckpkgdeps httpd || installpkg $PKGSTORE/n/httpd-*.tgz || exit 99 ; } { slackcheckpkgdeps mysql || installpkg $PKGSTORE/ap/mysql-*.tgz || exit 99 ; } { slackcheckpkgdeps aspell || installpkg $PKGSTORE/l/aspell-*.tgz || exit 99 ; } { slackcheckpkgdeps db44 || installpkg $PKGSTORE/l/db44-*.tgz || exit 99 ; } { slackcheckpkgdeps freetype || installpkg $PKGSTORE/l/freetype-*.tgz || exit 99 ; } { slackcheckpkgdeps gd || installpkg $PKGSTORE/l/gd-*.tgz || exit 99 ; } { slackcheckpkgdeps gdbm || installpkg $PKGSTORE/l/gdbm-*.tgz || exit 99 ; } { slackcheckpkgdeps gmp || installpkg $PKGSTORE/l/gmp-*.tgz || exit 99 ; } { slackcheckpkgdeps libjpeg || installpkg $PKGSTORE/l/libjpeg-*.tgz || exit 99 ; } { slackcheckpkgdeps libpng || installpkg $PKGSTORE/l/libpng-*.tgz || exit 99 ; } { slackcheckpkgdeps libxml2 || installpkg $PKGSTORE/l/libxml2-*.tgz || exit 99 ; } { slackcheckpkgdeps libxslt || installpkg $PKGSTORE/l/libxslt-*.tgz || exit 99 ; } { slackcheckpkgdeps mhash || installpkg $PKGSTORE/l/mhash-*.tgz || exit 99 ; } { slackcheckpkgdeps mm || installpkg $PKGSTORE/l/mm-*.tgz || exit 99 ; } { slackcheckpkgdeps pcre || installpkg $PKGSTORE/l/pcre-*.tgz || exit 99 ; } { slackcheckpkgdeps t1lib || installpkg $PKGSTORE/l/t1lib-*.tgz || exit 99 ; } { slackcheckpkgdeps curl || installpkg $PKGSTORE/n/curl-*.tgz || exit 99 ; } { slackcheckpkgdeps cyrus-sasl || installpkg $PKGSTORE/n/cyrus-sasl-*.tgz || exit 99 ; } { slackcheckpkgdeps net-snmp || installpkg $PKGSTORE/n/net-snmp-*.tgz || exit 99 ; } { slackcheckpkgdeps openldap-client || installpkg $PKGSTORE/n/openldap-client-*.tgz || exit 99 ; } { slackcheckpkgdeps openssl || installpkg $PKGSTORE/n/openssl-*.tgz || exit 99 ; } { slackcheckpkgdeps fontconfig || installpkg $PKGSTORE/x/fontconfig-*.tgz || exit 99 ; } { slackcheckpkgdeps libX11 || installpkg $PKGSTORE/x/libX11-*.tgz || exit 99 ; } { slackcheckpkgdeps libXext || installpkg $PKGSTORE/x/libXext-*.tgz || exit 99 ; } { slackcheckpkgdeps libXpm || installpkg $PKGSTORE/x/libXpm-*.tgz || exit 99 ; } ## ******************************************************************* ## # 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 ## ******************************************************************* ## # Launch the package build script: BUILDLOG=$( basename $SLACKPACKAGE .tgz ).build.log ( ./$PKGNAM.SlackBuild ) >& /dev/stdout | tee $BUILDLOG # Compress the build log: bzip2 -9f $BUILDLOG