OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 09-Jan-2007 19:32:45
Branch: HEAD Handle: 2007010918324500
Modified files:
openpkg-src/libssh2 libssh2.patch libssh2.spec
Log:
add the alternative libssh to this package, too
Summary:
Revision Changes Path
1.8 +40 -6 openpkg-src/libssh2/libssh2.patch
1.14 +43 -15 openpkg-src/libssh2/libssh2.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/libssh2/libssh2.patch
============================================================================
$ cvs diff -u -r1.7 -r1.8 libssh2.patch
--- openpkg-src/libssh2/libssh2.patch 26 Sep 2006 14:59:40 -0000 1.7
+++ openpkg-src/libssh2/libssh2.patch 9 Jan 2007 18:32:45 -0000 1.8
@@ -1,6 +1,6 @@
-Index: Makefile.in
---- Makefile.in.orig 2006-04-07 22:40:24 +0200
-+++ Makefile.in 2006-06-24 21:52:17 +0200
+Index: libssh2-0.14/Makefile.in
+--- libssh2-0.14/Makefile.in.orig 2006-04-07 22:40:24 +0200
++++ libssh2-0.14/Makefile.in 2006-06-24 21:52:17 +0200
@@ -8,7 +8,7 @@
CC = @CC@
@@ -33,9 +33,9 @@
$inc = "-I$inc";
print "Net::SSH2: using library $lib and include path $inc.\n";
-Index: src/Makefile.in
---- src/Makefile.in.orig 2006-04-07 22:40:35 +0200
-+++ src/Makefile.in 2006-06-24 21:52:34 +0200
+Index: libssh2-0.14/src/Makefile.in
+--- libssh2-0.14/src/Makefile.in.orig 2006-04-07 22:40:35 +0200
++++ libssh2-0.14/src/Makefile.in 2006-06-24 21:52:34 +0200
@@ -8,7 +8,7 @@
CC = @CC@
@@ -63,3 +63,37 @@
clean:
rm -f *~ libssh2.a [EMAIL PROTECTED]@ *.o
+Index: libssh-0.2/include/libssh/priv.h
+--- libssh-0.2/include/libssh/priv.h.orig 2006-12-29 16:03:59 +0100
++++ libssh-0.2/include/libssh/priv.h 2007-01-09 17:44:24 +0100
+@@ -549,4 +549,8 @@
+ } ;
+ #endif
+
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++
+ #endif /* _LIBSSH_PRIV_H */
+Index: libssh-0.2/libssh/misc.c
+--- libssh-0.2/libssh/misc.c.orig 2006-12-29 16:03:59 +0100
++++ libssh-0.2/libssh/misc.c 2007-01-09 17:44:56 +0100
+@@ -27,6 +27,7 @@
+ #include <pwd.h>
+ #include <sys/types.h>
+ #include <netdb.h>
++#include "libssh/priv.h"
+ #include "libssh/libssh.h"
+
+ /* if the program was executed suid root, don't trust the user ! */
+Index: libssh-0.2/libssh/server.c
+--- libssh-0.2/libssh/server.c.orig 2006-12-29 16:03:59 +0100
++++ libssh-0.2/libssh/server.c 2007-01-09 17:43:13 +0100
+@@ -27,6 +27,7 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
++#include <netinet/in.h>
+ #include <netdb.h>
+ #include <errno.h>
+ #include <string.h>
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/libssh2/libssh2.spec
============================================================================
$ cvs diff -u -r1.13 -r1.14 libssh2.spec
--- openpkg-src/libssh2/libssh2.spec 9 Jan 2007 16:36:15 -0000 1.13
+++ openpkg-src/libssh2/libssh2.spec 9 Jan 2007 18:32:45 -0000 1.14
@@ -24,6 +24,7 @@
# package version
%define V_libssh2 0.14
+%define V_libssh 0.2
%define V_net_ssh2 0.09
# package information
@@ -44,7 +45,8 @@
# list of sources
Source0:
http://switch.dl.sourceforge.net/sourceforge/libssh2/libssh2-%{V_libssh2}.tar.gz
-Source1:
http://www.cpan.org/authors/id/D/DB/DBROBINS/Net-SSH2-%{V_net_ssh2}.tar.gz
+Source1: http://0xbadc0de.be/libssh/libssh-%{V_libssh}.tgz
+Source2:
http://www.cpan.org/authors/id/D/DB/DBROBINS/Net-SSH2-%{V_net_ssh2}.tar.gz
Patch0: libssh2.patch
# build information
@@ -62,7 +64,10 @@
AutoReqProv: no
%description
- libssh2 is a C library implementing the SSH2 protocol.
+ This package contains both libssh2, a C library implementing the
+ SSH2 protocol, and libssh, an independent C library implementing the
+ SSH1 and SSH2 protocols. Additionally, Net::SSH2, the Perl bindings
+ to libssh2, is optionally provided, too.
%track
prog libssh2 = {
@@ -70,6 +75,11 @@
url = http://prdownloads.sourceforge.net/libssh2/
regex = libssh2-(__VER__)\.tar\.gz
}
+ prog libssh2:libssh = {
+ version = %{V_libssh}
+ url = http://0xbadc0de.be/wiki/libssh:libssh
+ regex = libssh-(__VER__)\.tgz
+ }
prog libssh2:perl = {
version = %{V_net_ssh2}
url = http://www.cpan.org/authors/id/D/DB/DBROBINS/
@@ -77,24 +87,37 @@
}
%prep
- %setup -q
+ %setup -q -c
%setup -q -T -D -a 1
+ %setup -q -T -D -a 2
%patch -p0
%build
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O}" \
- CPPFLAGS="%{l_cppflags}" \
- LDFLAGS="%{l_ldflags}" \
- ./configure \
- --prefix=%{l_prefix} \
- --with-openssl=%{l_prefix} \
- --with-libz=%{l_prefix}
- %{l_make} %{l_mflags -O}
+ ( cd libssh2-%{V_libssh2}
+ CC="%{l_cc}" \
+ CFLAGS="%{l_cflags -O}" \
+ CPPFLAGS="%{l_cppflags}" \
+ LDFLAGS="%{l_ldflags}" \
+ ./configure \
+ --prefix=%{l_prefix} \
+ --with-openssl=%{l_prefix} \
+ --with-libz=%{l_prefix}
+ %{l_make} %{l_mflags -O}
+ ) || exit $?
+ ( cd libssh-%{V_libssh}
+ CC="%{l_cc}" \
+ CFLAGS="%{l_cflags -O}" \
+ CPPFLAGS="%{l_cppflags}" \
+ LDFLAGS="%{l_ldflags}" \
+ ./configure \
+ --prefix=%{l_prefix} \
+ --disable-shared
+ %{l_make} %{l_mflags}
+ ) || exit $?
%if "%{with_perl}" == "yes"
%{l_shtool} subst \
- -e 's:inc = \(.\)\(.;\):inc = \1../include\2:' \
- -e 's:lib = \(.\)\(.;\):lib = \1../src\2:' \
+ -e 's:inc = \(.\).*\(.;\):inc =
\1../libssh2-%{V_libssh2}/include\2:' \
+ -e 's:lib = \(.\).*\(.;\):lib = \1../libssh2-%{V_libssh2}/src\2:' \
Net-SSH2-%{V_net_ssh2}/Makefile.PL
%{l_prefix}/bin/perl-openpkg prepare
%{l_prefix}/bin/perl-openpkg -d Net-SSH2-%{V_net_ssh2} configure build
@@ -102,7 +125,12 @@
%install
rm -rf $RPM_BUILD_ROOT
- %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
+ ( cd libssh2-%{V_libssh2}
+ %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
+ ) || exit $?
+ ( cd libssh-%{V_libssh}
+ %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
+ ) || exit $?
%if "%{with_perl}" == "yes"
%{l_prefix}/bin/perl-openpkg -d Net-SSH2-%{V_net_ssh2} install
%{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
@@ .
______________________________________________________________________
OpenPKG http://openpkg.org
CVS Repository Commit List [email protected]