summaryrefslogtreecommitdiff
path: root/desktop/vwm/patches/paths.diff
blob: 486135ebffad747250a0b5bc2379ade641561a03 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
diff -Naur vwm.orig/Makefile vwm/Makefile
--- vwm.orig/Makefile	2009-10-20 15:57:55.000000000 -0400
+++ vwm/Makefile	2017-08-25 17:11:58.787940216 -0400
@@ -8,8 +8,8 @@
 headerdir = ${prefix}/include
 includedir = -I${headerdir} -I./
 bindir = ${prefix}/bin
-moddir = /usr/lib/vwm/modules
-moddir_wide = /usr/lib/vwm/modules_wide
+moddir = ${libdir}/vwm/modules
+moddir_wide = ${libdir}/vwm/modules_wide
 
 makefile: all
 
@@ -24,7 +24,7 @@
 	gcc $(CFLAGS) $(DEFS) $(WLIBS) $(PKG_CFG) $(includedir) -D_VIPER_WIDE *.c -o vwm_wide
 
 vwm:
-	gcc $(CFLAGS) $(DEFS) $(LIBS) $(PKG_CFG) $(includdir) *.c -o vwm
+	gcc $(CFLAGS) $(DEFS) $(LIBS) $(PKG_CFG) $(includedir) *.c -o vwm
 
 vwmterm:
 	cd modules/vwmterm3 && $(MAKE)
@@ -45,9 +45,10 @@
 	rm -f vwm_wide.h
 
 install:
-	mkdir -p $(moddir)
+	mkdir -p $(moddir) $(bindir) $(headerdir) $(libdir)
 	chmod 644 vwm.h
 	cp -f vwm.h $(headerdir)
+	strip vwm
 	chmod 755 vwm
 	cp -f vwm $(bindir)
 	cd modules/vwmterm3 && $(MAKE) install
diff -Naur vwm.orig/modules/sysmon/Makefile vwm/modules/sysmon/Makefile
--- vwm.orig/modules/sysmon/Makefile	2009-06-23 14:41:32.000000000 -0400
+++ vwm/modules/sysmon/Makefile	2017-08-25 17:12:41.742937932 -0400
@@ -4,8 +4,8 @@
 libdir = ${prefix}/lib
 includedir = ${prefix}/include -I../..
 bindir = ${prefix}/bin
-moddir = /usr/lib/vwm/modules
-moddir_wide = /usr/lib/vwm/modules_wide
+moddir = ${libdir}/vwm/modules
+moddir_wide = ${libdir}/vwm/modules_wide
 
 makefile: all
 
diff -Naur vwm.orig/modules/vwmterm3/Makefile vwm/modules/vwmterm3/Makefile
--- vwm.orig/modules/vwmterm3/Makefile	2009-10-20 16:02:05.000000000 -0400
+++ vwm/modules/vwmterm3/Makefile	2017-08-25 17:11:25.953941962 -0400
@@ -2,11 +2,11 @@
 PKG_CFG = `pkg-config --cflags glib-2.0 gmodule-2.0`
 DEFS = -D_REENTRANT -D_GNU_SOURCE
 prefix = /usr/local
-libdir = ${prefix}/lib
+libdir = ${prefix}/lib${arch}
 includedir = -I${prefix}/include -I../..
 bindir = ${prefix}/bin
-moddir = /usr/lib/vwm/modules
-moddir_wide = /usr/lib/vwm/modules_wide
+moddir = ${libdir}/vwm/modules
+moddir_wide = ${libdir}/vwm/modules_wide
 
 makefile: all
 
diff -Naur vwm.orig/vwm.h vwm/vwm.h
--- vwm.orig/vwm.h	2009-11-04 17:10:01.000000000 -0500
+++ vwm/vwm.h	2017-08-25 17:16:32.528925658 -0400
@@ -22,11 +22,17 @@
 #define _VWM_SCREENSAVER_TIMEOUT 5
 #endif
 
+#ifdef __amd64__
+#define LIBDIRSUFFIX "64"
+#else
+#define LIBDIRSUFFIX ""
+#endif
+
 #ifndef _VWM_SHARED_MODULES
 #ifdef _VIPER_WIDE
-#define _VWM_SHARED_MODULES      "/usr/lib/vwm/modules_wide/"
+#define _VWM_SHARED_MODULES      "/usr/lib" LIBDIRSUFFIX "/vwm/modules_wide/"
 #else
-#define _VWM_SHARED_MODULES      "/usr/lib/vwm/modules/"
+#define _VWM_SHARED_MODULES      "/usr/lib" LIBDIRSUFFIX "/vwm/modules/"
 #endif
 #endif