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
- PKG3a=$TMP/elispc1
- PKG3b=$TMP/elispc2
- PKG4=$TMP/elisp1
- PKG5=$TMP/elisp2
- PKG6=$TMP/emac_nox
- PKG7=$TMP/emacinfo
-
- 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 $PKG3a $PKG3b $PKG4 $PKG5 $PKG6 $PKG7 ; do
- if [ ! -d $pkg ]; then
- mkdir -p $pkg # place for the package to be built
- fi
- done
-
- # Explode the package framework:
- ( cd $PKG1 ; explodepkg $CWD/_emacsbin.tar.gz )
- ( cd $PKG2 ; explodepkg $CWD/_emacmisc.tar.gz )
- ( cd $PKG3a ; explodepkg $CWD/_elispc1.tar.gz )
- ( cd $PKG3b ; explodepkg $CWD/_elispc2.tar.gz )
- ( cd $PKG4 ; explodepkg $CWD/_elisp1.tar.gz )
- ( cd $PKG5 ; explodepkg $CWD/_elisp2.tar.gz )
- ( cd $PKG6 ; explodepkg $CWD/_emac_nox.tar.gz )
- ( cd $PKG7 ; explodepkg $CWD/_emacinfo.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.29 |"
- echo "+=============+"
- cd $TMP
- tar xzvf $CWD/emacs-19.29.tar.gz
- cd emacs-19.29
- # 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 > $PKG7/usr/info/$file.gz
- done
- cd ../src
- cat emacs > $PKG1/usr/bin/emacs-19.29-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/libexec/emacs/19.29/i486-slackware-linux/cvtmail
- cat digest-doc > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/digest-doc
- cat emacsserver > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/emacsserver
- cat fakemail > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/fakemail
- cat hexl > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/hexl
- cat make-docfile > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/make-docfile
- cat make-path > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/make-path
- cat movemail > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/movemail
- cat profile > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/profile
- cat rcs2log > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/rcs2log
- cat sorted-doc > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/sorted-doc
- cat test-distrib > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/test-distrib
- cat timer > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/timer
- cat vcdiff > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/vcdiff
- cat wakeup > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/wakeup
- cat yow > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/yow
- cd ../etc
- for page in emacs.1 ctags.1 etags.1 ; do
- cat $page | gzip -9c > $PKG1/usr/man/man1/$page.gz
- done
- ( cd $SRC/usr/man/man1 ; ln -sf etags.1 ctags.1 )
- cd ../lisp
- cp -a 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/share/emacs/19.29/lisp
- ( cd $PKG1/usr/share/emacs/19.29/lisp ; chown root.root * ; chmod 644 * )
- ( cd $PKG1/usr/share/emacs/19.29/lisp ; chmod 755 term )
- cd term
- cp -a * $PKG1/usr/share/emacs/19.29/lisp/term
- ( cd $PKG1/usr/share/emacs/19.29/lisp/term ; chown root.root * ; chmod 644 * )
- cd ../../etc
- cp -a * $PKG2/usr/share/emacs/19.29/etc
- cd ../lisp
- cp -a {a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r}*.elc $PKG3a/usr/share/emacs/19.29/lisp
- cp -a {s,t,u,v,w,x,y,z}*.elc $PKG3b/usr/share/emacs/19.29/lisp
- chmod 644 $PKG3/usr/share/emacs/19.29/lisp/*.elc
- cp -a {a,b,c,d,e,f,g,h}*.el $PKG4/usr/share/emacs/19.29/lisp
- chmod 644 $PKG4/usr/share/emacs/19.29/lisp/*.el
- cp -a {i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}*.el $PKG5/usr/share/emacs/19.29/lisp
- chmod 644 $PKG5/usr/share/emacs/19.29/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.29-no-x11
- cd ../etc
- cat DOC-19.29.1 > $PKG6/usr/share/emacs/19.29/etc/DOC-19.29.1
- cd ../man
- cp *.texi $TEX
-
- # Build the packages:
- ( cd $PKG1 ; tar czvf $TMP/emacsbin.tgz . )
- ( cd $PKG2 ; tar czvf $TMP/emacmisc.tgz . )
- ( cd $PKG3a ; tar czvf $TMP/elispc1.tgz . )
- ( cd $PKG3b ; tar czvf $TMP/elispc2.tgz . )
- ( cd $PKG4 ; tar czvf $TMP/elisp1.tgz . )
- ( cd $PKG5 ; tar czvf $TMP/elisp2.tgz . )
- ( cd $PKG6 ; tar czvf $TMP/emac_nox.tgz . )
- ( cd $PKG7 ; tar czvf $TMP/emacinfo.tgz . )
-
- # Clean up the extra stuff:
- if [ "$1" = "--cleanup" ]; then
- rm -rf $TMP/emacs-19.29
- rm -rf $PKG1 $PKG2 $PKG3a $PKG3b $PKG4 $PKG5 $PKG6 $PKG7
- fi
-