libssh/libssh.spec

156 lines
4.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package libssh
#
# 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/
#
Name: libssh
Version: 0.7.5
Release: 0
Summary: The SSH library
License: LGPL-2.1+
Group: Development/Libraries/C and C++
Url: https://www.libssh.org
# Dynamic number: https://red.libssh.org/projects/libssh/files
Source0: https://red.libssh.org/attachments/download/218/%{name}-%{version}.tar.xz
Source1: https://red.libssh.org/attachments/download/217/%{name}-%{version}.tar.asc
Source2: https://cryptomilk.org/0xCC014E3D-asn@cryptomilk.org-gpg_key.asc#/%{name}.keyring
Source99: baselibs.conf
# PATCH-FIX-UPSTREAM Upstream patches for OpenSSL 1.1 compatibility (will appear in 0.8 release)
Patch0: 0001-libcrypto-Remove-AES_ctr128_encrypt.patch
Patch1: 0001-libcrypto-Introduce-a-libcrypto-compat-file.patch
Patch2: 0001-libcrypto-Use-newer-API-for-HMAC.patch
Patch3: 0001-libcrypto-Use-a-pointer-for-EVP_MD_CTX.patch
Patch4: 0001-libcrypto-Use-a-pointer-for-EVP_CIPHER_CTX.patch
Patch5: 0001-pki_crypto-Use-getters-and-setters-for-opaque-keys-a.patch
Patch6: 0001-threads-Use-new-API-call-for-OpenSSL-CRYPTO-THREADID.patch
Patch7: 0001-cmake-Use-configure-check-for-CRYPTO_ctr128_encrypt.patch
# END of OpenSSL 1.1 support patches
# PATCH-FIX-UPSTREAM Fix parsing of config files (boo#1067782)
Patch10: 0001-config-Bugfix-Dont-skip-unseen-opcodes.patch
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: krb5-devel
BuildRequires: libcmocka-devel
BuildRequires: openssl-devel
BuildRequires: pkgconfig
BuildRequires: xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
An SSH implementation in the form of a library. With libssh, you can
remotely execute programs, transfer files, use a secure and
transparent tunnel for your remote programs. It supports SFTP as
well.
This package provides libssh from http://www.libssh.org that should not
be confused with libssh2 available from http://www.libssh2.org (libssh2
package)
%package -n libssh4
Summary: SSH library
Group: System/Libraries
%description -n libssh4
An SSH implementation in the form of a library. With libssh, you can
remotely execute programs, transfer files, use a secure and
transparent tunnel for your remote programs. It supports SFTP as
well.
This package provides libssh from http://www.libssh.org that should not
be confused with libssh2 available from http://www.libssh2.org (libssh2
package)
%package devel
Summary: SSH library development headers
Group: Development/Libraries/C and C++
Requires: cmake
Requires: libssh4 = %{version}
%description devel
Development headers for the SSH library.
%package devel-doc
Summary: SSH library API documentation
Group: Documentation/HTML
%description devel-doc
Documentation for libssh development.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch10 -p1
%build
%cmake \
-DCMAKE_C_FLAGS:STRING="%{optflags} -DOPENSSL_LOAD_CONF" \
-DWITH_CLIENT_TESTING="OFF" \
-DWITH_TESTING="ON" \
-DWITH_GSSAPI=ON \
-DWITH_BENCHMARKS="OFF" \
-DWITH_EXAMPLES="OFF"
make %{?_smp_mflags}
make %{?_smp_mflags} doc
%install
%cmake_install
# remove the static libs, we don't want them installed, needed by tests
rm -rf %{buildroot}%{_libdir}/*.a
%check
cd build
make %{?_smp_mflags} test || {
cat Testing/Temporary/LastTest.log;
exit 1;
}
%post -n libssh4 -p /sbin/ldconfig
%postun -n libssh4 -p /sbin/ldconfig
%files -n libssh4
%defattr(-,root,root)
%doc AUTHORS README ChangeLog
%{_libdir}/libssh.so.*
%{_libdir}/libssh_threads.so.*
%files devel
%defattr(-,root,root)
%{_includedir}/libssh
%{_libdir}/libssh.so
%{_libdir}/libssh_threads.so
%{_libdir}/pkgconfig/libssh.pc
%{_libdir}/pkgconfig/libssh_threads.pc
%dir %{_libdir}/cmake/libssh
%{_libdir}/cmake/libssh/libssh-config.cmake
%{_libdir}/cmake/libssh/libssh-config-version.cmake
%files devel-doc
%defattr(-,root,root)
%doc build/doc/html
%changelog