source: projects/specs/trunk/w/wl/wl-install.sh @ 2750

Revision 2750, 2.0 KB checked in by munepi, 13 years ago (diff)

updated emacs, emacs24, wl, yatex, auctex, IIIMECF; added wl-beta; supported new vine-default

  • Property svn:executable set to *
Line 
1#!/bin/sh -e
2#  /usr/lib/emacsen-common/packages/install/wl
3# [ This particular script hasn't been tested, so be careful. ]
4
5set -e
6
7FLAVOR=$1
8PACKAGE="wl"
9
10if [ "X${FLAVOR}" = "X" ]; then
11    echo Need argument to determin FLAVOR of emacs;
12    exit 1
13fi
14
15if [ "X${PACKAGE}" = "X" ]; then
16    echo Internal error: need package name;
17    exit 1;
18fi
19
20ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
21ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
22
23STARTDIR=/etc/${FLAVOR}/site-start.d
24STARTFILE="${PACKAGE}-init.el";
25
26SITELISP=/usr/share/${FLAVOR}/site-lisp
27
28PIXMAPDIR=/usr/share/${FLAVOR}/etc/wl
29
30EFLAGS="-batch -q"
31COMPILE="-batch -q -f batch-byte-compile"
32
33case "${FLAVOR}" in
34
35    emacs|emacs19)
36
37        ;;
38
39    *)
40
41        if [ -e /usr/lib/emacsen-common/packages/install/wemi ]; then
42            if [ ! -d ${SITELISP}/semi ] ; then
43                /usr/lib/emacsen-common/packages/install/wemi ${FLAVOR}
44            fi
45        fi
46
47        echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
48
49        if [ ! -d /usr/share/emacs/site-lisp/semi ]; then
50            echo " exited."
51            echo "W: Please install \`semi' package for ${FLAVOR}." ;
52            exit 0;
53        fi
54
55        rm -rf ${ELCDIR}
56        install -m 755 -d ${ELCDIR}
57
58        # Byte compile
59        (
60            cd ${ELDIR}
61            make EMACS=${FLAVOR} FLAGS="${EFLAGS}" LISPDIR=${SITELISP} \
62                > ${ELCDIR}/CompilationLog 2>&1
63
64            case "${FLAVOR}" in
65                xemacs-*|emacs-21*)
66                    make EMACS=${FLAVOR} FLAGS="${EFLAGS}" LISPDIR=${SITELISP} \
67                        PIXMAPDIR=${PIXMAPDIR} install \
68                        >> ${ELCDIR}/CompilationLog 2>&1
69                ;;
70                *)
71                    make EMACS=${FLAVOR} FLAGS="${EFLAGS}" LISPDIR=${SITELISP} \
72                        PIXMAPDIR=${PIXMAPDIR} \
73                        install  >> ${ELCDIR}/CompilationLog 2>&1
74                ;;
75            esac
76
77            make EMACS=${FLAVOR} FLAGS="${EFLAGS}" LISPDIR=${SITELISP} clean \
78                >> ${ELCDIR}/CompilationLog 2>&1
79
80            rm -f ${ELCDIR}/*.el
81            #cp ${STARTFILE} ${ELCDIR}
82            rm -f *.elc elmo/*.elc
83
84            rm -f vine-default-${PACKAGE}.elc
85            install -p -m644 ${ELDIR}/vine-default-${PACKAGE}.el ${ELCDIR}
86        )
87
88        gzip -9 ${ELCDIR}/CompilationLog
89
90        ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/55${STARTFILE};
91        echo " done."
92
93        ;;
94
95esac
96
97exit 0;
Note: See TracBrowser for help on using the repository browser.