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