#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-bin SRC=/devel/manpagesrc INFO=$PKG/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/_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 "| 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.2 |" echo "+==================================+" cd $TMP tar xzvf $CWD/fileutils-3.12.tar.gz cd fileutils-3.12 zcat $CWD/color-ls-3.12.0.2.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 cp fileutils.texi $TEX cp perm.texi $TEX echo "+=====+" echo "| bpe |" echo "+=====+" cd $TMP tar xzvf $CWD/bpe.tar.gz cd bpe mklinux 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 cp ed.texinfo $TEX/ed.texi echo "+========+" echo "| at-2.7 |" echo "+========+" cd $TMP tar xzvf $CWD/at-2.9.tar.gz cd at cat << EOF Configure "at" to use these parameters: Directory for user binaries: /usr/bin Directory for job files: /var/spool/atjobs Directory for job outputs: /var/spool/atspool Directory for internal binaries: /usr/lib Directory for manual entries: /usr/man proc - Directory: /proc Mail command: /bin/mail Maximum load average for batch: 1.5 (or whatever you like) Group to run under: bin Userid to run under: bin Default at queue: c Default batch queue: E Path to permission files: /etc Use symbolic links(yn): y Use -g for debugging(yn): n EOF 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 for page in atrun.man at.man ; do cat $page | gzip -9c > $PKG/usr/man/man1/`basename $page .man`.1.gz done 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 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 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.14 |" echo "+===========+" cd $TMP tar xzvf $CWD/file-3.14.tar.gz cd file-3.14 zcat $CWD/file-3.14b.diff.gz | patch -p1 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 cp indent.texinfo $TEX/indent.texi echo "+=============+" echo "| gawk-2.15.6 |" echo "+=============+" cd $TMP tar xzvf $CWD/gawk-2.15.6.tar.gz cd gawk-2.15.6 ./configure linux make CC=gcc CFLAGS=-O2 LDFLAGS=-s strip gawk cat gawk > $PKG/usr/bin/gawk cat gawk.1 | gzip -9c > $PKG/usr/man/man1/gawk.1.gz makeinfo gawk.texi cat gawk.info | gzip -9c > $INFO/gawk.info.gz for file in gawk.info* ; do cat $file | gzip -9c > $INFO/$file.gz done cp gawk.texi $TEX/gawk.texi if [ ! -d $PKG/usr/doc/gawk ]; then mkdir $PKG/usr/doc/gawk ; fi cp -a ACKNOWLEDGMENT COPYING FUTURES INSTALL LIMITATIONS NEWS \ PORTS POSIX PROBLEMS README README.FIRST $PKG/usr/doc/gawk chown root.root $PKG/usr/doc/gawk/* echo "+==========+" echo "| man-1.4d |" echo "+==========+" cd $TMP tar xzvf $CWD/man-1.4d.tar.gz cd man-1.4d 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 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 "| modules-1.2.8 |" echo "+===============+" cd $TMP tar xzvf $CWD/modules-1.2.8.tar.gz cd modules-1.2.8 make strip insmod/insmod genksyms/genksyms depmod/modprobe cd insmod cat insmod > $PKG/sbin/insmod for page in insmod.1 ksyms.1 lsmod.1 rmmod.1 ; do cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz done cat modules.2 | gzip -9c > $PKG/usr/man/man2/modules.2.gz cd ../genksyms cat genksyms > $PKG/sbin/genksyms cat genksyms.8 | gzip -9c > $PKG/usr/man/man8/genksyms.8.gz cd ../depmod cat modprobe > $PKG/sbin/modprobe cat depmod.1 | gzip -9c > $PKG/usr/man/man1/depmod.1.gz 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 cp sharutils.texi $TEX/sharutils.texi echo "+===============+" echo "| splitvt-1.6.1 |" echo "+===============+" cd $TMP tar xzvf $CWD/splitvt-1.6.1.tar.gz cd splitvt-1.6.1 Configure make cat splitvt > $PKG/usr/bin/splitvt cat splitvt.1 | gzip -9c > $PKG/usr/man/man1/splitvt.1.gz echo "+==========+" echo "| time-1.6 |" echo "+==========+" cd $TMP tar xvzf $CWD/time-1.6.tar.gz cd time-1.6 configure --prefix=/usr make CFLAGS=-O2 LDFLAGS=-s cat time > $PKG/usr/bin/time cat time.info | gzip -9c > $INFO/time.info.gz cp time.texi $TEX/time.texi 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 cp tput.texinfo $TEX/tput.texi 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 # 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.9 rm -rf $TMP/file-3.14 rm -rf $TMP/indent-1.9.1 rm -rf $TMP/gawk-2.15.5 rm -rf $TMP/man-1.4c rm -rf $TMP/mkdosfs-0.2 rm -rf $TMP/modules-1.1.87 rm -rf $TMP/patch-2.1 rm -rf $TMP/sed-2.05 rm -rf $TMP/sharutils-4.1 rm -rf $TMP/time-1.6 rm -rf $TMP/tput-1.0 rm -rf $TMP/unarj230 rm -rf $TMP/which rm -rf $TMP/zoo-2.10 # rm -rf $TMP/shadow-3.3.1 rm -rf $TMP/compress rm -rf $TMP/splitvt-1.6.1 rm -rf $TMP/xiafspgm-0.8.1 rm -rf $PKG fi