Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > media > main-src > by-pkgid > 39788638adf04308e024eae9d03cb77a > files > 4

libssh2-0.10-2mdk.src.rpm

%define	rname	libssh2
%define	version	0.10
%define	release	2mdk

%define	major	2
%define libname	%mklibname ssh %{major}

Summary:	A library implementing the SSH2 protocol
Name:		%{rname}
Version:	%{version}
Release:	%{release}
Group:		System/Libraries
License:	BSD
URL:		http://www.libssh2.org/
Source0:	%{rname}-%{version}.tar.bz2
Patch0:		libssh2-0.4-soname.diff.bz2
Patch1:		libssh2-0.4-lib64.diff.bz2
BuildRequires:	pkgconfig
BuildRequires:	openssl-devel
BuildRequires:	zlib-devel
BuildRoot:	%{_tmppath}/%{rname}-%{version}-root

%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).

%if "%{_lib}" != "lib"
%package -n     %{libname}
Summary:	A library implementing the SSH2 protocol
Group:		System/Libraries

%description -n %{libname}
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).
%endif

%package -n	%{libname}-devel
Summary:	Static library and header files for the %{rname} library
Group:		Development/C
Provides:	%{rname}-devel libssh-devel
Requires:	%{libname} = %{version}

%description -n	%{libname}-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).

This package contains the static %{rname} library and its header
files.

%prep

%setup -q -n %{rname}-%{version}
%patch0 -p0
%patch1 -p1

%build

%configure2_5x

# this is a mess
find -name Makefile | xargs perl -pi -e "s|^LDFLAGS.*|LDFLAGS=-L%{_libdir} -lssl -lcrypto -ldl -lz|g"

%make
%make -C src libssh2.a

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}%{_includedir}
install -d %{buildroot}%{_libdir}

install -m0644 include/*.h  %{buildroot}%{_includedir}/
install -m0755 src/libssh2.a %{buildroot}%{_libdir}/
install -m0755 src/libssh2.so.2 %{buildroot}%{_libdir}/
ln -snf libssh2.so.2 %{buildroot}%{_libdir}/libssh2.so

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files -n %{libname}
%defattr(-,root,root)
%doc INSTALL LICENSE README
%{_libdir}/*.so.*

%files -n %{libname}-devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/*.a

%changelog
* Wed Jul 13 2005 Oden Eriksson <oeriksson@mandriva.com> 0.10-2mdk
- added one lib64 fix

* Fri Jul 01 2005 Oden Eriksson <oeriksson@mandriva.com> 0.10-1mdk
- 0.10
- added one lib64 fix
- fix requires-on-release

* Sat Jun 18 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 0.5-2mdk
- add BuildRequires: zlib-devel

* Sat Feb 12 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.5-1mdk
- 0.5

* Sat Jan 08 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.4-2mdk
- second try + one lib64 fix (P1)

* Sat Jan 08 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.4-1mdk
- initial mandrake package