source: projects/specs/trunk/f/flim/flim-install.sh @ 3602

Revision 3602, 2.0 KB checked in by iwaim, 13 years ago (diff)

add flim-1.14.9-2 files

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