File: emacsen.install

package info (click to toggle)
vm 6.75-8
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,932 kB
  • ctags: 1,656
  • sloc: lisp: 24,646; sh: 342; makefile: 265
file content (107 lines) | stat: -rw-r--r-- 3,375 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#!/bin/bash
#				-*- Mode: Sh -*- 
# emacsen.install --- 
# Author	   : Manoj Srivastava ( srivasta@tiamat.datasync.com ) 
# Created On	   : Fri Apr  3 14:39:59 1998
# Created On Node  : tiamat.datasync.com
# Last Modified By : Manoj Srivastava
# Last Modified On : Tue Aug  3 12:02:24 1999
# Last Machine Used: glaurung.green-gryphon.com
# Update Count	   : 34
# Status	   : Unknown, Use with caution!
# HISTORY	   : 
# Description	   : 
# 
# 

set -e

FLAVOUR=$1
PACKAGE="=P"
VERSION="=V"

if [ "X$FLAVOUR" = "X" ]; then
    echo Need argument to determin FLAVOUR of emacs;
    exit 1
fi

if [ "X$PACKAGE" = "X" ]; then
    echo Internal error: need package name;
    exit 1;
fi

if [ "X$VERSION" = "X" ]; then
    echo Internal error: need package version;
    exit 1;
fi

ELDIR=/usr/share/emacs/site-lisp/$PACKAGE
ELCDIR=/usr/share/$FLAVOUR/site-lisp/$PACKAGE
EFLAGS="-batch -q -l load-path-hack.el -f batch-byte-compile"
startdir=/etc/$FLAVOUR/site-start.d
INFO_FILES="/usr/info/vm.info.gz";
STARTFILE="$PACKAGE-init.el";
BYTEOPTS="./vm-byteopts.el";
PRELOADS=" -l $BYTEOPTS -l ./vm-message.el -l ./vm-misc.el -l ./vm-vars.el -l ./vm-version.el";
BATCHFLAGS=" -batch -q -no-site-file"
CORE="vm-message.el vm-misc.el vm-byteopts.el"
SOURCES="vm-delete.el vm-digest.el vm-easymenu.el vm-edit.el vm-folder.el vm-license.el vm-mark.el vm-menu.el vm-message.el vm-mime.el vm-minibuf.el vm-misc.el vm-mouse.el vm-motion.el vm-page.el vm-pop.el vm-reply.el vm-save.el vm-search.el vm-sort.el vm-startup.el vm-summary.el vm-thread.el vm-toolbar.el vm-undo.el vm-user.el vm-vars.el vm-version.el vm-virtual.el vm-window.el";

case "$FLAVOUR" in
    emacs19)
	echo -n "install/$PACKAGE: Byte-compiling for $FLAVOUR..."
	if [ -d $ELCDIR ]; then
	    rm -f $ELCDIR/*.elc $ELCDIR/install.log;
	    rmdir $ELCDIR
	fi
	if [ ! -d $ELCDIR ]; then
	    install -m 755 -d $ELCDIR
	fi
	cd $ELDIR
	# if we do not have make, well, we are hosed.
	LOG=`tempfile`;
	if [ -x /usr/bin/make ]; then
	    make clean                          > $LOG;
	    (make EMACS=$FLAVOUR)              >> $LOG 2>&1 ;
	    echo install -m 644 *.elc $ELCDIR  >> $LOG;
	    install -m 644 *.elc $ELCDIR;
	    make clean                         >> $LOG;
	else
	    echo >&2 "You do not seem to have make." 
	    echo >&2 "This is not good, since I can't byte compile without make" 
	    echo >&2 "I am letting vm remain non-byte compiled, which slows it down." 
	    echo >&2 "Please hit return to continue."
	    read ans;
	    echo "You do not seem to have make."         > $LOG;
	    echo "Not byte compiling."                  >> $LOG;
	    echo "tar cf - . | (cd $ELCDIR; tar xpf -)" >> $LOG;
	    tar cf - . | (cd $ELCDIR; tar xpf -)
	    echo "cd $ELCDIR;"                          >> $LOG;
	    cd $ELCDIR;
	    echo "rm -f Makefile;"                      >> $LOG;
	    rm -f Makefile;
	fi
	mv $LOG       $ELCDIR/install.log;
	sed -e "s|=F|/usr/share/$FLAVOUR/site-lisp/$PACKAGE|" \
            $STARTFILE > $startdir/50$STARTFILE;
	if test -x /usr/sbin/install-info-altdir; then
	    for infofile in $INFO_FILES; do
		if [ -x $infofile ]; then
		    install-info-altdir --quiet --section "" "" \
			--dirname=${FLAVOUR} $infofile
		fi
	    done
	fi
	echo " done."
	;;
    *)
	echo "install/$PACKAGE: Ignoring emacsen flavor $FLAVOUR."
	;;
esac

exit 0


### Local Variables:
### mode: shell-script
### End: