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:   08-Nov-2006 21:39:23
  Branch: HEAD                             Handle: 2006110820392300

  Added files:
    openpkg-src/openslp     openslp.patch openslp.spec rc.openslp

  Log:
    new package: openslp 1.2.1 (Service Location Protocol (SLP) Client &
    Server)

  Summary:
    Revision    Changes     Path
    1.1         +15 -0      openpkg-src/openslp/openslp.patch
    1.1         +129 -0     openpkg-src/openslp/openslp.spec
    1.1         +55 -0      openpkg-src/openslp/rc.openslp
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/openslp/openslp.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.1 openslp.patch
  --- /dev/null 2006-11-08 21:36:19 +0100
  +++ openslp.patch     2006-11-08 21:39:23 +0100
  @@ -0,0 +1,15 @@
  +Index: slpd/slpd_cmdline.h
  +--- slpd/slpd_cmdline.h.orig 2005-02-08 06:34:32 +0100
  ++++ slpd/slpd_cmdline.h      2006-11-08 20:33:48 +0100
  +@@ -56,9 +56,9 @@
  + 
/*=========================================================================*/
  + #ifndef _WIN32
  + #define SLPD_CONFFILE ETCDIR "/slp.conf"
  +-#define SLPD_LOGFILE  VARDIR "/log/slpd.log"
  ++#define SLPD_LOGFILE  VARDIR "/slpd.log"
  + #define SLPD_REGFILE  ETCDIR "/slp.reg"
  +-#define SLPD_PIDFILE  VARDIR "/run/slpd.pid"
  ++#define SLPD_PIDFILE  VARDIR "/slpd.pid"
  + #define SLPD_SPIFILE  ETCDIR "/slp.spi"
  + #else
  + #define SLPD_CONFFILE "%WINDIR%\\slp.conf"
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openslp/openslp.spec
  ============================================================================
  $ cvs diff -u -r0 -r1.1 openslp.spec
  --- /dev/null 2006-11-08 21:36:19 +0100
  +++ openslp.spec      2006-11-08 21:39:23 +0100
  @@ -0,0 +1,129 @@
  +##
  +##  openslp.spec -- OpenPKG RPM Package Specification
  +##  Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  +##  Copyright (c) 2000-2006 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 information
  +Name:         openslp
  +Summary:      Service Location Protocol (SLP) Client & Server
  +URL:          http://www.openslp.org/
  +Vendor:       Caldera, Novell
  +Packager:     OpenPKG Foundation e.V.
  +Distribution: OpenPKG Community
  +Class:        EVAL
  +Group:        Network
  +License:      BSD-style
  +Version:      1.2.1
  +Release:      20061108
  +
  +#   list of sources
  +Source0:      
http://switch.dl.sourceforge.net/openslp/openslp-%{version}.tar.gz
  +Source1:      rc.openslp
  +Patch0:       openslp.patch
  +
  +#   build information
  +Prefix:       %{l_prefix}
  +BuildRoot:    %{l_buildroot}
  +BuildPreReq:  OpenPKG, openpkg >= 20040130
  +PreReq:       OpenPKG, openpkg >= 20040130
  +BuildPreReq:  openssl
  +PreReq:       openssl
  +AutoReq:      no
  +AutoReqProv:  no
  +
  +%description
  +    OpenSLP is an open-source implementation of the Service Location
  +    Protocol (SLP) which is an IETF standards track protocol that
  +    provides a framework to allow networking applications to discover
  +    the existence, location, and configuration of networked services in
  +    enterprise networks.
  +
  +%track
  +    prog openslp = {
  +        version   = %{version}
  +        url       = http://prdownloads.sourceforge.net/openslp/
  +        regex     = openslp-(\d+\.[02468]\.\d+)\.tar\.gz
  +    }
  +
  +%prep
  +    %setup -q
  +    %patch -p0
  +
  +%build
  +    #   configure program
  +    CC="%{l_cc}" \
  +    CFLAGS="%{l_cflags -O}" \
  +    CPPFLAGS="%{l_cppflags}" \
  +    LDFLAGS="%{l_ldflags}" \
  +    ./configure \
  +        --prefix=%{l_prefix} \
  +        --sysconfdir=%{l_prefix}/etc/openslp \
  +        --localstatedir=%{l_prefix}/var/openslp \
  +        --disable-shared
  +
  +    #   build program
  +    %{l_make} %{l_mflags -O}
  +
  +%install
  +    #   install program
  +    rm -rf $RPM_BUILD_ROOT
  +    %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  +
  +    #   post-adjust installation
  +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/doc
  +    %{l_shtool} subst \
  +        -e 's/^;\(net\.slp\.interfaces =\).*$/\1 127.0.0.1/' \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/openslp/slp.conf
  +    %{l_shtool} mkdir -f -p -m 755 \
  +        $RPM_BUILD_ROOT%{l_prefix}/var/openslp
  +
  +    #   install run-command script
  +    %{l_shtool} mkdir -f -p -m 755 \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  +    %{l_shtool} install -c -m 755 %{l_value -s -a} \
  +        %{SOURCE rc.openslp} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  +
  +    #   determine installation files
  +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  +        %{l_files_std} \
  +        '%config %{l_prefix}/etc/openslp/*'
  +
  +%files -f files
  +
  +%clean
  +    rm -rf $RPM_BUILD_ROOT
  +
  +%post
  +    #   after upgrade, restart service
  +    [ $1 -eq 2 ] || exit 0
  +    eval `%{l_rc} openslp status 2>/dev/null`
  +    [ ".$openslp_active" = .yes ] && %{l_rc} openslp restart
  +    exit 0
  +
  +%preun
  +    #   before erase, stop service and remove run-time files
  +    [ $1 -eq 0 ] || exit 0
  +    %{l_rc} openslp stop 2>/dev/null
  +    rm -f $RPM_INSTALL_PREFIX/var/openslp/* >/dev/null 2>&1 || true
  +    exit 0
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openslp/rc.openslp
  ============================================================================
  $ cvs diff -u -r0 -r1.1 rc.openslp
  --- /dev/null 2006-11-08 21:36:19 +0100
  +++ rc.openslp        2006-11-08 21:39:23 +0100
  @@ -0,0 +1,55 @@
  [EMAIL PROTECTED]@/bin/openpkg rc
  +##
  +##  rc.openslp -- Run-Commands
  +##
  +
  +%config
  +    openslp_enable="$openpkg_rc_def"
  +    openslp_log_prolog="true"
  +    openslp_log_epilog="true"
  +    openslp_log_numfiles="10"
  +    openslp_log_minsize="1M"
  +    openslp_log_complevel="9"
  +
  +%common
  +    openslp_pidfile="@l_prefix@/var/openslp/slpd.pid"
  +    openslp_logfile="@l_prefix@/var/openslp/slpd.log"
  +    openslp_signal () {
  +        [ -f $openslp_pidfile ] && kill -$1 `cat $openslp_pidfile`
  +    }
  +
  +%status -u @l_susr@ -o
  +    openslp_usable="unknown"
  +    openslp_active="no"
  +    rcService openslp enable yes && \
  +        openslp_signal 0 && openslp_active="yes"
  +    echo "openslp_enable=\"$openslp_enable\""
  +    echo "openslp_usable=\"$openslp_usable\""
  +    echo "openslp_active=\"$openslp_active\""
  +
  +%start -u @l_susr@
  +    rcService openslp enable yes || exit 0
  +    rcService openslp active yes && exit 0
  +    @l_prefix@/sbin/slpd
  +
  +%stop -u @l_susr@
  +    rcService openslp enable yes || exit 0
  +    rcService openslp active no  && exit 0
  +    openslp_signal TERM
  +    sleep 2
  +    rm -f $openslp_pidfile >/dev/null 2>&1 || true
  +
  +%restart -u @l_susr@
  +    rcService openslp enable yes || exit 0
  +    rcService openslp active no  && exit 0
  +    rc openslp stop start
  +
  +%daily -u @l_susr@
  +    rcService openslp enable yes || exit 0
  +    shtool rotate -f \
  +        -n ${openslp_log_numfiles} -s ${openslp_log_minsize} -d \
  +        -z ${openslp_log_complevel} -m 664 -o @l_susr@ -g @l_mgrp@ \
  +        -P "${openslp_log_prolog}" \
  +        -E "${openslp_log_epilog}; rc openslp restart" \
  +        $openslp_logfile
  +
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to