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

View File

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