aboutsummaryrefslogtreecommitdiffstats
path: root/net/olsrd/files/patch-Makefile
blob: d8fa664045ebc2fee021097bb2ee118b7b0390d2 (plain) (blame)
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
--- Makefile.orig   2014-06-02 12:15:27.000000000 +0200
+++ Makefile    2014-06-07 21:42:39.688352979 +0200
@@ -128,15 +128,15 @@
 uninstall: uninstall_olsrd
 
 install_bin:
-       mkdir -p $(SBINDIR)
-       install -m 755 $(EXENAME) $(SBINDIR)
-       $(STRIP) $(SBINDIR)/$(EXENAME)
+       mkdir -p ${STAGEDIR}$(SBINDIR)
+       install -m 755 $(EXENAME) ${STAGEDIR}$(SBINDIR)
+       $(STRIP) ${STAGEDIR}$(SBINDIR)/$(EXENAME)
 ifeq ($(SGW_SUPPORT),1)
-       $(MAKECMDPREFIX)if [ -e $(SBINDIR)/$(SGW_POLICY_SCRIPT) ]; then \
-           cp -f files/$(SGW_POLICY_SCRIPT) $(SBINDIR)/$(SGW_POLICY_SCRIPT).new; \
-           echo "Policy routing script was saved as $(SBINDIR)/$(SGW_POLICY_SCRIPT).new"; \
+       $(MAKECMDPREFIX)if [ -e ${STAGEDIR}$(SBINDIR)/$(SGW_POLICY_SCRIPT) ]; then \
+           cp -f files/$(SGW_POLICY_SCRIPT) ${STAGEDIR}$(SBINDIR)/$(SGW_POLICY_SCRIPT).new; \
+           echo "Policy routing script was saved as ${STAGEDIR}$(SBINDIR)/$(SGW_POLICY_SCRIPT).new"; \
        else \
-           cp -f files/$(SGW_POLICY_SCRIPT) $(SBINDIR)/$(SGW_POLICY_SCRIPT); \
+           cp -f files/$(SGW_POLICY_SCRIPT) ${STAGEDIR}$(SBINDIR)/$(SGW_POLICY_SCRIPT); \
        fi
 endif
 
@@ -147,29 +147,26 @@
 install_olsrd: install_bin
        @echo ========= C O N F I G U R A T I O N - F I L E ============
        @echo $(EXENAME) uses the configfile $(CFGFILE)
-       @echo a default configfile. A sample RFC-compliance aimed
-       @echo configfile can be found in olsrd.conf.default.rfc.
-       @echo However none of the larger OLSRD using networks use that
-       @echo so install a configfile with activated link quality exstensions
-       @echo per default.
-       @echo can be found at files/olsrd.conf.default.lq
+       @echo a default configfile. Sample config files are installed
+       @echo as $(CFGFILE).default.full, $(CFGFILE).default.rfc,
+       @echo $(CFGFILE).default.lq and $(CFGFILE).default.lq-fisheye
+       @echo copy and edit one of these to $(CFGFILE)
+       @echo If in doubt start with $(CFGFILE).default.lq
        @echo ==========================================================
-       mkdir -p $(ETCDIR)
-       $(MAKECMDPREFIX)if [ -e $(CFGFILE) ]; then \
-           cp -f files/olsrd.conf.default.lq $(CFGFILE).new; \
-           echo "Configuration file was saved as $(CFGFILE).new"; \
-       else \
-           cp -f files/olsrd.conf.default.lq $(CFGFILE); \
-       fi
+       mkdir -p ${STAGEDIR}$(ETCDIR)
+       -cp files/olsrd.conf.default.full ${STAGEDIR}$(CFGFILE).default.full
+       -cp files/olsrd.conf.default.rfc ${STAGEDIR}$(CFGFILE).default.rfc
+       -cp files/olsrd.conf.default.lq ${STAGEDIR}$(CFGFILE).default.lq
+       -cp files/olsrd.conf.default.lq-fisheye ${STAGEDIR}$(CFGFILE).default.lq-fisheye
        @echo -------------------------------------------
        @echo Edit $(CFGFILE) before running olsrd!!
        @echo -------------------------------------------
        @echo Installing manpages $(EXENAME)\(8\) and $(CFGNAME)\(5\)
 ifneq ($(MANDIR),)
-       mkdir -p $(MANDIR)/man8/
-       cp files/olsrd.8.gz $(MANDIR)/man8/$(EXENAME).8.gz
-       mkdir -p $(MANDIR)/man5/
-       cp files/olsrd.conf.5.gz $(MANDIR)/man5/$(CFGNAME).5.gz
+       mkdir -p ${STAGEDIR}$(MANDIR)/man8/
+       cp files/olsrd.8.gz ${STAGEDIR}$(MANDIR)/man8/$(EXENAME).8.gz
+       mkdir -p ${STAGEDIR}$(MANDIR)/man5/
+       cp files/olsrd.conf.5.gz ${STAGEDIR}$(MANDIR)/man5/$(CFGNAME).5.gz
 endif
 
 uninstall_olsrd:   uninstall_bin
@@ -217,7 +214,7 @@
        -for dir in $(SUBDIRS);do $(MAKECMD) -C lib/$$dir LIBDIR=$(LIBDIR) clean;rm -f lib/$$dir/*.so lib/$$dir/*.dll;done
 
 libs_install install_libs:
-       $(MAKECMDPREFIX)set -e;for dir in $(SUBDIRS);do $(MAKECMD) -C lib/$$dir LIBDIR=$(LIBDIR) install;done
+       $(MAKECMDPREFIX)set -e;for dir in $(SUBDIRS);do $(MAKECMD) -C lib/$$dir LIBDIR=${STAGEDIR}$(LIBDIR) install;done
 
 libs_uninstall uninstall_libs:
        $(MAKECMDPREFIX)set -e;for dir in $(SUBDIRS);do $(MAKECMD) -C lib/$$dir LIBDIR=$(LIBDIR) uninstall;done