#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-bin SRC=/devel/manpagesrc INFO=$PKG/usr/info 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/_bin.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 "| hdparm-3.1 |" echo "+============+" cd $TMP tar xzvf $CWD/hdparm-3.1.tar.gz cd hdparm-3.1 make strip hdparm cat hdparm > $PKG/usr/sbin/hdparm cat hdparm.8 | gzip -9c > $PKG/usr/man/man8/hdparm.8.gz echo "+==========+" echo "| lha-1.00 |" echo "+==========+" cd $TMP tar xzvf $CWD/lha-1.00.tar.gz cd lha-1.00 make strip src/lha cat src/lha > $PKG/usr/bin/lha echo "+============+" echo "| makewhatis |" echo "+============+" cd $TMP tar xzvf $CWD/makewhatis.tar.gz cd makewhatis cat makewhatis > $PKG/usr/sbin/makewhatis cat makewhatis.1 | gzip -9c > $PKG/usr/man/man1/makewhatis.1.gz echo "+========+" echo "| gencat |" echo "+========+" cd $TMP tar xzvf $CWD/gencat.tar.gz cd gencat pmake strip gencat cat gencat > $PKG/usr/bin/gencat echo "+==================================+" echo "| fileutils-3.12+color-ls-3.12.0.3 |" echo "+==================================+" cd $TMP tar xzvf $CWD/fileutils-3.12.tar.gz cd fileutils-3.12 zcat $CWD/color-ls-3.12.0.3.patch.gz | patch -p1 # Next 3 define ETC_DIR to be /etc cd src zcat $CWD/fileutils-3.12.diff.gz | patch cd .. CFLAGS=-O2 LDFLAGS=-s ./configure --prefix=/usr make cd src cat chgrp > $PKG/bin/chgrp cat chmod > $PKG/bin/chmod cat chown > $PKG/bin/chown cat cp > $PKG/bin/cp cat dd > $PKG/bin/dd cat df > $PKG/bin/df cat dircolors > $PKG/bin/dircolors cat du > $PKG/bin/du cat ginstall > $PKG/usr/bin/ginstall cat ln > $PKG/bin/ln cat ls > $PKG/bin/ls cat mkdir > $PKG/bin/mkdir cat mkfifo > $PKG/bin/mkfifo cat mknod > $PKG/bin/mknod cat mv > $PKG/bin/mv cat rm > $PKG/bin/rm cat rmdir > $PKG/bin/rmdir # cat sync > $PKG/bin/sync # Slackware uses the util-linux assembly sync cat touch > $PKG/bin/touch cd ../man for page in chgrp.1 chmod.1 chown.1 cp.1 dd.1 df.1 dircolors.1 du.1 install.1 \ ln.1 ls.1 mkdir.1 mkfifo.1 mknod.1 mv.1 rm.1 rmdir.1 touch.1 ; do cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz done cd ../doc mkdir -p $INFO cat fileutils.info | gzip -9c > $INFO/fileutils.info.gz echo "+=====+" echo "| bpe |" echo "+=====+" cd $TMP tar xzvf $CWD/bpe.tar.gz cd bpe mklinux make strip bpe cat bpe > $PKG/usr/bin/bpe cat bpe.1 | gzip -9c > $PKG/usr/man/man1/bpe.1.gz echo "+========+" echo "| ed-0.2 |" echo "+========+" cd $TMP tar xzvf $CWD/ed-0.2.tar.gz cd ed-0.2 CFLAGS=-O2 LDFLAGS=-s ./configure --prefix=/usr make cat ed > $PKG/bin/ed cat ed.1 | gzip -9c > $PKG/usr/man/man1/ed.1.gz cat ed.info | gzip -9c > $INFO/ed.info.gz echo "+=========+" echo "| at-2.9b |" echo "+=========+" cd $TMP tar xzvf $CWD/at-2.9b.tar.gz cd at Configure make strip at atrun cat at > $PKG/usr/bin/at cat atrun > $PKG/usr/lib/atrun for target in batch.1.gz atq.1.gz atrm.1.gz ; do cat batch.1 | gzip -9c > $PKG/usr/man/man1/$target done sed -f subs.sed < at.man | gzip -9c > $PKG/usr/man/man1/at.1.gz sed -f subs.sed < atrun.man | gzip -9c > $PKG/usr/man/man8/atrun.8.gz echo "+==========+" echo "| compress |" echo "+==========+" cd $TMP tar xzvf $CWD/compress.tar.gz cd compress zcat $CWD/compress.diff.gz | patch make cat compress > $PKG/usr/bin/compress cat compress.1 | gzip -9c > $PKG/usr/man/man1/compress.1.gz echo '.so man1/compress.1' | gzip -9c > $PKG/usr/man/man1/uncompress.1.gz echo "+=========+" echo "| banners |" echo "+=========+" cd $TMP tar xzvf $CWD/banners.tar.gz cd banners make cat bban > $PKG/usr/bin/bban cat sysvbanner > $PKG/usr/bin/sysvbanner echo "+===========+" echo "| dcron 2.2 |" echo "+===========+" cd $TMP tar xzvf $CWD/dcron22.tar.gz cd dcron zcat $CWD/dcron22.diff.gz | patch make cat crond > $PKG/usr/sbin/crond cat crontab > $PKG/usr/bin/crontab cat crontab.1 | gzip -9c > $PKG/usr/man/man1/crontab.1.gz cat crond.8 | gzip -9c > $PKG/usr/man/man8/crond.8.gz echo "+===========+" echo "| dosfsck.1 |" echo "+===========+" cd $TMP tar xzvf $CWD/dosfsck.1.tar.gz cd dosfsck zcat $CWD/dosfsck.1.diff.gz | patch make strip dosfsck cat dosfsck > $PKG/sbin/dosfsck cat dosfsck.8 | gzip -9c > $PKG/usr/man/man8/dosfsck.8.gz echo "+=====================+" echo "| elvis-1.8pl3.tar.gz |" echo "+=====================+" cd $TMP tar xzvf $CWD/elvis-1.8pl3.tar.gz cd elvis zcat $CWD/elvis-1.8pl3.diff.gz | patch zcat $CWD/elvis-1.8pl3.diff2.gz | patch make strip ctags elvis elvprsv elvrec fmt ref cat ctags > $PKG/usr/bin/ctags cat elvis > $PKG/usr/bin/elvis cat elvprsv > $PKG/usr/bin/elvprsv cat elvrec > $PKG/usr/bin/elvrec cat fmt > $PKG/usr/bin/fmt cat ref > $PKG/usr/bin/ref cd doc for page in ctags.man elvis.man elvprsv.man elvrec.man fmt.man ref.man ; do cat $page | gzip -9c > $PKG/usr/man/man1/`basename $page .man`.1.gz done echo "+===========+" echo "| file-3.22 |" echo "+===========+" cd $TMP tar xzvf $CWD/file-3.22.tar.gz cd file-3.22 zcat $CWD/file-3.22.diff.gz | patch mkdir -p $PKG/usr/doc/file-3.22 cp -a LEGAL.NOTICE README $PKG/usr/doc/file-3.22 chown root.root $PKG/usr/doc/file-3.22/* chmod 644 $PKG/usr/doc/file-3.22/* make strip file cat file > $PKG/usr/bin/file cat magic > $PKG/etc/magic cat file.1 | gzip -9c > $PKG/usr/man/man1/file.1.gz cat magic.4 | gzip -9c > $PKG/usr/man/man4/magic.4.gz echo "+==============+" echo "| indent-1.9.1 |" echo "+==============+" cd $TMP tar xzvf $CWD/indent-1.9.1.tar.gz cd indent-1.9.1 ./configure --prefix=/usr zcat $CWD/indent-1.9.1.diff.gz | patch make cat indent > $PKG/usr/bin/indent cat indent.1 | gzip -9c > $PKG/usr/man/man1/indent.1.gz cat indent.info | gzip -9c > $INFO/indent.info.gz echo "+============+" echo "| gawk-3.0.2 |" echo "+============+" cd $TMP tar xzvf $CWD/gawk-3.0.2.tar.gz cd gawk-3.0.2 ./configure linux --prefix=/usr make CC=gcc CFLAGS=-O2 LDFLAGS=-s strip gawk cat gawk > $PKG/usr/bin/gawk cat awklib/igawk > $PKG/usr/bin/igawk cat awklib/grcat > $PKG/usr/libexec/awk/grcat cat awklib/pwcat > $PKG/usr/libexec/awk/pwcat cat doc/gawk.1 | gzip -9c > $PKG/usr/man/man1/gawk.1.gz cat doc/igawk.1 | gzip -9c > $PKG/usr/man/man1/igawk.1.gz cat doc/gawk.info | gzip -9c > $PKG/usr/info/gawk.info.gz mkdir $PKG/usr/doc/gawk-3.0.2 cp -a ACKNOWLEDGMENT COPYING FUTURES INSTALL LIMITATIONS NEWS \ PORTS POSIX PROBLEMS README README.FIRST $PKG/usr/doc/gawk-3.0.2 chown -R root.root $PKG/usr/doc/gawk-3.0.2 cd awklib cp -a *.awk $PKG/usr/share/awk cd eg/lib cp -a *.awk $PKG/usr/share/awk chown root.root $PKG/usr/share/awk/* echo "+==========+" echo "| man-1.4h |" echo "+==========+" cd $TMP tar xzvf $CWD/man-1.4h.tar.gz cd man-1.4h configure +lang all make cd src cat man > $PKG/usr/bin/man cat apropos > $PKG/usr/bin/apropos #cat makewhatis > $PKG/usr/lib/makewhatis cat mwi > $PKG/usr/bin/mwi zcat $CWD/man.config.diff.gz | patch cat man.config > $PKG/usr/lib/man.config cd ../man/en for page in apropos.1 man.1 whatis.1 ; do cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz done cat man.config.5 | gzip -9c > $PKG/usr/man/man5/man.config.5.gz echo "+=============+" echo "| mkdosfs-0.2 |" echo "+=============+" cd $TMP tar xzvf $CWD/mkdosfs-0.2.tar.gz cd mkdosfs-0.2 zcat $CWD/mkdosfs-0.2.diff.gz | patch make cat mkdosfs > $PKG/sbin/mkdosfs cat mkdosfs.8 | gzip -9c > $PKG/usr/man/man8/mkdosfs.8.gz echo "+=================+" echo "| modutils-2.1.23 |" echo "+=================+" cd $TMP tar xzvf $CWD/modutils-2.1.23.tar.gz cd modutils-2.1.23 mkdir -p $PKG/usr/doc/modutils-2.1.23 cp -a BUGS CREDITS ChangeLog NEWS README TODO $PKG/usr/doc/modutils-2.1.23 cp -a kerneld/README.kerneld kerneld/README.ppp-slip \ $PKG/usr/doc/modutils-2.1.23 cp -a depmod/README $PKG/usr/doc/modutils-2.1.23/README.depmod cp -a kerneld/GOODIES $PKG/usr/doc/modutils-2.1.23/GOODIES chown -R root.root $PKG/usr/doc/modutils-2.1.23 make strip insmod/insmod genksyms/genksyms depmod/modprobe cd man for page in *.1 ; do cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz done for page in *.2 ; do cat $page | gzip -9c > $PKG/usr/man/man2/$page.gz done for page in *.8 ; do cat $page | gzip -9c > $PKG/usr/man/man8/$page.gz done cd ../insmod cat insmod > $PKG/sbin/insmod cd ../genksyms cat genksyms > $PKG/sbin/genksyms cd ../depmod cat modprobe > $PKG/sbin/modprobe cd ../kerneld strip kerneld cat kerneld > $PKG/sbin/kerneld cat request-route.sh > $PKG/sbin/request-route echo "+===========+" echo "| patch-2.1 |" echo "+===========+" cd $TMP tar xzvf $CWD/patch-2.1.tar.gz cd patch-2.1 zcat $CWD/patch-2.1.diff.gz | patch configure --prefix=/usr make CFLAGS=-O2 LDFLAGS=-s cat patch > $PKG/usr/bin/patch cat patch.man | gzip -9c > $PKG/usr/man/man1/patch.1.gz echo "+==========+" echo "| sed-2.05 |" echo "+==========+" cd $TMP tar xzvf $CWD/sed-2.05.tar.gz cd sed-2.05 ./configure --prefix=/usr make CFLAGS=-O2 LDFLAGS=-s cat sed > $PKG/usr/bin/sed # Use the sed man page from BSD... cat $CWD/sed.1.gz > $PKG/usr/man/man1/sed.1.gz echo "+===============+" echo "| sharutils-4.1 |" echo "+===============+" cd $TMP tar xzvf $CWD/sharutils-4.1.tar.gz cd sharutils-4.1 CFLAGS=-O2 LDFLAGS=-s ./configure make cat shar > $PKG/usr/bin/shar cat unshar > $PKG/usr/bin/unshar cat uuencode > $PKG/usr/bin/uuencode cat uudecode > $PKG/usr/bin/uudecode for page in shar.1 unshar.1 uuencode.1 ; do cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz done echo '.so man1/uuencode.1' | gzip -9c > $PKG/usr/man/man1/uudecode.1.gz cat uuencode.5 | gzip -9c > $PKG/usr/man/man5/uuencode.5.gz cat sharutils.info | gzip -9c > $INFO/sharutils.info.gz echo "+===============+" echo "| splitvt-1.6.3 |" echo "+===============+" cd $TMP tar xzvf $CWD/splitvt-1.6.3.tar.gz cd splitvt-1.6.3 Configure make cat splitvt > $PKG/usr/bin/splitvt cat splitvt.1 | gzip -9c > $PKG/usr/man/man1/splitvt.1.gz mkdir -p $PKG/usr/doc/splitvt cp -a examples ANNOUNCE CHANGES NOTES README TODO $PKG/usr/doc/splitvt echo "+==========+" echo "| time-1.7 |" echo "+==========+" cd $TMP tar xvzf $CWD/time-1.7.tar.gz cd time-1.7 configure --prefix=/usr make CFLAGS=-O2 LDFLAGS=-s cat time > $PKG/usr/bin/time cat time.info | gzip -9c > $INFO/time.info.gz echo "+==========+" echo "| tput-1.0 |" echo "+==========+" cd $TMP tar xvzf $CWD/tput-1.0.tar.gz cd tput-1.0 ./configure --prefix=/usr make CFLAGS=-O2 LDFLAGS=-s cat tput > $PKG/usr/bin/tput cat tput.info | gzip -9c > $INFO/tput.info.gz echo "+==========+" echo "| unarj230 |" echo "+==========+" cd $TMP tar xzvf $CWD/unarj230.tar.gz cd unarj230 zcat $CWD/unarj230.diff.gz | patch make strip unarj cat unarj > $PKG/usr/bin/unarj echo "+=======+" echo "| which |" echo "+=======+" cd $TMP tar xzvf $CWD/which.tar.gz cd which make cat which > $PKG/usr/bin/which cat which.1 | gzip -9c > $PKG/usr/man/man1/which.1.gz echo "+==========+" echo "| zoo-2.10 |" echo "+==========+" cd $TMP tar xzvf $CWD/zoo-2.10.tar.gz cd zoo-2.10 zcat $CWD/zoo-2.10.diff.gz | patch make generic strip fiz strip zoo cat fiz > $PKG/usr/bin/fiz cat zoo > $PKG/usr/bin/zoo for page in fiz.1 zoo.1 ; do cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz done echo "+================+" echo "| xiafspgm-0.8.1 |" echo "+================+" cd $TMP tar xzvf $CWD/xiafspgm-0.8.1.tar.gz cd xiafspgm-0.8.1 make xiafspgm strip mkxfs xfsck cat mkxfs > $PKG/sbin/mkxfs cat xfsck > $PKG/sbin/xfsck for page in mkxfs.8 xfsck.8 ; do cat $page | gzip -9c > $PKG/usr/man/man8/$page.gz done # Strip everything for good measure: strip $PKG/bin/* $PKG/usr/bin/* $PKG/usr/sbin/* # Build the package: cd $PKG tar czvf $TMP/bin.tgz . # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/fileutils-3.12 rm -rf $TMP/pwd rm -rf $TMP/ed-0.2 rm -rf $TMP/at rm -rf $TMP/banners rm -rf $TMP/bpe rm -rf $TMP/dcron rm -rf $TMP/dosfsck rm -rf $TMP/elvis rm -rf $TMP/file-3.22 rm -rf $TMP/hdparm-3.1 rm -rf $TMP/indent-1.9.1 rm -rf $TMP/gawk-3.0.2 rm -rf $TMP/lha-1.00 rm -rf $TMP/man-1.4h rm -rf $TMP/mkdosfs-0.2 rm -rf $TMP/modutils-2.1.23 rm -rf $TMP/patch-2.1 rm -rf $TMP/sed-2.05 rm -rf $TMP/sharutils-4.1 rm -rf $TMP/time-1.7 rm -rf $TMP/tput-1.0 rm -rf $TMP/unarj230 rm -rf $TMP/which rm -rf $TMP/zoo-2.10 rm -rf $TMP/compress rm -rf $TMP/splitvt-1.6.3 rm -rf $TMP/xiafspgm-0.8.1 rm -rf $PKG fi