From 9024658821a1a68060f7d4d58105284744adc124 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Sun, 10 Jun 2018 12:11:23 +0500 Subject: [PATCH] fix debian builds issue described: https://github.com/SoftEtherVPN/SoftEtherVPN/issues/550 --- configure | 7 ++++++- debian/rules | 8 +++++--- debian/softether-vpnbridge.install | 2 +- debian/softether-vpnclient.install | 2 +- debian/softether-vpncmd.install | 2 +- debian/softether-vpnserver.install | 2 +- 6 files changed, 15 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 6ec85ab1..7927680d 100755 --- a/configure +++ b/configure @@ -21,7 +21,12 @@ if [ ! -d "tmp" ]; then mkdir tmp fi -(cd tmp && cmake .. || exit 1) +if [ ! -z ${CMAKE_INSTALL_PREFIX+x} ]; then + CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}" +fi + +(cd tmp && cmake ${CMAKE_FLAGS} .. || exit 1) + echo "" diff --git a/debian/rules b/debian/rules index 2233f002..81817926 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,7 @@ #!/usr/bin/make -f export DH_VERBOSE=1 +export CMAKE_INSTALL_PREFIX=`pwd`/../../usr CFLAGS := $(shell dpkg-buildflags --get CFLAGS) LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) @@ -9,13 +10,14 @@ LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) override_dh_auto_configure: configure_config +override_dh_auto_make: + make -C tmp + override_dh_auto_clean: rm -fr Makefile* usr bin tmp src/bin/BuiltHamcoreFiles override_dh_auto_install: - patch -f < debian/makefile.patch - mkdir -p usr/bin - make install + make -C tmp install configure_config: if [ $(shell uname -m) = 'x86_64' ]; then echo -e "1\n2\n" | ./configure; fi diff --git a/debian/softether-vpnbridge.install b/debian/softether-vpnbridge.install index 8ee02007..a532f520 100755 --- a/debian/softether-vpnbridge.install +++ b/debian/softether-vpnbridge.install @@ -1,3 +1,3 @@ #! /usr/bin/dh-exec debian/bin/vpnbridge usr/bin/ -usr/vpnbridge opt/ +usr/bin/vpnbridge opt/ diff --git a/debian/softether-vpnclient.install b/debian/softether-vpnclient.install index 1c22e42a..0719b760 100755 --- a/debian/softether-vpnclient.install +++ b/debian/softether-vpnclient.install @@ -1,3 +1,3 @@ #! /usr/bin/dh-exec debian/bin/vpnclient usr/bin/ -usr/vpnclient opt/ +usr/bin/vpnclient opt/ diff --git a/debian/softether-vpncmd.install b/debian/softether-vpncmd.install index e6fd6680..69f42646 100755 --- a/debian/softether-vpncmd.install +++ b/debian/softether-vpncmd.install @@ -1,3 +1,3 @@ #! /usr/bin/dh-exec debian/bin/vpncmd usr/bin/ -usr/vpncmd opt/ +usr/bin/vpncmd opt/ diff --git a/debian/softether-vpnserver.install b/debian/softether-vpnserver.install index 98d5d438..5d07b1f7 100755 --- a/debian/softether-vpnserver.install +++ b/debian/softether-vpnserver.install @@ -1,3 +1,3 @@ #! /usr/bin/dh-exec debian/bin/vpnserver usr/bin/ -usr/vpnserver opt/ +usr/bin/vpnserver opt/