head	1.5;
access;
symbols
	OPENPKG_E1_MP:1.2
	OPENPKG_E1_MP_HEAD:1.2;
locks; strict;
comment	@-- @;


1.5
date	2009.06.30.20.21.10;	author rse;	state Exp;
branches;
next	1.4;
commitid	mW7f5wxeUG4f4VTt;

1.4
date	2009.04.18.13.13.32;	author rse;	state Exp;
branches;
next	1.3;
commitid	4pHXU27WTIGCZuKt;

1.3
date	2008.01.01.15.00.44;	author rse;	state Exp;
branches;
next	1.2;
commitid	B8esaHJHoduuKILs;

1.2
date	2007.01.01.17.40.26;	author rse;	state Exp;
branches;
next	1.1;
commitid	BicZD6VUl7GuqP0s;

1.1
date	2006.11.08.20.39.23;	author rse;	state Exp;
branches;
next	;
commitid	jhMxtmgnMDFKcUTr;


desc
@@


1.5
log
@switch to the new SourceForge.net website functionality where we can find all files (again)
@
text
@##
##  openslp.spec -- OpenPKG RPM Package Specification
##  Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
##
##  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:      20080101

#   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://sourceforge.net/projects/openslp/files/
        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

@


1.4
log
@bump years in copyright messages
@
text
@d62 1
a62 1
        url       = http://prdownloads.sourceforge.net/openslp/
@


1.3
log
@Update package specifications according to OpenPKG year 2008 world order:
http://www.mail-archive.com/openpkg-announce@@openpkg.org/msg00221.html
@
text
@d3 1
a3 1
##  Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
@


1.2
log
@Welcome Year 2007!
@
text
@d3 1
a3 2
##  Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
##  Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
d35 1
a35 1
Release:      20061108
@


1.1
log
@new package: openslp 1.2.1 (Service Location Protocol (SLP) Client & Server)
@
text
@d3 2
a4 2
##  Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
##  Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
@

