summarylogtreecommitdiffstats
path: root/0001-PKGBUILD-compat.patch
blob: d51370d6319cd00b97180cd2825b649154887b1d (plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--- a/GNUmakefile	2016-02-29 13:33:22.915518271 +0100
+++ b/GNUmakefile	2016-02-29 13:47:39.938826378 +0100
@@ -1,4 +1,5 @@
 PREFIX = /usr/local
+REALPREFIX = /usr/local
 LIBDIR = lib/imunes
 IMUNESDIR = $(PREFIX)/$(LIBDIR)
 CONFIGDIR = $(IMUNESDIR)/config
@@ -12,6 +13,7 @@
 SMALL_ICONSDIR = $(ICONSDIR)/small
 TINY_ICONSDIR = $(ICONSDIR)/tiny
 BINDIR = $(PREFIX)/bin
+REALBINDIR = $(REALPREFIX)/bin
 IMUNESDATE = `date +"%Y%m%d"`
 IMUNESVER = 1.0
 TARBALL_DIR = imunes_$(IMUNESDATE)
@@ -50,21 +52,21 @@
 
 all: install
 
-install: uninstall netgraph
+install: netgraph
 	mkdir -p $(IMUNESDIR)
 	cp $(BASEFILES) $(IMUNESDIR)
 	ROOTDIR=$(PREFIX) sh scripts/update_version.sh
 	mkdir -p $(BINDIR)
 
 	sed -e "s,set LIBDIR \"\",set LIBDIR $(LIBDIR)," \
-	    -e "s,set ROOTDIR \".\",set ROOTDIR $(PREFIX)," \
+	    -e "s,set ROOTDIR \".\",set ROOTDIR $(REALPREFIX)," \
 	    imunes.tcl > $(IMUNESDIR)/imunes.tcl
 
 	cp helpers.tcl $(IMUNESDIR)
 
 	sed -e "s,LIBDIR=\"\",LIBDIR=$(LIBDIR)," \
-	    -e "s,ROOTDIR=\".\",ROOTDIR=$(PREFIX)," \
-	    -e "s,BINDIR=\".\",BINDIR=$(BINDIR)," \
+	    -e "s,ROOTDIR=\".\",ROOTDIR=$(REALPREFIX)," \
+	    -e "s,BINDIR=\".\",BINDIR=$(REALBINDIR)," \
 	    imunes > $(BINDIR)/imunes
 	chmod 755 $(BINDIR)/imunes
 
@@ -85,7 +87,7 @@
 
 	for file in $(VROOT); do \
 	    sed -e "s,LIBDIR=\"\",LIBDIR=$(LIBDIR)," \
-		-e "s,ROOTDIR=\".\",ROOTDIR=$(PREFIX)," \
+		-e "s,ROOTDIR=\".\",ROOTDIR=$(REALPREFIX)," \
 		$${file} > $(IMUNESDIR)/$${file}; \
 	    chmod 755 $(IMUNESDIR)/$${file}; \
 	done ;