#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-comms SRC=/devel/manpagesrc INFO=/devel/info-pages/usr/info TEX=/devel/texinfo-docs if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi if [ ! -d $PKG ]; then mkdir -p $PKG # place for the package to be built fi # Explode the package framework: cd $PKG explodepkg $CWD/_comms.tar.gz # Function to handle manpage source: man2gz () { # $1 is source page name, $2 is target name for preformatted # output (full path && name) and $3 is the same, but for the # source. mkdir -p `dirname $2` groff -Tascii -mandoc $1 | gzip -9c > $2 if [ ! "$3" = "" ]; then mkdir -p `dirname $3` cat $1 > $3 fi } echo "+=============+" echo "| lrzsz-0.12a |" echo "+=============+" cd $TMP tar xzvf $CWD/lrzsz-0.12a.tar.gz cd lrzsz make linux cat lrz > $PKG/usr/bin/lrz cat lsz > $PKG/usr/bin/lsz man2gz lrz.1 $PKG/usr/man/preformat/cat1/lrz.1.gz $SRC/usr/man/man1/lrz.1 man2gz lsz.1 $PKG/usr/man/preformat/cat1/lsz.1.gz $SRC/usr/man/man1/lsz.1 ( cd $SRC/usr/man/man1 ; ln -sf lrz.1 rz.1 ; ln -sf lsz.1 sz.1 ) echo "+==============+" echo "| minicom-1.70 |" echo "+==============+" cd $TMP tar xzvf $CWD/minicom-1.70.tar.gz cd minicom-1.70/source make cat minicom > $PKG/usr/bin/minicom cat runscript > $PKG/usr/bin/runscript cd ../man man2gz minicom.1 $PKG/usr/man/preformat/cat1/minicom.1.gz $SRC/usr/man/man1/minicom.1 man2gz runscript.1 $PKG/usr/man/preformat/cat1/runscript.1.gz $SRC/usr/man/man1/runscript.1 # Build the package: cd $PKG tar czvf $TMP/comms.tgz . # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/lrzsz rm -rf $TMP/minicom-1.70 rm -rf $PKG fi