File mingw64-tls.spec of Package mingw64-tls

#
# spec file for package mingw64-tls
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

%define majorver1 1
%define majorver2 6
%define majorver %{majorver1}.%{majorver2}
%define vers %{majorver}.7

%define name1 tls

Name:		mingw64-%{name1}
Summary:	Tcl Binding for the OpenSSL Library
License:	BSD-3-Clause
Group:		Development/Libraries/Tcl
Version:	%{vers}
Release:	0
Url:		http://tls.sourceforge.net
Source0:	%name1%version-src.tar.gz
Patch0:		dllexport.patch
Patch1:		dllsuffix.patch

BuildRoot:	%{_tmppath}/%{name}-%{version}-build

BuildArch:	noarch
#!BuildIgnore: post-build-checks

BuildRequires:	autoconf
BuildRequires:	file
BuildRequires:	m4
BuildRequires:	mingw64-cross-binutils
BuildRequires:	mingw64-cross-gcc
BuildRequires:	mingw64-filesystem >= 23
BuildRequires:	mingw64-tcl
BuildRequires:	net-tools

BuildRequires:	mingw64-libopenssl-devel
BuildRequires:	mingw64-tcl-devel

%_mingw64_package_header_debug

%description
This extension provides a generic binding for Tcl to OpenSSL, utilizing
the new Tcl_StackChannel API for Tcl 8.2 and higher. The sockets behave
exactly the same as channels created using Tcl's built-in socket
command with additional options for controlling the SSL session.

Authors:
--------
    Matt Newman <matt@novadigm.com>
    Jeff Hobbs <jeff@hobbs.org>

%_mingw64_debug_package

%prep
%setup -q -n %{name1}%{version}
%patch0 -p1
%patch1 -p1

%build
autoconf
%{_mingw64_configure} \
	--libdir=%_mingw64_libdir \
    --prefix=%_mingw64_prefix \
	--with-ssl-dir=%_mingw64_prefix \
	--with-tcl=%_mingw64_libdir
make %{?_smp_mflags}

%check
# Disable for now, because changed defaults in openssl make it fail
#exit 0
cat > known-failures <<EOF
ciphers-1.4
ciphers-1.3
tls-bug58-1.0
EOF
make test 2>&1 | tee testresults
grep FAILED testresults | grep -Fqvf known-failures && exit 1

%install
make install \
	DESTDIR=%buildroot \
	PKG_HEADERS= \
	libdir=%_mingw64_libdir/tcl

%clean
rm -rf %buildroot

%files
%defattr(-,root,root,-)
%doc ChangeLog README.txt license.terms tls.htm
%_mingw64_libdir/tcl

%changelog
openSUSE Build Service is sponsored by