BR: compat-openssl10-devel (f26+, #1423088)
use %license
-devel: drop hardcoded pkgconfig dep (let autodeps handle it)
%files: track library sonames, simplify -devel
%install: use 'install/fast' target
.spec cosmetics, drop deprecated %clean section
This commit is contained in:
Rex Dieter 2017-03-11 09:49:36 -06:00
parent 8337782299
commit a5713378e3
1 changed files with 29 additions and 27 deletions

View File

@ -1,6 +1,6 @@
Name: libssh
Version: 0.7.4
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A library implementing the SSH protocol
License: LGPLv2+
URL: http://www.libssh.org
@ -9,7 +9,11 @@ Source0: https://red.libssh.org/attachments/download/210/libssh-0.7.4.tar
BuildRequires: cmake
BuildRequires: doxygen
%if 0%{?fedora} > 25 || 0%{?rhel} > 7
BuildRequires: compat-openssl10-devel
%else
BuildRequires: openssl-devel
%endif
BuildRequires: pkgconfig
BuildRequires: zlib-devel
BuildRequires: krb5-devel
@ -26,8 +30,6 @@ third-party programs others than libcrypto (from openssl).
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
Requires: cmake
%description devel
The %{name}-devel package contains libraries and header files for developing
@ -42,29 +44,26 @@ if test ! -e "obj"; then
fi
pushd obj
%cmake \
-DWITH_TESTING=ON \
%{_builddir}/%{name}-%{version}
%cmake .. \
-DWITH_TESTING=ON
make %{?_smp_mflags} VERBOSE=1
make doc
popd
%install
pushd obj
make DESTDIR=%{buildroot} install
popd
make DESTDIR=%{buildroot} install/fast -C obj
rm -f %{buildroot}%{_libdir}/libssh.a
rm -f %{buildroot}%{_libdir}/libssh_threads.a
## unpackaged files
# static libs forced on using WITH_TESTING
rm -fv %{buildroot}%{_libdir}/libssh.a
rm -fv %{buildroot}%{_libdir}/libssh_threads.a
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%clean
rm -rf %{buildroot}
%check
pushd obj
make test || {
@ -74,28 +73,31 @@ make test || {
popd
%files
%doc AUTHORS BSD ChangeLog COPYING README
%{_libdir}/libssh.so.*
%{_libdir}/libssh_threads.so.*
%doc AUTHORS BSD ChangeLog README
%license COPYING
%{_libdir}/libssh.so.4*
%{_libdir}/libssh_threads.so.4*
%files devel
%doc obj/doc/html
%{_includedir}/libssh/callbacks.h
%{_includedir}/libssh/legacy.h
%{_includedir}/libssh/libssh.h
%{_includedir}/libssh/libsshpp.hpp
%{_includedir}/libssh/server.h
%{_includedir}/libssh/sftp.h
%{_includedir}/libssh/ssh2.h
%dir %{_libdir}/cmake/libssh
%{_libdir}/cmake/libssh/libssh-config-version.cmake
%{_libdir}/cmake/libssh/libssh-config.cmake
%{_includedir}/libssh/
# own this to avoid dep on cmake -- rex
%dir %{_libdir}/cmake/
%{_libdir}/cmake/libssh/
%{_libdir}/pkgconfig/libssh.pc
%{_libdir}/pkgconfig/libssh_threads.pc
%{_libdir}/libssh.so
%{_libdir}/libssh_threads.so
%changelog
* Sat Mar 11 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.7.4-2
- BR: compat-openssl10-devel (f26+, #1423088)
- use %%license
- -devel: drop hardcoded pkgconfig dep (let autodeps handle it)
- %%files: track library sonames, simplify -devel
- %%install: use 'install/fast' target
- .spec cosmetics, drop deprecated %%clean section
* Wed Feb 08 2017 Andreas Schneider <asn@redhat.com> - 0.7.4-1
- Update to version 0.7.4
* Added id_ed25519 to the default identity list