From: Uwe Kleine-König Date: Thu, 5 Mar 2009 10:03:51 +0000 (+0100) Subject: Merge commit 'refs/top-bases/debian/locations' into debian/locations X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=commitdiff_plain;h=13cdd66678ff97a90507dc42924189944ec7aeb3;hp=5f3b1b57e27644abeb5148bb8dd9253231529bb4 Merge commit 'refs/top-bases/debian/locations' into debian/locations --- diff --git a/.topdeps b/.topdeps index 0459513..1f7391f 100644 --- a/.topdeps +++ b/.topdeps @@ -1 +1 @@ -upstream +master diff --git a/.topmsg b/.topmsg index 337e37f..7db14ee 100644 --- a/.topmsg +++ b/.topmsg @@ -1,7 +1,4 @@ From: martin f. krafft -Subject: [PATCH] add DESTDIR support to Makefile - -This is needed for distros to be able to install files to a temporary root -location, without affecting the PREFIX paths that are used at runtime. +Subject: [PATCH] make file locations Debian-compatible Signed-off-by: martin f. krafft diff --git a/Makefile b/Makefile index 3ce39a5..31cc98e 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ prefix ?= $(HOME) bindir := $(prefix)/bin -cmddir := $(prefix)/libexec/topgit -sharedir := $(prefix)/share/topgit +cmddir := $(prefix)/share/topgit +docdir := $(prefix)/share/doc/topgit hooksdir := $(cmddir)/hooks @@ -19,7 +19,7 @@ tg $(commands_out) $(hooks_out): % : %.sh Makefile @sed -e 's#@cmddir@#$(cmddir)#g;' \ -e 's#@hooksdir@#$(hooksdir)#g' \ -e 's#@bindir@#$(bindir)#g' \ - -e 's#@sharedir@#$(sharedir)#g' \ + -e 's#@docdir@#$(docdir)#g' \ $@.sh >$@+ && \ chmod +x $@+ && \ mv $@+ $@ @@ -36,8 +36,8 @@ install:: all install $(commands_out) "$(DESTDIR)$(cmddir)" install -d -m 755 "$(DESTDIR)$(hooksdir)" install $(hooks_out) "$(DESTDIR)$(hooksdir)" - install -d -m 755 "$(DESTDIR)$(sharedir)" - install -m 644 $(help_out) "$(DESTDIR)$(sharedir)" + install -d -m 755 "$(DESTDIR)$(docdir)" + install -m 644 $(help_out) "$(DESTDIR)$(docdir)" clean:: rm -f tg $(commands_out) $(hooks_out) $(help_out) diff --git a/tg.sh b/tg.sh index 2961106..a8eb718 100644 --- a/tg.sh +++ b/tg.sh @@ -227,8 +227,8 @@ do_help() elif [ -r "@cmddir@"/tg-$1 ] ; then @cmddir@/tg-$1 -h || : echo - if [ -r "@sharedir@/tg-$1.txt" ] ; then - cat "@sharedir@/tg-$1.txt" + if [ -r "@docdir@/tg-$1.txt" ] ; then + cat "@docdir@/tg-$1.txt" fi else echo "`basename $0`: no help for $1" 1>&2