summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-11-15 13:37:47 +0000
committerChristian Pointner <equinox@anytun.org>2009-11-15 13:37:47 +0000
commit3c8923bf83975c179d4f5bcec3203d8b1a4cf873 (patch)
tree95ef40b5054814ccb7308c9e3ccb937b181c2c7b /src
parentconfigure script update (diff)
no in-place sed at make install
Diffstat (limited to 'src')
-rw-r--r--src/Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Makefile b/src/Makefile
index 911de28..6efbe7b 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -111,7 +111,7 @@ else
INSTALL_TARGETS := install-bin install-etc install-man
REMOVE_TARGETS :=
endif
-
+
install: all $(INSTALL_TARGETS)
install-bin: $(EXECUTABLE)
@@ -122,9 +122,10 @@ install-etc:
$(INSTALL) -d $(DESTDIR)$(ETCDIR)/$(EXECUTABLE)
@ echo "example configurations can be found at $(EXAMPLESDIR)/$(EXECUTABLE)" > $(DESTDIR)$(ETCDIR)/$(EXECUTABLE)/README
$(INSTALL) -d $(DESTDIR)$(ETCDIR)/init.d
- $(INSTALL) -m 755 ../etc/init.d/uanytun $(DESTDIR)$(ETCDIR)/init.d/$(EXECUTABLE)
- @ sed -i 's#DAEMON=/usr/sbin/uanytun#DAEMON=$(SBINDIR)/$(EXECUTABLE)#' $(DESTDIR)$(ETCDIR)/init.d/$(EXECUTABLE)
- @ sed -i 's#CONFIG_DIR=/etc/uanytun#CONFIG_DIR=$(ETCDIR)/uanytun#' $(DESTDIR)$(ETCDIR)/init.d/$(EXECUTABLE)
+ @ sed -e 's#DAEMON=/usr/sbin/uanytun#DAEMON=$(SBINDIR)/$(EXECUTABLE)#' \
+ -e 's#CONFIG_DIR=/etc/uanytun#CONFIG_DIR=$(ETCDIR)/uanytun#' ../etc/init.d/uanytun > ../etc/init.d/uanytun.bak
+ $(INSTALL) -m 755 ../etc/init.d/uanytun.bak $(DESTDIR)$(ETCDIR)/init.d/$(EXECUTABLE)
+ rm -f ../etc/init.d/uanytun.bak
install-examples:
$(INSTALL) -d $(DESTDIR)$(EXAMPLESDIR)/$(EXECUTABLE)