debian/control: new Debian policy version
[debian-git.git] / debian / git-el.emacsen-install
blobda35fdb0c597268a8dbbf48d969a8d9ac3f5e252
1 #!/bin/sh
2 # Based on /usr/share/doc/emacsen-common/sample-package-install-foo.gz.
4 # Unlike the example, we place symlinks to the elisp source alongside
5 # the compiled bytecode, so the .el source is available to the various
6 # Emacs help tools. Putting .el and .elc files in the same directory
7 # keeps "list-load-path-shadows" happy.
9 set -e
10 FLAVOR=$1
11 el_files="git.el git-blame.el"
12 el_dir=/usr/share/git-core/emacs
13 elc_dir=/usr/share/$FLAVOR/site-lisp/git
15 # The emacs startup file looks for these files in
16 # /usr/share/${debian-emacs-flavor}/site-lisp/git.
17 # Installing to the generic /usr/share/emacs/site-list/git would be
18 # pointless.
19 [ "$FLAVOR" != emacs ] || exit 0
21 printf 'install/git: Handling install of emacsen flavor %s\n' "$FLAVOR"
22 [ -d "$elc_dir" ] || mkdir "$elc_dir"
24 cd $elc_dir
25 for i in $el_files
27 ln -sf $el_dir/$i $i
28 done
30 printf 'install/git: Byte-compiling for %s\n' "$FLAVOR"
31 set -x
32 $FLAVOR -batch -q -no-site-file -f batch-byte-compile $el_files