home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- # Set initial variables:
- CWD=`pwd`
- if [ "$TMP" = "" ]; then
- TMP=/tmp
- fi
- PKG1=$TMP/emacsbin
- PKG2=$TMP/emacmisc
- PKG3=$TMP/elispc
- PKG4=$TMP/elisp1
- PKG5=$TMP/elisp2
- PKG6=$TMP/emac_nox
-
- 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
- for pkg in $PKG1 $PKG2 $PKG3 $PKG4 $PKG5 $PKG6 ; do
- if [ ! -d $pkg ]; then
- mkdir -p $pkg # place for the package to be built
- fi
- done
-
- # Explode the package framework:
- ( cd $PKG1 ; tar xzvf $CWD/_emacsbin.tar.gz )
- ( cd $PKG2 ; tar xzvf $CWD/_emacmisc.tar.gz )
- ( cd $PKG3 ; tar xzvf $CWD/_elispc.tar.gz )
- ( cd $PKG4 ; tar xzvf $CWD/_elisp1.tar.gz )
- ( cd $PKG5 ; tar xzvf $CWD/_elisp2.tar.gz )
- ( cd $PKG6 ; tar xzvf $CWD/_emac_nox.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 "| emacs-19.28 |"
- echo "+=============+"
- cd $TMP
- tar xzvf $CWD/emacs-19.28.tar.gz
- cd emacs-19.28
- # First let's build a version with X support:
- ./configure i486-slackware-linux --prefix=/usr --with-x11 --with-x-toolkit
- make CFLAGS=-O2 LDFLAGS=-s
- cd info
- rm COPYING dir
- for file in * ; do
- cat $file | gzip -9c > $PKG1/usr/info/$file.gz
- done
- cd ../src
- cat emacs > $PKG1/usr/bin/emacs-19.28-with-x11
- cd ../lib-src
- cat b2m > $PKG1/usr/bin/b2m
- cat ctags > $PKG1/usr/bin/ctags
- cat etags > $PKG1/usr/bin/etags
- cat emacsclient > $PKG1/usr/bin/emacsclient
- cat cvtmail > $PKG1/usr/lib/emacs/19.28/i486-slackware-linux/cvtmail
- cat digest-doc > $PKG1/usr/lib/emacs/19.28/i486-slackware-linux/digest-doc
- cat emacsserver > $PKG1/usr/lib/emacs/19.28/i486-slackware-linux/emacsserver
- cat fakemail > $PKG1/usr/lib/emacs/19.28/i486-slackware-linux/fakemail
- cat hexl > $PKG1/usr/lib/emacs/19.28/i486-slackware-linux/hexl
- cat make-docfile > $PKG1/usr/lib/emacs/19.28/i486-slackware-linux/make-docfile
- cat make-path > $PKG1/usr/lib/emacs/19.28/i486-slackware-linux/make-path
- cat movemail > $PKG1/usr/lib/emacs/19.28/i486-slackware-linux/movemail
- cat profile > $PKG1/usr/lib/emacs/19.28/i486-slackware-linux/profile
- cat rcs2log > $PKG1/usr/lib/emacs/19.28/i486-slackware-linux/rcs2log
- cat sorted-doc > $PKG1/usr/lib/emacs/19.28/i486-slackware-linux/sorted-doc
- cat test-distrib > $PKG1/usr/lib/emacs/19.28/i486-slackware-linux/test-distrib
- cat timer > $PKG1/usr/lib/emacs/19.28/i486-slackware-linux/timer
- cat vcdiff > $PKG1/usr/lib/emacs/19.28/i486-slackware-linux/vcdiff
- cat wakeup > $PKG1/usr/lib/emacs/19.28/i486-slackware-linux/wakeup
- cat yow > $PKG1/usr/lib/emacs/19.28/i486-slackware-linux/yow
- cd ../etc
- man2gz emacs.1 $PKG1/usr/man/preformat/cat1/emacs.1.gz $SRC/usr/man/man1/emacs.1
- man2gz etags.1 $PKG1/usr/man/preformat/cat1/etags.1.gz $SRC/usr/man/man1/etags.1
- ( cd $SRC/usr/man/man1 ; ln -sf etags.1 ctags.1 )
- cd ../lisp
- cp abbrevlist.el blessmail.el cal-menu.el cdl.el cl-specs.el foldout.el \
- iso-transl.el ispell4.el loaddefs.el loadup.el paths.el sc.el tpu-doc.el \
- version.el vt-control.el $PKG1/usr/lib/emacs/19.28/lisp
- cd term
- cp * $PKG1/usr/lib/emacs/19.28/lisp/term
- ( cd $PKG1/usr/lib/emacs/19.28/lisp/term ; chmod 644 * )
- ( cd $PKG1/usr/lib/emacs/19.28/lisp ; chmod 644 *.el )
- cd ../../etc
- cp -a * $PKG2/usr/lib/emacs/19.28/etc
- cd ../lisp
- cp *.elc $PKG3/usr/lib/emacs/19.28/lisp
- chmod 644 $PKG3/usr/lib/emacs/19.28/lisp/*.elc
- cp {a,b,c,d,e,f,g,h,i,j,k}*.el $PKG4/usr/lib/emacs/19.28/lisp
- chmod 644 $PKG4/usr/lib/emacs/19.28/lisp/*.el
- cp {l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}*.el $PKG5/usr/lib/emacs/19.28/lisp
- chmod 644 $PKG5/usr/lib/emacs/19.28/lisp/*.el
- # OK, now we rebuild for people that don't have X:
- echo "+====================================+"
- echo "| Rebuilding emacs without X support |"
- echo "+====================================+"
- cd ..
- make clean
- ./configure i486-slackware-linux --prefix=/usr --with-x=no
- make CFLAGS=-O2 LDFLAGS=-s
- cd src
- cat emacs > $PKG6/usr/bin/emacs-19.28-no-x11
- cd ../etc
- cat DOC-19.28.1 > $PKG6/usr/lib/emacs/19.28/etc/DOC-19.28.1
- cd ../man
- cp *.texi $TEX
-
- # Build the packages:
- ( cd $PKG1 ; tar czvf $TMP/emacsbin.tgz . )
- ( cd $PKG2 ; tar czvf $TMP/emacmisc.tgz . )
- ( cd $PKG3 ; tar czvf $TMP/elispc.tgz . )
- ( cd $PKG4 ; tar czvf $TMP/elisp1.tgz . )
- ( cd $PKG5 ; tar czvf $TMP/elisp2.tgz . )
- ( cd $PKG6 ; tar czvf $TMP/emac_nox.tgz . )
-
- # Clean up the extra stuff:
- if [ "$1" = "--cleanup" ]; then
- rm -rf $TMP/emacs-19.28
- rm -rf $PKG1 $PKG2 $PKG3 $PKG4 $PKG5 $PKG6
- fi
-