Package: sosi2osm / 1.0.0-5

02_fix_install.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: Ruben Undheim <ruben.undheim@gmail.com>
Date: Sat, 22 Sep 2018 15:40:00 +0200
Subject: This patch fixes the DESTDIR target

===================================================================
---
 Makefile | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index bc6a32c..e2df03e 100644
--- a/Makefile
+++ b/Makefile
@@ -13,14 +13,15 @@ $(PROGNAME): $(OBJFILES)
 	$(CXX) $^ $(LDFLAGS) -o $@
 
 install: sosi2osm
-	install -m 0755 sosi2osm /usr/local/bin
-	mkdir -p /usr/local/share/sosi2osm/lua
-	install -m 0644 lua/*.lua /usr/local/share/sosi2osm/lua
+	mkdir -p $(DESTDIR)/usr/bin
+	install -m 0755 sosi2osm $(DESTDIR)/usr/bin
+	mkdir -p $(DESTDIR)/usr/share/sosi2osm/lua
+	install -m 0644 lua/*.lua $(DESTDIR)/usr/share/sosi2osm/lua
 
 uninstall:
-	rm /usr/local/share/sosi2osm/lua/*.lua
-	rmdir /usr/local/share/sosi2osm/lua
-	rmdir /usr/local/share/sosi2osm
-	rm /usr/local/bin/sosi2osm
+	rm $(DESTDIR)/usr/share/sosi2osm/lua/*.lua
+	rmdir $(DESTDIR)/usr/share/sosi2osm/lua
+	rmdir $(DESTDIR)/usr/share/sosi2osm
+	rm $(DESTDIR)/usr/bin/sosi2osm
 
 .PHONY: install uninstall clean all