#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-minicom 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/_minicom.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 "| minicom-1.75 |" echo "+==============+" cd $TMP tar xzvf $CWD/minicom-1.75.tar.gz cd minicom-1.75 mkdir -p $PKG/usr/doc/minicom-1.75 cp -a Copyright Readme Install $PKG/usr/doc/minicom-1.75 chmod 644 $PKG/usr/doc/minicom-1.75/* chown root.root $PKG/usr/doc/minicom-1.75/* cd src make cat minicom > $PKG/usr/bin/minicom cat runscript > $PKG/usr/bin/runscript cat xminicom > $PKG/usr/X11R6/bin/xminicom cat ascii-xfr > $PKG/usr/bin/ascii-xfr cat minicom.users > $PKG/etc/minicom.users cd ../man for page in minicom.1 runscript.1 ascii-xfr.1 ; do cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz done echo "+=============+" echo "| lrzsz-0.12a |" echo "+=============+" cd $TMP tar xzvf $CWD/lrzsz-0.12a.tar.gz cd lrzsz-0.12a mkdir -p $PKG/usr/doc/lrzsz-0.12a cp -a CHANGES README $PKG/usr/doc/lrzsz-0.12a chmod 644 $PKG/usr/doc/lrzsz-0.12a/* chown root.root $PKG/usr/doc/lrzsz-0.12a/* make linux cat lrz > $PKG/usr/bin/lrz cat lsz > $PKG/usr/bin/lsz for page in lrz.1 lsz.1 ; do cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz done echo '.so man1/lrz.1' | gzip -9c > $PKG/usr/man/man1/rz.1.gz echo '.so man1/lsz.1' | gzip -9c > $PKG/usr/man/man1/sz.1.gz # Build the package: cd $PKG tar czvf $TMP/minicom.tgz . # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/lrzsz rm -rf $TMP/minicom-1.75 rm -rf $PKG fi