#!/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=mesa export VERSION=${VERSION:-8.0.4} export PKGARCH=${PKGARCH:-arm} export BUILD=${BUILD:-1} export PKGSERIES=${PKGSERIES:-x} export SLACKPACKAGE=$PKGNAM-$VERSION-$PKGARCH-$BUILD.tgz ## ******************************************************************* ## # 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 ## ******************************************************************* ## # Reset the ARM file system: restore it to the 'factory settings' # as it were (this has no effect when building natively): sboxsysrestore # Ensure base ARM packages are installed first: slackbasedeps # Ensure $PKGNAM isn't already installed: slackfailpkgdeps $PKGNAM || removepkg $PKGNAM # Ensure specific build dependencies (mainly libraries): # You need mesa to be installed before running X11.SlackBuild, but you # can run it straight after grabbing the git repo of modular xorg and # then running the build script. # { slackcheckpkgdeps udev || installpkg $PKGSTORE/a/udev-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps expat || installpkg $PKGSTORE/l/expat-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps freeglut || installpkg $PKGSTORE/x/freeglut-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps glew || installpkg $PKGSTORE/x/glew-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libX11 || installpkg $PKGSTORE/x/libX11-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libXau || installpkg $PKGSTORE/x/libXau-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libXdamage || installpkg $PKGSTORE/x/libXdamage-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libXdmcp || installpkg $PKGSTORE/x/libXdmcp-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libXext || installpkg $PKGSTORE/x/libXext-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libXfixes || installpkg $PKGSTORE/x/libXfixes-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libXxf86vm || installpkg $PKGSTORE/x/libXxf86vm-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libxcb || installpkg $PKGSTORE/x/libxcb-[0-9]*.t?z || exit 99; } # Mesa 8.x needs this - v7.x didn't. { slackcheckpkgdeps libdrm || installpkg $PKGSTORE/x/libdrm-[0-9]*.t?z || exit 99; } # The Slackware X11 build scripts reference the Mesa source in /tmp. # Since we're building a new Mesa here (but not in /tmp), we need to remember # to wipe this, since ARMedslack's scripts either unarchive the compiled # copy (generated from mesa.SlackBuild), or use an existing copy in /tmp. # Since we're obviously rebuilding Mesa, let's wipe it out: rm -rf /tmp/Mesa* # Launch the package build script: BUILDLOG=$( basename $SLACKPACKAGE .tgz ).build.log ( ./$PKGNAM.SlackBuild ) >& /dev/stdout | tee $BUILDLOG # Compress the build log: bzip2 -9fvz $BUILDLOG