~ubuntu-branches/ubuntu/utopic/evernote-mode/utopic-proposed

« back to all changes in this revision

Viewing changes to debian/emacsen-install

  • Committer: Bazaar Package Importer
  • Author(s): Youhei SASAKI
  • Date: 2010-11-16 14:45:38 UTC
  • Revision ID: james.westby@ubuntu.com-20101116144538-4ox9xv49zzvj1048
Tags: 0.10-1
Initial release (Closes: #603668)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh -e
 
2
# /usr/lib/emacsen-common/packages/install/evernote-mode
 
3
 
 
4
FLAVOR=$1
 
5
PACKAGE=evernote-mode
 
6
 
 
7
# don't support older FSF emacs, XEmacs.
 
8
case $FLAVOR in
 
9
    emacs|emacs22|emacs21|emacs20|emacs19|mule2|*xemacs*)
 
10
    exit 0
 
11
    ;;
 
12
esac
 
13
 
 
14
echo "install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}"
 
15
 
 
16
SITEFLAG="--no-site-file"
 
17
FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
 
18
 
 
19
ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
 
20
ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
 
21
 
 
22
install -m 755 -d ${ELCDIR}
 
23
cd ${ELDIR}
 
24
FILES=`echo *.el`
 
25
for f in ${FILES} ; do
 
26
  [ -L ${ELCDIR}/$f ] && rm -f ${ELCDIR}/$f ;
 
27
  cp $f ${ELCDIR}
 
28
done
 
29
cd ${ELCDIR}
 
30
cat << EOF > path.el
 
31
(setq load-path (cons "." load-path) byte-compile-warnings nil)
 
32
EOF
 
33
${FLAVOR} ${FLAGS} ${FILES}
 
34
rm -f *.el path.el
 
35
ELCFILES=`echo *.elc`
 
36
for f in ${ELCFILES} ; do 
 
37
  ln -s ../../../emacs/site-lisp/${PACKAGE}/`basename $f .elc`.el . 
 
38
done
 
39
 
 
40
exit 0