summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2016-07-08 00:17:10 +0200
committerChristian Pointner <equinox@anytun.org>2016-07-08 00:17:10 +0200
commite88a0d5fcbb8bad848080716b96d3a5cf72fb62f (patch)
tree48c8a292c2e01cbd584445dca0235a58d4faf1df /src
parentadded --username to systemd unit files (diff)
moved anytun-lanucher to /lib
Diffstat (limited to 'src')
-rw-r--r--src/Makefile12
-rwxr-xr-xsrc/configure10
2 files changed, 16 insertions, 6 deletions
diff --git a/src/Makefile b/src/Makefile
index 3304041..506dffa 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -295,23 +295,23 @@ install-bin: $(EXECUTABLES)
$(INSTALL) -m 755 anytun-controld $(DESTDIR)$(BINDIR)
$(INSTALL) -m 755 anytun-showtables $(DESTDIR)$(BINDIR)
@ sed -e 's#/usr/local/sbin#$(SBINDIR)#' -e 's#/usr/local/bin#$(BINDIR)#' \
- -e 's#/usr/local/etc#$(ETCDIR)#' ../usr/bin/anytun-launcher.sh > ../usr/bin/anytun-launcher.sh.bak
- $(INSTALL) -m 755 ../usr/bin/anytun-launcher.sh.bak $(DESTDIR)$(BINDIR)/anytun-launcher.sh
- rm -f ../usr/bin/anytun-launcher.sh.bak
+ -e 's#/usr/local/etc#$(ETCDIR)#' ../usr/lib/anytun-launcher > ../usr/lib/anytun-launcher.bak
+ $(INSTALL) -m 755 ../usr/lib/anytun-launcher.bak $(DESTDIR)$(BINDIR)/anytun-launcher
+ rm -f ../usr/lib/anytun-launcher.bak
install-etc:
$(INSTALL) -d $(DESTDIR)$(ETCDIR)/anytun
@ echo "example configurations can be found at $(EXAMPLESDIR)/anytun" > $(DESTDIR)$(ETCDIR)/anytun/README
$(INSTALL) -d $(DESTDIR)$(ETCDIR)/init.d
- @ sed -e 's#/usr/local/bin#$(BINDIR)#' -e 's#/usr/local/etc#$(ETCDIR)#' ../etc/init.d/anytun > ../etc/init.d/anytun.bak
+ @ sed -e 's#/usr/local/bin#$(BINDIR)#' -e 's#/usr/local/lib#$(LIBDIR)#' -e 's#/usr/local/etc#$(ETCDIR)#' ../etc/init.d/anytun > ../etc/init.d/anytun.bak
$(INSTALL) -m 755 ../etc/init.d/anytun.bak $(DESTDIR)$(ETCDIR)/init.d/anytun
rm -f ../etc/init.d/anytun.bak
install-systemd:
$(INSTALL) -d $(DESTDIR)$(SYSTEMDDIR)
$(INSTALL) -d $(DESTDIR)$(TMPFILESDDIR)
- @ sed -e 's#/usr/local/bin/#$(BINDIR)/#' ../usr/lib/systemd/system/anytun@.service > ../usr/lib/systemd/system/anytun@.service.bak
- @ sed -e 's#/usr/local/bin/#$(BINDIR)/#' ../usr/lib/systemd/system/anytun-control@.service > ../usr/lib/systemd/system/anytun-control@.service.bak
+ @ sed -e 's#/usr/local/lib/#$(LIBDIR)/#' ../usr/lib/systemd/system/anytun@.service > ../usr/lib/systemd/system/anytun@.service.bak
+ @ sed -e 's#/usr/local/lib/#$(LIBDIR)/#' ../usr/lib/systemd/system/anytun-control@.service > ../usr/lib/systemd/system/anytun-control@.service.bak
$(INSTALL) -m 644 ../usr/lib/systemd/system/anytun@.service.bak $(DESTDIR)$(SYSTEMDDIR)/anytun@.service
$(INSTALL) -m 644 ../usr/lib/systemd/system/anytun-control@.service.bak $(DESTDIR)$(SYSTEMDDIR)/anytun-control@.service
$(INSTALL) -m 644 ../usr/lib/tmpfiles.d/anytun.conf $(DESTDIR)$(TMPFILESDDIR)/anytun.conf
diff --git a/src/configure b/src/configure
index 0ba56b5..203a68c 100755
--- a/src/configure
+++ b/src/configure
@@ -59,6 +59,7 @@ ROUTING=1
PREFIX='/usr/local'
BINDIR=''
SBINDIR=''
+LIBDIR=''
ETCDIR=''
MANDIR=''
INSTALLMANPAGE=1
@@ -79,6 +80,7 @@ print_usage() {
echo " --prefix=<PREFIX> the installation prefix (default: /usr/local)"
echo " --bindir=<DIR> the path to the bin directory (default: $PREFIX/bin)"
echo " --sbindir=<DIR> the path to the sbin directory (default: $PREFIX/sbin)"
+ echo " --libdir=<DIR> the path to the lib directory (default: $PREFIX/lib)"
echo " --sysconfdir=<DIR> the path to the system configuration directory (default: $PREFIX/etc"
echo " --mandir=<DIR> the path to the system man pages (default: $PREFIX/share/man)"
echo " --no-manpage don't install manpages"
@@ -121,6 +123,9 @@ do
--sbindir=*)
SBINDIR=${arg#--sbindir=}
;;
+ --libdir=*)
+ LIBDIR=${arg#--libdir=}
+ ;;
--sysconfdir=*)
ETCDIR=${arg#--sysconfdir=}
;;
@@ -325,6 +330,10 @@ if [ -z "$SBINDIR" ]; then
SBINDIR=$PREFIX/sbin
fi
+if [ -z "$LIBDIR" ]; then
+ LIBDIR=$PREFIX/lib
+fi
+
if [ -z "$ETCDIR" ]; then
ETCDIR=$PREFIX/etc
fi
@@ -362,6 +371,7 @@ INSTALL = install
prefix := $PREFIX
BINDIR := $BINDIR
SBINDIR := $SBINDIR
+LIBDIR := $LIBDIR
ETCDIR := $ETCDIR
EOF