source: projects/specs/trunk/n/navi2ch/navi2ch-install.sh @ 2319

Revision 2319, 2.1 KB checked in by iwaim, 13 years ago (diff)

navi2ch 2.0.0-5.cvs20101116vl6

  • Property svn:executable set to *
Line 
1#! /bin/sh -e
2#  /usr/lib/emacsen-common/packages/install/navi2ch
3# [ This particular script hasn't been tested, so be careful. ]
4
5set -e
6
7FLAVOR=$1
8PACKAGE="navi2ch"
9VERSION="2.0.0"
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
29STAMP=${ELCDIR}/compile-stamp
30
31compile() {
32
33    echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
34   
35    if [ -e ${STAMP} ]; then
36        if [ "${VERSION}" = "`cat ${STAMP}`" ]; then
37            echo " exited. (already compiled)" 
38            exit
39        fi
40    fi
41   
42    rm -rf ${ELCDIR}
43    install -m 755 -d ${ELCDIR}
44   
45    cd ${ELDIR}
46    #rm -f config.*
47    ./configure --with-lispdir=${ELCDIR} > ${ELCDIR}/CompilationLog 2>&1
48    ## Unrecognized options: --with-xemacs, --with-emacs in ./configure
49    make clean >> ${ELCDIR}/CompilationLog 2>&1
50    make EMACS=${FLAVOR} >> ${ELCDIR}/CompilationLog 2>&1
51    #make EMACS=${FLAVOR} -C contrib >> ${ELCDIR}/CompilationLog 2>&1
52    make INSTALLPATH=${ELCDIR} install >> ${ELCDIR}/CompilationLog 2>&1
53    #make INSTALLPATH=${ELCDIR} install -C contrib >> ${ELCDIR}/CompilationLog 2>&1
54    make clean >> ${ELCDIR}/CompilationLog 2>&1
55    #rm -f config.*
56    rm ${ELCDIR}/*.el
57   
58    #if [ -e /usr/share/info/navi2ch.info.gz ]; then
59    #   rm -f /usr/share/info/navi2ch.info*.gz
60    #fi
61
62    gzip -9 ${ELCDIR}/CompilationLog
63    #gzip -9 /usr/share/info/navi2ch.info
64    echo ${VERSION} > ${STAMP}
65   
66    install -p -m644 ${ELDIR}/vine-default-${PACKAGE}.el ${ELCDIR}
67    ln -f -s ${ELDIR}/${STARTFILE} ${STARTDIR}/90${STARTFILE};
68    echo " done."
69}
70
71case "${FLAVOR}" in
72
73    emacs-20*)
74        echo "Not Support"
75        ;;
76
77    emacs-21*)
78        compile
79        ;;
80
81    emacs-22*)
82        compile
83        ;;
84
85    xemacs-*)
86        compile
87        ;;
88
89    emacs-23*)
90        compile
91        ;;
92   
93    emacs-24*)
94        compile
95        ;;
96   
97    *)
98        ;;
99esac
100
101exit 0;
Note: See TracBrowser for help on using the repository browser.