logapp (0.15-1) debian/locations.diff

Summary

 Makefile |   26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

    
download this patch

Patch contents

From: Kumar Appaiah <akumar@debian.org>
Subject: [PATCH] debian/locations

This patch fixes the Debian specific installation locations for
logapp.

Signed-off-by: Kumar Appaiah <akumar@debian.org>

---
 Makefile |   26 ++++++++++++--------------
 1 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile
index ada407d..bf71678 100644
--- a/Makefile
+++ b/Makefile
@@ -28,11 +28,9 @@ DEBUG_BUILD ?= 0
 
 # This defines which symlinks are created during the installation
 SYMLINKS = logmake logsvn logcvs
-
-# Installation directories are defined here
-PREFIX ?= /usr/local
-DESTDIR = $(PREFIX)/bin/
-MANDIR = $(PREFIX)/share/man/man1/
+PREFIX = $(DESTDIR)/usr/
+BINDESTDIR = $(PREFIX)bin/
+MANDIR = $(PREFIX)share/man/man1/
 
 # Tool definitions
 INSTALL = install -c
@@ -53,8 +51,8 @@ DEFS    = -DSVN_REVISION='"$(shell svnversion -cn . 2>/dev/null \
 	 -DEXECUTABLE='"$(TARGET)"' \
 	 -DCONFIG_SUPPORT_PTY="$(SUPPORT_PTY)" \
 	 -DCONFIG_USE_THREADS="$(USE_THREADS)"
- 
-CFLAGS = -Wall -Wextra $(DEFS)
+
+CFLAGS := $(CFLAGS) -Wall -Wextra $(DEFS)
 
 # Do not optimize code when creating a debug build
 ifeq ($(DEBUG_BUILD),1)
@@ -96,22 +94,22 @@ $(TARGET): $(OBJECTS)
 	$(LINK) $(LINKFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
 
 install: all install_links
-	$(INSTALL) -d $(DESTDIR)
-	$(INSTALL) $(TARGET) $(DESTDIR) 
-	$(INSTALL) -d $(MANDIR)
-	$(INSTALL) -m 644 $(MANPAGE) $(MANDIR) 
+	install -d $(BINDESTDIR)
+	install -t $(BINDESTDIR) $(TARGET)
+	install -d $(MANDIR)
+	install -m 644 -t $(MANDIR) $(MANPAGE)
 
 install_links:
-	for L in $(SYMLINKS); do ln -s -f $(TARGET) $(DESTDIR)$$L ; done
+	for L in $(SYMLINKS); do ln -s -f $(TARGET) $(BINDESTDIR)$$L ; done
 
 uninstall: deinstall
 
 deinstall: remove_links
-	rm -f $(DESTDIR)$(TARGET)
+	rm -f $(BINDESTDIR)$(TARGET)
 	rm -f $(MANDIR)$(MANPAGE)
 
 remove_links:
-	for L in $(SYMLINKS); do rm -f $(DESTDIR)$$L ; done
+	for L in $(SYMLINKS); do rm -f $(BINDESTDIR)$$L ; done
 
 clean:
 	rm -f *.o $(TARGET) $(DEPENDENCIES)
-- 
tg: (9f0216d..) debian/locations (depends on: master)