File libssh2.spec of Package libssh2
#norootforbuild
%define maketest 0
Name: libssh2
Summary: A library implementing the SSH2 protocol
Version: 1.2.2
Release: 1.21
Group: Development/Libraries
Source: http://heanet.dl.sourceforge.net/sourceforge/libssh2/%{name}-%{version}.tar.gz
URL: http://www.libssh2.org/
License: BSD
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: openssl-devel zlib-devel pkgconfig
%if 0%{?centos_version} || 0%{?rhel_version}
BuildRequires: which libtool
%if 0%{?rhel_version} == 406
BuildRequires: gcc-c++
%endif
%endif
%description
libssh2 is a library implementing the SSH2 protocol as defined by
Internet Drafts: SECSH-TRANS(22), SECSH-USERAUTH(25),
SECSH-CONNECTION(23), SECSH-ARCH(20), SECSH-FILEXFER(06)*,
SECSH-DHGEX(04), and SECSH-NUMBERS(10).
%package -n libssh2-1
Summary: A library implementing the SSH2 protocol
Group: Development/Libraries
Provides: libssh2 = %{version}
Obsoletes: libssh2 < %{version}
%description -n libssh2-1
libssh2 is a library implementing the SSH2 protocol as defined by
Internet Drafts: SECSH-TRANS(22), SECSH-USERAUTH(25),
SECSH-CONNECTION(23), SECSH-ARCH(20), SECSH-FILEXFER(06)*,
SECSH-DHGEX(04), and SECSH-NUMBERS(10).
This package contains only the shared library
%package devel
Summary: Include files for libssh2
Group: Development/Libraries
Requires: libssh2-1 = %{version} glibc-devel
%description devel
libssh2 is a library implementing the SSH2 protocol as defined by
Internet Drafts: SECSH-TRANS(22), SECSH-USERAUTH(25),
SECSH-CONNECTION(23), SECSH-ARCH(20), SECSH-FILEXFER(06)*,
SECSH-DHGEX(04), and SECSH-NUMBERS(10).
%prep
%setup -q -n %{name}-%{version}
%if 0%{?suse_version} <= 1100
%{__rm} -f m4/libtool.m4
%{__rm} -f m4/ltoptions.m4
%{__rm} -f m4/ltsugar.m4
%{__rm} -f m4/ltversion.m4
%{__rm} -f m4/lt~obsolete.m4
%endif
# %{__rm} -f configure
# %{__sed} -i -e s@/lib/libz@/%{_lib}/libz@g -e s@/lib/libcrypto@/%{_lib}/libcrypto@g configure.in
# %{__sed} -i -e 's|LIBZ_LIBDIR=.*|LIBZ_LIBDIR=%{_libdir}|g' configure.in
# %{__sed} -i -e 's|OPENSSL_LIBLINE=".*"| OPENSSL_LIBLINE="-lcrypto"|g' configure.in
%build
./buildconf --force
%configure \
--disable-static --with-pic --disable-rpath --with-libz=%{_usr} --with-openssl=%{_usr}
%install
%{__make} install DESTDIR=%{buildroot}
%{__rm} -f %{buildroot}%{_libdir}/*.la
grep -r include %{buildroot}%{_includedir}
%check
%if %maketest
%{__make} check
%endif
%clean
%{__rm} -rf %{buildroot}
%files -n libssh2-1
%defattr(-,root,root)
%{_libdir}/pkgconfig/libssh2.pc
%{_libdir}/libssh2.so.1*
%files devel
%defattr(-,root,root)
%{_libdir}/libssh2.so
%{_includedir}/*.h
%{_mandir}/man3/*
%changelog
* Wed Jul 28 2010 Holger Manthey <holger.manthey@bertelsmann.de>
- fix build for rhel-4
* Thu May 27 2010 Holger Manthey <holger.manthey@bertelsmann.de>
- fix buildrequires for rhel and centos
* Thu Jan 21 2010 Holger Manthey <holger.manthey@bertelsmann.de>
- remove some m4 files due to build errors
* Tue Jan 19 2010 Holger Manthey <holger.manthey@bertelsmann.de>
- update to version 1.2.2