From fe27d2bfc2eb5bf7f761b22bba9420c1799da2f4 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Mon, 17 Aug 2020 09:38:53 +0200 Subject: [PATCH] Fixed debian dependency --- packages/debian/configure | 32 +++++++++++++--------------- packages/debian/configure.in | 8 +++++++ packages/debian/debian/control.in | 2 +- packages/debian/debian/n2n.substvars | 1 - 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/packages/debian/configure b/packages/debian/configure index f5333e2..c7ceac1 100755 --- a/packages/debian/configure +++ b/packages/debian/configure @@ -583,10 +583,11 @@ PACKAGE_URL='' ac_subst_vars='LTLIBOBJS LIBOBJS -N2N_VERSION_SHORT -GIT_COMMITS +EXTRA_DEP DATE EXTN +GIT_COMMITS +N2N_VERSION_SHORT MACHINE APP target_alias @@ -608,7 +609,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -673,7 +673,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -926,15 +925,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1072,7 +1062,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1225,7 +1215,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1680,9 +1669,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +# NOTE: this file is not actually used. You need to edit configure as well! +N2N_VERSION_SHORT=`grep N2N_VERSION_SHORT ../../Makefile | head -1| cut -d "=" -f 2` +GIT_COMMITS=`grep GIT_COMMITS ../../Makefile | head -1| cut -d "=" -f 2` + MACHINE=`uname -m` SHORT_MACHINE=`uname -m | cut -b1-3` +DEBIAN_VERSION=`cat /etc/debian_version | grep "^8" | wc -l` + +EXTRA_DEP="" +if test $DEBIAN_VERSION = "0"; then +EXTRA_DEP=", libzstd1" +fi + if test $MACHINE = "x86_64"; then EXTN="amd64" else @@ -1705,8 +1705,6 @@ else fi APP=n2n -N2N_VERSION_SHORT=`grep N2N_VERSION_SHORT ../../Makefile | head -1| cut -d "=" -f 2` -GIT_COMMITS=`grep GIT_COMMITS ../../Makefile | head -1| cut -d "=" -f 2` DATE=`date -R` diff --git a/packages/debian/configure.in b/packages/debian/configure.in index fe86b74..1f876c0 100644 --- a/packages/debian/configure.in +++ b/packages/debian/configure.in @@ -7,6 +7,13 @@ GIT_COMMITS=`grep GIT_COMMITS ../../Makefile | head -1| cut -d "=" -f 2` MACHINE=`uname -m` SHORT_MACHINE=`uname -m | cut -b1-3` +DEBIAN_VERSION=`cat /etc/debian_version | grep "^8" | wc -l` + +EXTRA_DEP="" +if test $DEBIAN_VERSION = "0"; then +EXTRA_DEP=", libzstd1" +fi + if test $MACHINE = "x86_64"; then EXTN="amd64" else @@ -37,6 +44,7 @@ AC_SUBST(N2N_VERSION_SHORT) AC_SUBST(GIT_COMMITS) AC_SUBST(EXTN) AC_SUBST(DATE) +AC_SUBST(EXTRA_DEP) AC_CONFIG_FILES(debian/changelog) AC_CONFIG_FILES(debian/files) diff --git a/packages/debian/debian/control.in b/packages/debian/debian/control.in index 45e7740..9fe4aad 100644 --- a/packages/debian/debian/control.in +++ b/packages/debian/debian/control.in @@ -8,7 +8,7 @@ Build-Depends: Package: n2n Architecture: @EXTN@ Suggests: uml-utilities -Depends: ${shlibs:Depends}, ${misc:Depends}, libzstd1 +Depends: ${shlibs:Depends}, ${misc:Depends} @EXTRA_DEP@ Conflicts: n2n (<< 2.1.0-1) Replaces: n2n (<< 2.1.0-1) Description: a layer-two peer-to-peer virtual private network (VPN) diff --git a/packages/debian/debian/n2n.substvars b/packages/debian/debian/n2n.substvars index a595723..a8fe3cf 100644 --- a/packages/debian/debian/n2n.substvars +++ b/packages/debian/debian/n2n.substvars @@ -1,2 +1 @@ misc:Depends=debconf (>= 0.5) | debconf-2.0 -misc:Pre-Depends=