home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / e / slackbui < prev   
Encoding:
Text File  |  1995-10-10  |  5.1 KB  |  142 lines

  1. #!/bin/sh
  2. # Set initial variables:
  3. CWD=`pwd`
  4. if [ "$TMP" = "" ]; then
  5.   TMP=/tmp
  6. fi
  7. PKG1=$TMP/emacsbin
  8. PKG2=$TMP/emacmisc
  9. PKG3a=$TMP/elispc1
  10. PKG3b=$TMP/elispc2
  11. PKG4=$TMP/elisp1
  12. PKG5=$TMP/elisp2
  13. PKG6=$TMP/emac_nox
  14. PKG7=$TMP/emacinfo
  15.  
  16. SRC=/devel/manpagesrc
  17. INFO=/devel/info-pages/usr/info
  18. TEX=/devel/texinfo-docs
  19.  
  20. if [ ! -d $TMP ]; then
  21.   mkdir -p $TMP # location to build the source
  22. fi
  23. for pkg in $PKG1 $PKG2 $PKG3a $PKG3b $PKG4 $PKG5 $PKG6 $PKG7 ; do
  24.   if [ ! -d $pkg ]; then
  25.     mkdir -p $pkg # place for the package to be built
  26.   fi
  27. done
  28.  
  29. # Explode the package framework:
  30. ( cd $PKG1 ; explodepkg $CWD/_emacsbin.tar.gz )
  31. ( cd $PKG2 ; explodepkg $CWD/_emacmisc.tar.gz )
  32. ( cd $PKG3a ; explodepkg $CWD/_elispc1.tar.gz )
  33. ( cd $PKG3b ; explodepkg $CWD/_elispc2.tar.gz )
  34. ( cd $PKG4 ; explodepkg $CWD/_elisp1.tar.gz )
  35. ( cd $PKG5 ; explodepkg $CWD/_elisp2.tar.gz )
  36. ( cd $PKG6 ; explodepkg $CWD/_emac_nox.tar.gz )
  37. ( cd $PKG7 ; explodepkg $CWD/_emacinfo.tar.gz )
  38.  
  39. # Function to handle manpage source:
  40. man2gz () { # $1 is source page name, $2 is target name for preformatted
  41.             # output (full path && name) and $3 is the same, but for the
  42.             # source.
  43.   mkdir -p `dirname $2`
  44.   groff -Tascii -mandoc $1 | gzip -9c > $2
  45.   if [ ! "$3" = "" ]; then
  46.     mkdir -p `dirname $3`
  47.     cat $1 > $3 
  48.   fi 
  49. }
  50.  
  51. echo "+=============+"
  52. echo "| emacs-19.29 |"
  53. echo "+=============+"
  54. cd $TMP
  55. tar xzvf $CWD/emacs-19.29.tar.gz
  56. cd emacs-19.29
  57. # First let's build a version with X support:
  58. ./configure i486-slackware-linux --prefix=/usr --with-x11 --with-x-toolkit
  59. make CFLAGS=-O2 LDFLAGS=-s
  60. cd info
  61. rm COPYING dir
  62. for file in * ; do
  63.   cat $file | gzip -9c > $PKG7/usr/info/$file.gz
  64. done
  65. cd ../src
  66. cat emacs > $PKG1/usr/bin/emacs-19.29-with-x11
  67. cd ../lib-src
  68. cat b2m > $PKG1/usr/bin/b2m
  69. cat ctags > $PKG1/usr/bin/ctags
  70. cat etags > $PKG1/usr/bin/etags
  71. cat emacsclient > $PKG1/usr/bin/emacsclient
  72. cat cvtmail > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/cvtmail
  73. cat digest-doc > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/digest-doc
  74. cat emacsserver > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/emacsserver
  75. cat fakemail > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/fakemail
  76. cat hexl > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/hexl
  77. cat make-docfile > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/make-docfile
  78. cat make-path > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/make-path
  79. cat movemail > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/movemail
  80. cat profile > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/profile
  81. cat rcs2log > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/rcs2log
  82. cat sorted-doc > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/sorted-doc
  83. cat test-distrib > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/test-distrib
  84. cat timer > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/timer
  85. cat vcdiff > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/vcdiff
  86. cat wakeup > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/wakeup
  87. cat yow > $PKG1/usr/libexec/emacs/19.29/i486-slackware-linux/yow
  88. cd ../etc
  89. for page in emacs.1 ctags.1 etags.1 ; do
  90.   cat $page | gzip -9c > $PKG1/usr/man/man1/$page.gz
  91. done
  92. ( cd $SRC/usr/man/man1 ; ln -sf etags.1 ctags.1 )
  93. cd ../lisp
  94. cp -a abbrevlist.el blessmail.el cal-menu.el cdl.el cl-specs.el foldout.el \
  95. iso-transl.el ispell4.el loaddefs.el loadup.el paths.el sc.el tpu-doc.el \
  96. version.el vt-control.el $PKG1/usr/share/emacs/19.29/lisp
  97. ( cd $PKG1/usr/share/emacs/19.29/lisp ; chown root.root * ; chmod 644 * )
  98. ( cd $PKG1/usr/share/emacs/19.29/lisp ; chmod 755 term )
  99. cd term
  100. cp -a * $PKG1/usr/share/emacs/19.29/lisp/term
  101. ( cd $PKG1/usr/share/emacs/19.29/lisp/term ; chown root.root * ; chmod 644 * )
  102. cd ../../etc
  103. cp -a * $PKG2/usr/share/emacs/19.29/etc
  104. cd ../lisp
  105. 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
  106. cp -a {s,t,u,v,w,x,y,z}*.elc $PKG3b/usr/share/emacs/19.29/lisp
  107. chmod 644 $PKG3/usr/share/emacs/19.29/lisp/*.elc
  108. cp -a {a,b,c,d,e,f,g,h}*.el $PKG4/usr/share/emacs/19.29/lisp
  109. chmod 644 $PKG4/usr/share/emacs/19.29/lisp/*.el
  110. 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
  111. chmod 644 $PKG5/usr/share/emacs/19.29/lisp/*.el
  112. # OK, now we rebuild for people that don't have X:
  113. echo "+====================================+"
  114. echo "| Rebuilding emacs without X support |"
  115. echo "+====================================+"
  116. cd ..
  117. make clean
  118. ./configure i486-slackware-linux --prefix=/usr --with-x=no
  119. make CFLAGS=-O2 LDFLAGS=-s
  120. cd src
  121. cat emacs > $PKG6/usr/bin/emacs-19.29-no-x11
  122. cd ../etc
  123. cat DOC-19.29.1 > $PKG6/usr/share/emacs/19.29/etc/DOC-19.29.1
  124. cd ../man
  125. cp *.texi $TEX
  126.  
  127. # Build the packages:
  128. ( cd $PKG1 ; tar czvf $TMP/emacsbin.tgz . )
  129. ( cd $PKG2 ; tar czvf $TMP/emacmisc.tgz . )
  130. ( cd $PKG3a ; tar czvf $TMP/elispc1.tgz . )
  131. ( cd $PKG3b ; tar czvf $TMP/elispc2.tgz . )
  132. ( cd $PKG4 ; tar czvf $TMP/elisp1.tgz . )
  133. ( cd $PKG5 ; tar czvf $TMP/elisp2.tgz . )
  134. ( cd $PKG6 ; tar czvf $TMP/emac_nox.tgz . )
  135. ( cd $PKG7 ; tar czvf $TMP/emacinfo.tgz . )
  136.  
  137. # Clean up the extra stuff:
  138. if [ "$1" = "--cleanup" ]; then
  139.   rm -rf $TMP/emacs-19.29
  140.   rm -rf $PKG1 $PKG2 $PKG3a $PKG3b $PKG4 $PKG5 $PKG6 $PKG7
  141. fi
  142.