]> git.pld-linux.org Git - packages/dropbear.git/commitdiff
use system libtommath/libtomcrypt bcond
authorElan Ruusamäe <glen@delfi.ee>
Sun, 25 Jan 2015 17:05:39 +0000 (19:05 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Sun, 25 Jan 2015 17:05:57 +0000 (19:05 +0200)
disabled due linking errors when enabled

dropbear.spec
system-libtom.patch [new file with mode: 0644]

index c5080763a5e8334b84a2375ca1577ad4732da21a..8da5812ece3362cd2ee4e8c556ceffca70d9bbfe 100644 (file)
@@ -3,6 +3,7 @@
 #
 # Conditional build:
 %bcond_with    pam             # PAM authentication support
+%bcond_with    system_libtom   # use system libtommath/libtomcrypt
 
 Summary:       Dropbear - a smallish ssh2 server
 Summary(pl.UTF-8):     Dropbear - mały serwer ssh2
@@ -13,9 +14,12 @@ License:     MIT
 Group:         Applications/Networking
 Source0:       https://matt.ucc.asn.au/dropbear/releases/%{name}-%{version}.tar.bz2
 # Source0-md5: c21a01111aa5015db038c6efdb85717d
+Patch0:                system-libtom.patch
 URL:           https://matt.ucc.asn.au/dropbear/dropbear.html
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
+%{?with_system_libtom:BuildRequires:   libtomcrypt-devel}
+%{?with_system_libtom:BuildRequires:   libtommath-devel}
 %{?with_pam:BuildRequires:     pam-devel}
 BuildRequires: zlib-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -39,12 +43,17 @@ trzeba go porządnie przetestować :)
 
 %prep
 %setup -q
+%patch0 -p1
+
+%{?with_system_libtom:rm -r libtomcrypt libtommath}
 
 %build
 %{__aclocal}
 %{__autoconf}
 %{__autoheader}
 %configure \
+       %{?with_system_libtom:--disable-bundled-libtom} \
+       %{__enable_disable_not system_libtom bundled-libtom} \
        %{?with_pam:--enable-pam}
 %{__make}
 
diff --git a/system-libtom.patch b/system-libtom.patch
new file mode 100644 (file)
index 0000000..60e36b4
--- /dev/null
@@ -0,0 +1,22 @@
+--- dropbear-2014.66/configure.ac~     2014-10-23 16:43:38.000000000 +0300
++++ dropbear-2014.66/configure.ac      2015-01-25 19:00:39.840166231 +0200
+@@ -660,6 +660,7 @@
+ AC_EXEEXT
+ # XXX there must be a nicer way to do this
++if test $BUNDLED_LIBTOM = 1 ; then
+ AS_MKDIR_P(libtomcrypt/src/ciphers/aes)
+ AS_MKDIR_P(libtomcrypt/src/ciphers/safer)
+ AS_MKDIR_P(libtomcrypt/src/ciphers/twofish)
+@@ -710,8 +711,10 @@
+ AS_MKDIR_P(libtomcrypt/src/pk/pkcs1)
+ AS_MKDIR_P(libtomcrypt/src/pk/rsa)
+ AS_MKDIR_P(libtomcrypt/src/prngs)
++LIBTOM_FILES="libtomcrypt/Makefile libtommath/Makefile"
++fi
+ AC_CONFIG_HEADER(config.h)
+-AC_CONFIG_FILES(Makefile libtomcrypt/Makefile libtommath/Makefile)
++AC_CONFIG_FILES(Makefile $LIBTOM_FILES)
+ AC_OUTPUT
+ AC_MSG_NOTICE()
This page took 0.103081 seconds and 4 git commands to generate.