#!/bin/bash # cxxlibs.SlackBuild # by Stuart Winter for ARMedSlack # # 31-May-2004 # Paths to skeleton port's source & real Slackware source tree: export CWD=$SLACKSOURCE/$PKGSERIES/$PACKAGE export PORTCWD=$PWD # Temporary build locations: export TMPBUILD=$TMP/build-$PACKAGE export PKG=$TMP/package-$PACKAGE mkpkgdirs # Delete and re-create temporary directories # The basic package framework: mkdir -p $PKG/{lib,usr/lib,usr/$ARCH-slackware-linux/lib} # Because ARMedslack builds with both gcc 3.4 (mainly, where it'll compile # without *tonnes* of patches) and gcc 3.x, we have to include libraries # from both packages c++ packages: PACKAGES="d/gcc-g++-*.tgz ../testing/packages/gcc-3.3.x/gcc-g++-*.tgz" # Iterate through the list and extract them into the temporary dir: for i in ${PACKAGES}; do echo "Extracting package $PKGSTORE/$i" tar zxvvf $PKGSTORE/$i echo -n "Please wait - running install script" ( bash install/doinst.sh ) > /dev/null 2>&1 # we want the symlinks too echo " ... done" done # Grab the .sos and symlinks. # We don't want to copy *everything* out of the packages - only # a few select things. # Deal with /lib: ( cd lib cp -fa libstdc++*.so* $PKG/lib ) # /usr/lib ( cd usr/lib cp -fa libstdc++*.so* $PKG/usr/lib # That's it at the moment! There's not a lot in gcc-g++-3.4 to copy. # Unless I've broken the gcc-g++-3.4 package.. hmm. Best check that :-) ) # If necessary, start the fakeroot server so we can set file/dir ownerships: start_fakeroot # Apply generic Slackware packaging policies: cd $PKG slackstripall # strip all .a archives and all ELFs slackgzpages -i # compress man & info pages and delete usr/info/dir slackslack # chown -R root:root, chmod -R og-w, slackchown (root:bin), slack644docs slackdesc # install slack-desc and doinst.sh # Build the package: if [ $PORTARCH = arm ]; then slackmp # run makepkg else makepkg -l y -c n $PKGSTORE/$PKGSERIES/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz fi # Perform any final checks on the package: cd $PKG slackhlinks # search for any hard links