chiark / gitweb /
Merge commit 'refs/top-bases/debian/locations' into debian/locations
authormartin f. krafft <madduck@debian.org>
Wed, 10 Sep 2008 08:36:34 +0000 (09:36 +0100)
committermartin f. krafft <madduck@debian.org>
Wed, 10 Sep 2008 08:36:34 +0000 (09:36 +0100)
Conflicts:
Makefile
tg.sh

.topdeps
.topmsg
Makefile
tg.sh

index 045951300cf4890e4273f294da20894d587b9ad1..03c65b12052e40cb8a7d4478261326f76472cee2 100644 (file)
--- a/.topdeps
+++ b/.topdeps
@@ -1 +1,2 @@
-upstream
+fixes/destdir
+master
diff --git a/.topmsg b/.topmsg
index 337e37f98d54141d0d6d91b11090973b0f8b04ca..7db14ee2452b4cbcb16c90a6cda8dad1b2106004 100644 (file)
--- a/.topmsg
+++ b/.topmsg
@@ -1,7 +1,4 @@
 From: martin f. krafft <madduck@debian.org>
-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 <madduck@debian.org>
index b73a1f15b9c298e0e922df1c61f6fb15df8f7821..2777e1619515e24b35b49ad1aa01a5cf5f0ee254 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 prefix = $(HOME)
 bindir = $(prefix)/bin
 cmddir = $(prefix)/libexec/topgit
-sharedir = $(prefix)/share/topgit
+docdir = $(prefix)/share/doc/topgit
 hooksdir = $(cmddir)/hooks
 
 
@@ -19,7 +19,7 @@ tg $(commands_out) $(hooks_out): % : %.sh
        @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 b4933997e9a6fb484554257b4e2cf31c2dca924c..dcc08677939eb6b88da93c1291a4e80aa103e0d4 100644 (file)
--- a/tg.sh
+++ b/tg.sh
@@ -224,8 +224,8 @@ do_help()
 
                echo "TopGit v0.3 - A different patch queue manager"
                echo "Usage: tg [-r REMOTE] ($cmds|help) ..."
-       elif [ -r "@sharedir@/tg-$1.txt" ] ; then
-               cat "@sharedir@/tg-$1.txt"
+        elif [ -r "@docdir@/tg-$1.txt" ] ; then
+                cat "@docdir@/tg-$1.txt"
        else
                echo "`basename $0`: no help for $1" 1>&2
        fi