home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- # Set initial variables:
- CWD=`pwd`
- if [ "$TMP" = "" ]; then
- TMP=/tmp
- fi
- PKG=$TMP/package-e2fsbn
- 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
- tar xzvf $CWD/_e2fsbn.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 "| e2fsprogs-0.5a |"
- echo "+================+"
- cd $TMP
- tar xzvf $CWD/e2fsprogs-0.5b.tar.gz
- cd e2fsprogs-0.5b
- make world
- cd e2fsck
- strip e2fsck
- cat e2fsck > $PKG/sbin/e2fsck
- man2gz e2fsck.8 $PKG/usr/man/preformat/cat8/e2fsck.8.gz $SRC/usr/man/man8/e2fsck.8
- cd ../misc
- strip badblocks chattr dumpe2fs lsattr mke2fs mklost+found tune2fs fsck
- cat fsck > $PKG/sbin/fsck
- cat badblocks > $PKG/sbin/badblocks
- cat chattr > $PKG/sbin/chattr
- cat dumpe2fs > $PKG/sbin/dumpe2fs
- cat lsattr > $PKG/sbin/lsattr
- cat mke2fs > $PKG/sbin/mke2fs
- cat mklost+found > $PKG/sbin/mklost+found
- cat tune2fs > $PKG/sbin/tune2fs
- man2gz badblocks.8 $PKG/usr/man/preformat/cat8/badblocks.8.gz $SRC/usr/man/man8/badblocks.8
- man2gz chattr.1 $PKG/usr/man/preformat/cat1/chattr.1.gz $SRC/usr/man/man1/chattr.1
- man2gz dumpe2fs.8 $PKG/usr/man/preformat/cat8/dumpe2fs.8.gz $SRC/usr/man/man8/dumpe2fs.8
- man2gz fsck.8 $PKG/usr/man/preformat/cat8/fsck.8.gz $SRC/usr/man/man8/fsck.8
- man2gz lsattr.1 $PKG/usr/man/preformat/cat1/lsattr.1.gz $SRC/usr/man/man1/lsattr.1
- man2gz mke2fs.8 $PKG/usr/man/preformat/cat8/mke2fs.8.gz $SRC/usr/man/man8/mke2fs.8
- man2gz mklost+found.8 $PKG/usr/man/preformat/cat8/mklost+found.8.gz $SRC/usr/man/man8/mklost+found.8
- man2gz tune2fs.8 $PKG/usr/man/preformat/cat8/tune2fs.8.gz $SRC/usr/man/man8/tune2fs.8
- cd ../debugfs
- strip debugfs
- cat debugfs > $PKG/sbin/debugfs
- man2gz debugfs.8 $PKG/usr/man/preformat/cat8/debugfs.8.gz $SRC/usr/man/man8/debugfs.8
- cd ../lib/ss
- cat libss.so.1.0 > $PKG/lib/libss.so.1.0
- cd ../et
- cat libet.so.1.0 > $PKG/lib/libet.so.1.0
- cd ../ext2fs
- cat libe2fs.so.1.0 > $PKG/lib/libe2fs.so.1.0
- cd ../e2p
- cat libe2p.so.1.0 > $PKG/lib/libe2p.so.1.0
-
- # Build the package:
- cd $PKG
- tar czvf $TMP/e2fsbn.tgz .
-
- # Clean up the extra stuff:
- if [ "$1" = "--cleanup" ]; then
- rm -rf $TMP/e2fsprogs-0.5b
- rm -rf $PKG
- fi
-