#!/bin/sh # libtermcap.build # by Stuart Winter # Heavily based the original Slackware build script. # Get version from trackbuild script: VERSION=$1 # Extract source into slacktrack's scratchdir: cd $TMPBUILD tar zxvvf $CWD/termcap-compat_$VERSION.tar.gz cd termcap-compat-$VERSION slackhousekeeping # Apply patches: zcat $CWD/termcap.h.diff.gz | patch -p0 --verbose --backup --suffix=.orig || failpatch zcat $CWD/termcap.bufsize.diff.gz | patch -p1 --verbose --backup --suffix=.orig || failpatch patch -p0 < $PORTCWD/gcc4-fix.diff || failpatch # Build: make || failmake # Install: make install # Install docs: mkdir -p /usr/doc/termcap-$VERSION cp -favv ChangeLog debian/changelog README /usr/doc/termcap-$VERSION # Update /etc/ld.so.cache # this doesn't when building under slacktrack but it will if you # use altertrack, so I'll leave it in. ldconfig -n /lib # Fix crazy ownerships & delete some junk: ( cd ${SLACKTRACKFAKEROOT} rm -rf lib/backup etc ldconfig -r . chown -R root:root . ) # Install package description: rm -rf /install mkdir -p /install install -oroot -groot -m644 $CWD/slack-desc /install