[c5c522c] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | # armel/build |
---|
| 4 | # Check package dependencies, set metadata and launch |
---|
| 5 | # package build script. |
---|
| 6 | # by Stuart Winter <stuart@armedslack.org> |
---|
| 7 | # |
---|
| 8 | source /usr/share/slackdev/buildkit.sh |
---|
| 9 | |
---|
| 10 | # Package metadata: |
---|
| 11 | export PKGNAM=linuxdoc-tools |
---|
| 12 | export VERSION=${VERSION:-0.9.69} |
---|
| 13 | export PKGARCH=${PKGARCH:-arm} |
---|
| 14 | export BUILD=${BUILD:-4} |
---|
| 15 | export PKGSERIES=${PKGSERIES:-ap} |
---|
| 16 | export SLACKPACKAGE=$PKGNAM-$VERSION-$PKGARCH-$BUILD.txz |
---|
| 17 | export PKGEXT=${PKGEXT:-txz} |
---|
| 18 | |
---|
| 19 | # Ensure base ARM packages are installed first: |
---|
| 20 | slackbasedeps |
---|
| 21 | |
---|
| 22 | # Ensure $PKGNAM isn't already installed: |
---|
| 23 | slackfailpkgdeps $PKGNAM || removepkg $PKGNAM |
---|
| 24 | |
---|
| 25 | # Ensure specific build dependencies - libraries and development tools. |
---|
| 26 | # There are many more dependencies but these are the core ones I picked out |
---|
| 27 | # as I was building the software included within this package. |
---|
| 28 | # |
---|
| 29 | #slackcheckpkgdeps libxml2 || installpkg $PKGSTORE/l/libxml2-*.t?z |
---|
| 30 | # to unpack some SRPMs: |
---|
| 31 | #slackcheckpkgdeps rpm || installpkg $PKGSTORE/ap/rpm-*.t?z |
---|
| 32 | # for OpenJade: |
---|
| 33 | #slackcheckpkgdeps tetex || installpkg $PKGSTORE/t/tetex-[0-9]*.t?z |
---|
| 34 | # for AsciiDoc: |
---|
| 35 | #slackcheckpkgdeps python || installpkg $PKGSTORE/d/python-[0-9]*.t?z |
---|
| 36 | # Ensure the packages are installed; exit if not. |
---|
| 37 | #slackcheckpkgdeps python,libxml2,rpm,tetex || exit 99 |
---|
| 38 | |
---|
| 39 | # Stop daemons/processes which tend to modify the contents of the filesystem: |
---|
| 40 | altertrackprep |
---|
| 41 | |
---|
| 42 | # Launch the package build script: |
---|
| 43 | BUILDLOG=$( basename $SLACKPACKAGE .t?z ).build.log |
---|
| 44 | # ( ./$PKGNAM.SlackBuild ) >& /dev/stdout | tee $BUILDLOG |
---|
| 45 | ( ./trackbuild.$PKGNAM ) >& /dev/stdout | tee $BUILDLOG |
---|
| 46 | |
---|
| 47 | # Compress the build log: |
---|
| 48 | bzip2 -9fvz $BUILDLOG |
---|