Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 5637f40b8dc6e3d22751b4d8e39ed41f > files > 4

libssh2-0.5-1mdk.src.rpm

%define	rname	libssh2
%define	version	0.5
%define	release	1mdk

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

Summary:	A library implementing the SSH2 protocol
Name:		%{libname}
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
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).

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

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

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 -p /sbin/ldconfig

%postun -p /sbin/ldconfig

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

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

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

%changelog
* 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