debian: install emacs support files to /usr/share/git-core
Files in /usr/share/doc should not be required for a package
to function correctly (policy ยง12.6). So install and look for
git-blame.el and git.el in /usr/share/git-core instead of
the /usr/share/doc.
To avoid breaking the configuration of existing installations, also
install a symlink /usr/share/doc/git/contrib/emacs ->
/usr/share/git-core/emacs.
Do not install the Makefile and README from the emacs suport
directory; these are mostly installation instructions. The pertinent
information from README will be re-added in another patch.
diff --git a/debian/changelog b/debian/changelog
index d57c218..2ac5e8d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@
debian/git.prerm: update emacs support to follow current best
practices. Make M-x git-status and git-blame modes available
again with emacs23 (closes: #576887).
+ * debian/rules, debian/git.emacsen-install: install emacs support
+ files to /usr/share/git-core, not /usr/share/doc.
-- Jonathan Nieder <jrnieder@gmail.com> Wed, 29 Dec 2010 04:10:19 -0600
diff --git a/debian/git.emacsen-install b/debian/git.emacsen-install
index c66bc03..614c1c7 100644
--- a/debian/git.emacsen-install
+++ b/debian/git.emacsen-install
@@ -14,7 +14,7 @@
echo install/git: Handling install of emacsen flavor $FLAVOR
el_files="git.el git-blame.el"
-el_dir=/usr/share/doc/git/contrib/emacs
+el_dir=/usr/share/git-core/emacs
elc_dir=/usr/share/$FLAVOR/site-lisp/git
if [ $FLAVOR != emacs ]
diff --git a/debian/rules b/debian/rules
index d599a7a..94192a3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -105,6 +105,11 @@
'$(GIT)'/usr/lib/emacsen-common/packages/install/git
install -m0755 -D debian/git.emacsen-remove \
'$(GIT)'/usr/lib/emacsen-common/packages/remove/git
+ install -d -m0755 '$(GIT)'/usr/share/git-core/emacs
+ install -m0644 contrib/emacs/git-blame.el \
+ '$(GIT)'/usr/share/git-core/emacs/git-blame.el
+ install -m0644 contrib/emacs/git.el \
+ '$(GIT)'/usr/share/git-core/emacs/git.el
# bash completion
install -d -m0755 '$(GIT)'/etc/bash_completion.d
install -m0644 contrib/completion/git-completion.bash \
@@ -113,6 +118,9 @@
install -d -m0755 '$(GIT)'/usr/share/doc/git
cp -R contrib '$(GIT)'/usr/share/doc/git/
rm -rf '$(GIT)'/usr/share/doc/git/contrib/completion
+ rm -rf '$(GIT)'/usr/share/doc/git/contrib/emacs
+ ln -s ../../../../git-core/emacs \
+ '$(GIT)'/usr/share/doc/git/contrib/emacs
find '$(GIT)'/usr/share/doc/git/contrib -type f | xargs chmod 0644
find '$(GIT)'/usr/share/doc/git/contrib -type d | xargs chmod 0755
find '$(GIT)'/usr/share/doc/git/ -name .gitignore | xargs rm -f