OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   18-May-2004 10:47:07
  Branch: HEAD                             Handle: 2004051809470700

  Added files:
    openpkg-src/smbget      smbget.patch smbget.spec

  Log:
    new package: smbget 0.6 (SMB Download Utility)

  Summary:
    Revision    Changes     Path
    1.1         +60 -0      openpkg-src/smbget/smbget.patch
    1.1         +92 -0      openpkg-src/smbget/smbget.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/smbget/smbget.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.1 smbget.patch
  --- /dev/null 2004-05-18 10:47:07.000000000 +0200
  +++ smbget.patch      2004-05-18 10:47:07.000000000 +0200
  @@ -0,0 +1,60 @@
  +Index: Makefile
  +--- Makefile.orig    2003-10-20 22:23:19.000000000 +0200
  ++++ Makefile 2004-05-18 10:38:54.000000000 +0200
  +@@ -3,12 +3,15 @@
  + mandir = $(prefix)/share/man
  + docdir = $(prefix)/share/doc
  + INSTALL = install
  +-CFLAGS = -Wall -g3
  ++CC      = cc
  ++CFLAGS  =
  ++LDFLAGS =
  ++LIBS    = -lpopt -lsmbclient
  + 
  + all: smbget
  + 
  + smbget: smbget.o
  +-    $(CC) -o $@ $< -lpopt -lsmbclient
  ++    $(CC) -o $@ $< $(LDFLAGS) $(LIBS)
  + 
  + %.o: %.c
  +     $(CC) $(CFLAGS) -c $< -o $@ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
  +Index: smbget.c
  +--- smbget.c.orig    2003-11-15 18:15:03.000000000 +0100
  ++++ smbget.c 2004-05-18 10:45:38.000000000 +0200
  +@@ -6,7 +6,6 @@
  + #define VERSION "0.6"
  + 
  + #define _GNU_SOURCE
  +-#include <malloc.h>
  + #include <stdio.h>
  + #include <string.h>
  + #include <unistd.h>
  +@@ -29,6 +28,27 @@
  + #define OFF_T_FORMAT "%ld"
  + #endif
  + 
  ++static size_t my_strnlen(const char *string, size_t maxlen)
  ++{
  ++    const char *end = memchr(string, '\0', maxlen);
  ++    return end ? end - string : maxlen;
  ++}
  ++
  ++static char *my_strndup(const char *s, size_t n)
  ++{
  ++    size_t len;
  ++    char *new;
  ++
  ++    len = my_strnlen(s, n);
  ++    if ((new = malloc(len + 1)) == NULL)
  ++        return NULL;
  ++    new[len] = '\0';
  ++    memcpy(new, s, len);
  ++    return new;
  ++}
  ++
  ++#define strndup my_strndup
  ++
  + int columns = 0;
  + 
  + time_t total_start_time = 0;
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/smbget/smbget.spec
  ============================================================================
  $ cvs diff -u -r0 -r1.1 smbget.spec
  --- /dev/null 2004-05-18 10:47:07.000000000 +0200
  +++ smbget.spec       2004-05-18 10:47:07.000000000 +0200
  @@ -0,0 +1,92 @@
  +##
  +##  smbget.spec -- OpenPKG RPM Specification
  +##  Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  +##  Copyright (c) 2000-2004 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +##  Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.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 information
  +Name:         smbget
  +Summary:      SMB Download Utility
  +URL:          http://jelmer.vernstok.nl/oss/smbget/
  +Vendor:       Jelmer Vernstok
  +Packager:     The OpenPKG Project
  +Distribution: OpenPKG
  +Class:        EVAL
  +Group:        Network
  +License:      GPL
  +Version:      0.6
  +Release:      20040518
  +
  +#   list of sources
  +Source0:      http://jelmer.vernstok.nl/releases/smbget-%{version}.tar.gz
  +Patch0:       smbget.patch
  +
  +#   build information
  +Prefix:       %{l_prefix}
  +BuildRoot:    %{l_buildroot}
  +BuildPreReq:  OpenPKG, openpkg >= 20040130
  +PreReq:       OpenPKG, openpkg >= 20040130
  +BuildPreReq:  libsmbclient, libiconv, popt
  +PreReq:       libsmbclient, libiconv, popt
  +AutoReq:      no
  +AutoReqProv:  no
  +
  +%description
  +    SMBGet is a simple command line client for the SMB/CIFS protocol.
  +
  +%track
  +    prog smbget = {
  +        version   = %{version}
  +        url       = http://jelmer.vernstok.nl/oss/smbget/
  +        regex     = SMBGet.(__VER__)
  +    }
  +
  +%prep
  +    %setup -q
  +    %patch -p0
  +
  +%build
  +    %{l_make} %{l_mflags} \
  +        CC="%{l_cc}" \
  +        CFLAGS="%{l_cflags -O} %{l_cppflags}" \
  +        LDFLAGS="%{l_ldflags}" \
  +        LIBS="-lsmbclient -liconv -lpopt"
  +
  +%install
  +    rm -rf $RPM_BUILD_ROOT
  +    %{l_shtool} mkdir -f -p -m 755 \
  +        $RPM_BUILD_ROOT%{l_prefix}/bin \
  +        $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  +        $RPM_BUILD_ROOT%{l_prefix}/man/man5
  +    %{l_shtool} install -c -s -m 755 \
  +        smbget $RPM_BUILD_ROOT%{l_prefix}/bin/
  +    %{l_shtool} install -c -m 644 \
  +        smbget.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  +    %{l_shtool} install -c -m 644 \
  +        smbgetrc.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/
  +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  +
  +%files -f files
  +
  +%clean
  +    rm -rf $RPM_BUILD_ROOT
  +
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to