Name: libssh2 Version: 1.2.2 Release: 1 Summary: A library implementing the SSH2 protocol Group: System Environment/Libraries License: BSD URL: http://www.libssh2.org/ Source0: http://www.libssh2.org/download/%{name}-%{version}.tar.gz Source1: http://www.libssh2.org/download/%{name}-%{version}.tar.gz.asc BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: openssl-devel >= 0.9.8 BuildRequires: zlib-devel BuildRequires: pkg-config, make Requires: openssl >= 0.9.8 Requires: zlib %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). The library is available as 32-bit and 64-bit. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc -q64" or "gcc -maix64". %package docs Summary: Documentation for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description docs The %{name}-docs package contains man pages and examples for developing applications that use %{name}. %prep %setup -q %build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export CC="cc -q64" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static gmake %{?_smp_mflags} mv ./src/.libs/%{name}.so.1 . gmake distclean # now build the 32-bit version export CC="cc" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static gmake %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q ./src/.libs/%{name}.a ./%{name}.so.1 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} gmake DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT} for dir in lib include do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc AUTHORS ChangeLog COPYING README NEWS %{_libdir}/*.a /usr/lib/*.a %files docs %defattr(-,root,system,-) %doc COPYING HACKING example/ %{_mandir}/man?/* %files devel %defattr(-,root,system,-) %doc COPYING %{_includedir}/* %{_libdir}/*.la /usr/include/* /usr/lib/*.la %changelog * Tue Nov 17 2009 Michael Perzl - 1.2.2-1 - updated to version 1.2.2 * Tue Sep 29 2009 Michael Perzl - 1.2.1-1 - updated to version 1.2.1 * Tue Aug 11 2009 Michael Perzl - 1.2-1 - updated to version 1.2 * Mon Apr 06 2009 Michael Perzl - 1.1-1 - updated to version 1.1 * Fri Sep 12 2008 Michael Perzl - 0.18-1 - first version for AIX V5.1 and higher