File: golang-mode.emacsen-install

package info (click to toggle)
golang 2%3A1.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 45,624 kB
  • ctags: 90,136
  • sloc: ansic: 168,421; asm: 15,852; yacc: 4,966; perl: 4,876; sh: 2,229; xml: 1,085; lisp: 947; python: 267; makefile: 243; awk: 106; cpp: 22
file content (36 lines) | stat: -rw-r--r-- 955 bytes parent folder | download | duplicates (7)
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
#!/bin/sh -e
# /usr/lib/emacsen-common/packages/install/golang-mode

FLAVOR=$1
PACKAGE=golang-mode

# A number of old emacs versions are not supported by upstream:
case $FLAVOR in
    emacs|emacs19|emacs20|emacs21|xemacs21)
        exit 0
	;;
esac

echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}

# The byte-compiled files goes into the site-lisp directory.
BCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
install -m 755 -d ${BCDIR}

# The elisp source files are in the generic site-list directory.
SRCDIR=/usr/share/emacs/site-lisp/${PACKAGE}
SRC=`find ${SRCDIR} -name '*.el' -exec basename '{}' ';'`

# Prepare for byte-compiling the source files.
cd ${BCDIR}
ln -sf ${SRCDIR}/*.el .
cat << EOF > path.el
(setq load-path (cons "." load-path) byte-compile-warnings nil)
EOF

# Byte-compile elisp files.
FLAGS="--no-site-file --no-init-file --batch -l path.el -f batch-byte-compile"
${FLAVOR} ${FLAGS} ${SRC}
rm -f path.el

exit 0