File libssh2_org.spec of Package libssh2_org

#
# spec file for package libssh2_org (Version 1.0)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Summary:        A library implementing the SSH2 protocol

Name:           libssh2_org
Version:        1.0
Release:        1
%define pkg_name libssh2
Group:          Development/Libraries/C and C++
Source:         http://heanet.dl.sourceforge.net/sourceforge/libssh2/%{pkg_name}-%{version}.tar.bz2
Url:            http://www.libssh2.org/
License:        BSD 3-Clause
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  openssl-devel pkgconfig zlib-devel

%description
libssh2 is a library implementing the SSH2 protocol as defined by
Internet Drafts: SECSH-TRANS, SECSH-USERAUTH, SECSH-CONNECTION,
SECSH-ARCH, SECSH-FILEXFER, SECSH-DHGEX, SECSH-NUMBERS, and
SECSH-PUBLICKEY.



%define debug_package_requires libssh2-1 = %{version}-%{release}

%package -n libssh2-1
License:        BSD 3-Clause
Summary:        A library implementing the SSH2 protocol
Group:          Development/Libraries/C and C++
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, SECSH-USERAUTH, SECSH-CONNECTION,
SECSH-ARCH, SECSH-FILEXFER, SECSH-DHGEX, SECSH-NUMBERS, and
SECSH-PUBLICKEY.



%package -n libssh2-devel
License:        BSD 3-Clause
Summary:        A library implementing the SSH2 protocol
Group:          Development/Libraries/C and C++
Requires:       libssh2-1 = %{version} glibc-devel

%description -n libssh2-devel
libssh2 is a library implementing the SSH2 protocol as defined by
Internet Drafts: SECSH-TRANS, SECSH-USERAUTH, SECSH-CONNECTION,
SECSH-ARCH, SECSH-FILEXFER, SECSH-DHGEX, SECSH-NUMBERS, and
SECSH-PUBLICKEY.



%prep
%setup -q -n %{pkg_name}-%{version}
# /me hides :-)
%{__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

%check
%{__make} check

%clean
%{__rm} -rf %{buildroot}

%post -n libssh2-1 -p /sbin/ldconfig

%postun -n libssh2-1 -p /sbin/ldconfig

%files -n libssh2-1
%defattr(-,root,root)
%{_libdir}/libssh2.so.1*

%files -n libssh2-devel
%defattr(-,root,root)
%{_libdir}/libssh2.so
%{_includedir}/*.h
%{_mandir}/man3/*

%changelog
* Mon Jan 05 2009 crrodriguez@suse.de
- update to version 1.0, see large list of changes in the NEWS file
* Tue Oct 14 2008 crrodriguez@suse.de
- rename package to avoid all sorts of conflicts with the other
  "libssh" package
* Thu Aug 14 2008 crrodriguez@suse.de
- update current snap , version 20080814
  * Sean Peterson fixed a key re-exchange bug:
  http://daniel.haxx.se/projects/libssh2/mail/libssh2-devel-archive-2008-06/0002.shtml
* Thu Jun 26 2008 crrodriguez@suse.de
- update to version 0.19.0-20080626, two bugfixes
* Mon Jun 23 2008 crrodriguez@suse.de
- no longer needs fno-strict-aliasing
* Mon Jun 23 2008 crrodriguez@suse.de
- update to libssh2-0.19.0-20080622
* Sun Dec 23 2007 crrodriguez@suse.de
- update to 0.18 final
* Fri Aug 31 2007 crrodriguez@suse.de
- update snap
* Sat Apr 14 2007 judas_iscariote@shorewall.net
- update snapshot.
openSUSE Build Service is sponsored by