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: 21-Nov-2005 21:56:48
Branch: HEAD Handle: 2005112120564800
Added files:
openpkg-src/libssh2 libssh2.patch libssh2.spec
Log:
new package: libssh2 0.12 (SSH2 Protocol Client Library)
Summary:
Revision Changes Path
1.1 +65 -0 openpkg-src/libssh2/libssh2.patch
1.1 +119 -0 openpkg-src/libssh2/libssh2.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/libssh2/libssh2.patch
============================================================================
$ cvs diff -u -r0 -r1.1 libssh2.patch
--- /dev/null 2005-11-21 21:56:44 +0100
+++ libssh2.patch 2005-11-21 21:56:48 +0100
@@ -0,0 +1,65 @@
+Index: Makefile.in
+--- Makefile.in.orig 2005-07-13 01:46:56 +0200
++++ Makefile.in 2005-11-21 12:32:49 +0100
+@@ -8,7 +8,7 @@
+
+ CC = @CC@
+ CFLAGS = -c @CFLAGS@ -Iinclude/ -Wall -g
+-LIBS = -lssh2 -Lsrc/
++LIBS = @LDFLAGS@ -Lsrc -lssh2 -lcrypto -lz -lm
+ INSTALL = @INSTALL@
+ [EMAIL PROTECTED]@
+ DISTLIB=libssh2-$(VERSION)
+Index: Net-SSH2-0.05/Makefile.PL
+--- Net-SSH2-0.05/Makefile.PL.orig 2005-11-08 06:08:56 +0100
++++ Net-SSH2-0.05/Makefile.PL 2005-11-21 12:33:13 +0100
+@@ -6,8 +6,8 @@
+ use Config;
+
+ # override library and include directory here if desired
+-my $lib = '';
+-my $inc = '';
++my $lib = '../src';
++my $inc = '../include';
+
+ # try to find libSSH2 if we're not given a location
+ unless($lib and $inc) {
+@@ -35,7 +35,7 @@
+ die "Quitting since I can't find $missing";
+ }
+
+-$lib = "-L$lib -lssh2";
++$lib = "-L$lib -lssh2 -lcrypto -lz -lm";
+ $inc = "-I$inc";
+ print "Net::SSH2: using library $lib and include path $inc.\n";
+
+Index: src/Makefile.in
+--- src/Makefile.in.orig 2005-07-12 23:46:08 +0200
++++ src/Makefile.in 2005-11-21 12:32:49 +0100
+@@ -7,7 +7,7 @@
+ incldir = @prefix@/include
+
+ CC = @CC@
+-CFLAGS = -c @CFLAGS@ -Wall -g -I../include/ -fPIC
++CFLAGS = -c @CFLAGS@ -I../include/
+ LDFLAGS = @LDFLAGS@
+ LIBS = @LIBS@
+ INSTALL = @INSTALL@
+@@ -51,7 +51,7 @@
+ userauth.o: userauth.c
+ $(CC) -o userauth.o userauth.c $(CFLAGS) $(LIBS)
+
+-all: [EMAIL PROTECTED]@
++all: libssh2.a
+
+ [EMAIL PROTECTED]@: $(OBJECTS)
+ $(CC) -o [EMAIL PROTECTED]@ $(SHLIB_LDFLAGS) $(OBJECTS) $(LIBS)
$(LDFLAGS) @SHLIB_LDFLAGS@
+@@ -60,7 +60,7 @@
+ ar q libssh2.a $(OBJECTS)
+ @RANLIB@ libssh2.a
+ install: all
+- $(INSTALL) [EMAIL PROTECTED]@ $(DESTDIR)$(libdir)
++ $(INSTALL) libssh2.a $(DESTDIR)$(libdir)
+ clean:
+ rm -f *~ libssh2.a [EMAIL PROTECTED]@ *.o
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/libssh2/libssh2.spec
============================================================================
$ cvs diff -u -r0 -r1.1 libssh2.spec
--- /dev/null 2005-11-21 21:56:44 +0100
+++ libssh2.spec 2005-11-21 21:56:48 +0100
@@ -0,0 +1,119 @@
+##
+## libssh2.spec -- OpenPKG RPM Package Specification
+## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
+## Copyright (c) 2000-2005 Ralf S. Engelschall <http://engelschall.com/>
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+## SUCH DAMAGE.
+##
+
+# package version
+%define V_libssh2 0.12
+%define V_net_ssh2 0.05
+
+# package information
+Name: libssh2
+Summary: SSH2 Protocol Client Library
+URL: http://www.libssh2.org/
+Vendor: Sara Golemon
+Packager: OpenPKG
+Distribution: OpenPKG
+Class: EVAL
+Group: Network
+License: BSD-style
+Version: %{V_libssh2}
+Release: 20051121
+
+# package options
+%option with_perl no
+
+# list of sources
+Source0:
http://osdn.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
+Patch0: libssh2.patch
+
+# build information
+Prefix: %{l_prefix}
+BuildRoot: %{l_buildroot}
+BuildPreReq: OpenPKG, openpkg >= 20040130
+PreReq: OpenPKG, openpkg >= 20040130
+BuildPreReq: openssl, zlib
+PreReq: openssl, zlib
+%if "%{with_perl}" == "yes"
+BuildPreReq: perl, perl-openpkg
+PreReq: perl
+%endif
+AutoReq: no
+AutoReqProv: no
+
+%description
+ libssh2 is the most badly packaged program in the OpenPKG world.
+
+%track
+ prog libssh2 = {
+ version = %{V_libssh2}
+ url = http://prdownloads.sourceforge.net/libssh2/
+ regex = libssh2-(__VER__)\.tar\.gz
+ }
+ prog libssh2:perl = {
+ version = %{V_net_ssh2}
+ url = http://www.cpan.org/authors/id/D/DB/DBROBINS/
+ regex = Net-SSH2-(__VER__)\.tar\.gz
+ }
+
+%prep
+ %setup -q
+ %setup -q -T -D -a 1
+ %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}
+%if "%{with_perl}" == "yes"
+ %{l_shtool} subst \
+ -e 's:inc = \(.\)\(.;\):inc = \1../include\2:' \
+ -e 's:lib = \(.\)\(.;\):lib = \1../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
+%endif
+
+%install
+ rm -rf $RPM_BUILD_ROOT
+ %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
+%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
+%else
+ >perl-openpkg-files
+%endif
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
+ %{l_files_std} `cat perl-openpkg-files`
+
+%files -f files
+
+%clean
+ rm -rf $RPM_BUILD_ROOT
+
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]