head	1.21;
access;
symbols
	OPENPKG_E1_MP_HEAD:1.17
	OPENPKG_E1_MP:1.17
	OPENPKG_E1_MP_2_STABLE:1.12.2.2
	OPENPKG_E1_FP:1.12.2.2
	OPENPKG_2_STABLE_MP:1.15
	OPENPKG_2_STABLE_20061018:1.12.2.2
	OPENPKG_2_STABLE_20060622:1.12.2.1
	OPENPKG_2_STABLE:1.12.0.2
	OPENPKG_2_STABLE_BP:1.12
	OPENPKG_2_5_RELEASE:1.9.4.3
	OPENPKG_2_5_SOLID:1.9.0.4
	OPENPKG_2_5_SOLID_BP:1.9
	OPENPKG_2_4_RELEASE:1.9.2.1
	OPENPKG_2_4_SOLID:1.9.0.2
	OPENPKG_2_4_SOLID_BP:1.9
	OPENPKG_CW_FP:1.8
	OPENPKG_2_3_RELEASE:1.8.2.1
	OPENPKG_2_3_SOLID:1.8.0.2
	OPENPKG_2_3_SOLID_BP:1.8;
locks; strict;
comment	@-- @;


1.21
date	2009.04.18.13.15.46;	author rse;	state Exp;
branches;
next	1.20;
commitid	4pHXU27WTIGCZuKt;

1.20
date	2008.01.01.15.05.03;	author rse;	state Exp;
branches;
next	1.19;
commitid	B8esaHJHoduuKILs;

1.19
date	2007.10.27.12.00.00;	author cs;	state Exp;
branches;
next	1.18;
commitid	XKMxflRJ6S7CYdDs;

1.18
date	2007.07.20.20.18.20;	author thl;	state Exp;
branches;
next	1.17;
commitid	yCyWfcoNSNOaUxqs;

1.17
date	2007.01.01.17.41.57;	author rse;	state Exp;
branches;
next	1.16;
commitid	BicZD6VUl7GuqP0s;

1.16
date	2006.11.02.12.46.06;	author rse;	state Exp;
branches;
next	1.15;
commitid	rClF2Olv29OkM5Tr;

1.15
date	2006.10.13.17.34.18;	author thl;	state Exp;
branches;
next	1.14;
commitid	q5GSxzsSDX29XxQr;

1.14
date	2006.09.24.13.52.19;	author rse;	state Exp;
branches;
next	1.13;
commitid	flcSW6zFeRYLo5Or;

1.13
date	2006.08.25.19.19.13;	author rse;	state Exp;
branches;
next	1.12;
commitid	Tvsj1UyQ8rQ89gKr;

1.12
date	2006.01.01.13.22.33;	author rse;	state Exp;
branches
	1.12.2.1;
next	1.11;
commitid	otZG8yKMCw1JFTfr;

1.11
date	2005.10.16.08.38.53;	author rse;	state Exp;
branches;
next	1.10;

1.10
date	2005.10.15.08.11.29;	author rse;	state Exp;
branches;
next	1.9;

1.9
date	2005.03.24.11.20.23;	author rse;	state Exp;
branches
	1.9.2.1
	1.9.4.1;
next	1.8;

1.8
date	2005.02.18.16.59.57;	author rse;	state Exp;
branches
	1.8.2.1;
next	1.7;

1.7
date	2005.01.15.08.33.22;	author rse;	state Exp;
branches;
next	1.6;

1.6
date	2005.01.01.10.54.53;	author rse;	state Exp;
branches;
next	1.5;

1.5
date	2004.12.27.12.16.50;	author rse;	state Exp;
branches;
next	1.4;

1.4
date	2004.12.27.12.03.51;	author rse;	state Exp;
branches;
next	1.3;

1.3
date	2004.12.23.13.29.53;	author rse;	state Exp;
branches;
next	1.2;

1.2
date	2004.12.16.12.20.26;	author rse;	state Exp;
branches;
next	1.1;

1.1
date	2004.12.15.16.23.23;	author rse;	state Exp;
branches;
next	;

1.12.2.1
date	2006.06.20.15.24.55;	author rse;	state Exp;
branches;
next	1.12.2.2;
commitid	P9b9BoNafLYTTKBr;

1.12.2.2
date	2006.10.16.14.56.35;	author rse;	state Exp;
branches;
next	;
commitid	iZxwRSmmWscPXUQr;

1.9.2.1
date	2005.06.15.19.06.08;	author rse;	state Exp;
branches;
next	;

1.9.4.1
date	2005.10.11.12.51.57;	author rse;	state Exp;
branches;
next	1.9.4.2;

1.9.4.2
date	2005.10.15.08.12.07;	author rse;	state Exp;
branches;
next	1.9.4.3;

1.9.4.3
date	2005.10.16.08.39.33;	author rse;	state Exp;
branches;
next	;

1.8.2.1
date	2005.02.21.17.08.37;	author rse;	state Exp;
branches;
next	;


desc
@@


1.21
log
@bump years in copyright messages
@
text
@##
##  softflowd.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:         softflowd
Summary:      NetFlow-capable Network Traffic Analyser
URL:          http://www.mindrot.org/softflowd.html
Vendor:       Damien Miller
Packager:     OpenPKG Foundation e.V.
Distribution: OpenPKG Community
Class:        PLUS
Group:        Auditing
License:      BSD
Version:      0.9.8
Release:      20080101

#   package options
%option       with_fsl  yes

#   list of sources
Source0:      http://www.mindrot.org/files/softflowd/softflowd-%{version}.tar.gz
Source1:      rc.softflowd
Source2:      fsl.softflowd

#   build information
Prefix:       %{l_prefix}
BuildRoot:    %{l_buildroot}
BuildPreReq:  OpenPKG, openpkg >= 20060823, gcc, make
PreReq:       OpenPKG, openpkg >= 20060823
%if "%{with_fsl}" == "yes"
BuildPreReq:  fsl
PreReq:       fsl
%endif
BuildPreReq:  libpcap
PreReq:       libpcap
AutoReq:      no
AutoReqProv:  no

%description
    Softflowd is flow-based network traffic analyser capable of Cisco
    NetFlow data export. softflowd supports data export using versions
    1, 5 or 9 of the NetFlow protocol. Softflowd semi-statefully tracks
    traffic flows recorded by listening on a network interface or by
    reading a packet capture file. These flows may be reported via
    NetFlow to a collecting host or summarised within Softflowd itself.

%track
    prog softflowd = {
        version   = %{version}
        url       = http://www.mindrot.org/softflowd.html
        regex     = softflowd-(__VER__)\.tar\.gz
    }

%prep
    %setup -q

%build
    #   configure program
    %{l_shtool} subst \
        -e 's;/var/run/;%{l_prefix}/var/softflowd/;g' \
        common.h
    %{l_shtool} subst \
        -e 's;/var/empty;%{l_prefix}/var/softflowd/empty;g' \
        -e 's;nobody;%{l_nusr};g' \
        softflowd.h
    CC="%{l_cc}" \
    CFLAGS="%{l_cflags -O}" \
    CPPFLAGS="%{l_cppflags}" \
    LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \
    LIBS="%{l_fsl_libs}" \
    ./configure \
        --prefix=%{l_prefix}

    #   build program
    %{l_make} %{l_mflags -O}

%install
    #   create installation hierarchy
    rm -rf $RPM_BUILD_ROOT
    %{l_shtool} mkdir -f -p -m 755 \
        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
        $RPM_BUILD_ROOT%{l_prefix}/etc/fsl \
        $RPM_BUILD_ROOT%{l_prefix}/sbin \
        $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
        $RPM_BUILD_ROOT%{l_prefix}/var/softflowd/empty

    #   install program and manual pages
    %{l_shtool} install -c -s -m 755 \
        softflowd softflowctl $RPM_BUILD_ROOT%{l_prefix}/sbin/
    %{l_shtool} install -c -m 644 \
        softflowd.8 softflowctl.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/

    #   install run-command script
    %{l_shtool} install -c -m 755 %{l_value -s -a} \
        %{SOURCE rc.softflowd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/

    #   install OSSP fsl configuration
    %{l_shtool} install -c -m 644 %{l_value -s -a} \
        %{SOURCE fsl.softflowd} $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/

    #   determine installation files
    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
        %{l_files_std} \
        '%config %{l_prefix}/etc/fsl/fsl.softflowd' \
        '%attr(-,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/softflowd/empty'

%files -f files

%clean
    rm -rf $RPM_BUILD_ROOT

%post
    #   after upgrade, restart service
    [ $1 -eq 2 ] || exit 0
    eval `%{l_rc} softflowd status 2>/dev/null`
    [ ".$softflowd_active" = .yes ] && %{l_rc} softflowd restart
    exit 0

%preun
    #   before erase, stop service and remove log files
    [ $1 -eq 0 ] || exit 0
    %{l_rc} softflowd stop 2>/dev/null
    rm -f $RPM_INSTALL_PREFIX/var/softflowd/* >/dev/null 2>&1 || true
    exit 0

@


1.20
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.19
log
@Drop version information of OSSP fsl dependency since it doesn't make to much sense in an CURRENT-only world. Additionally, in several cases it has been choosen quite at will without being correct.
@
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:      20071027
@


1.18
log
@remove "%not %dir" construct, allowing proper directory ownership tracking and removal when erasing last provider
@
text
@d36 1
a36 1
Release:      20070720
d52 2
a53 2
BuildPreReq:  fsl >= 1.2.0
PreReq:       fsl >= 1.2.0
@


1.17
log
@Welcome Year 2007!
@
text
@d36 1
a36 1
Release:      20061102
a124 1
        '%not %dir %{l_prefix}/etc/fsl' \
@


1.16
log
@upgrading package: softflowd 0.9.7 -> 0.9.8
@
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/>
@


1.15
log
@new world order for "Packager" and "Distribution" headers
@
text
@d35 2
a36 2
Version:      0.9.7
Release:      20061013
@


1.14
log
@adjust Group header
@
text
@d30 2
a31 2
Packager:     OpenPKG
Distribution: OpenPKG
d36 1
a36 1
Release:      20060924
@


1.13
log
@replace '@@l_prefix@@/lib/openpkg/bash @@l_prefix@@/etc/rc' in shebang with '@@l_prefix@@/bin/openpkg rc' to allow people who run the rc.xxx scripts directly (as executables) to leverage from the Set-UID functionality
@
text
@d33 1
a33 1
Group:        Network
d36 1
a36 1
Release:      20060825
@


1.12
log
@adjust copyrights for new year 2006
@
text
@d36 1
a36 1
Release:      20051016
d49 2
a50 2
BuildPreReq:  OpenPKG, openpkg >= 20040130, gcc, make
PreReq:       OpenPKG, openpkg >= 20040130
@


1.12.2.1
log
@bump release numbers for OpenPKG 2.20060622 in advance
@
text
@d36 1
a36 1
Release:      2.20060622
d49 2
a50 2
BuildPreReq:  OpenPKG, openpkg >= 2.20060622, gcc, make
PreReq:       OpenPKG, openpkg >= 2.20060622
@


1.12.2.2
log
@Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class)
@
text
@d30 2
a31 2
Packager:     OpenPKG Foundation e.V.
Distribution: OpenPKG Community
d33 1
a33 1
Group:        Auditing
d36 1
a36 1
Release:      2.20061018
d49 2
a50 2
BuildPreReq:  OpenPKG, openpkg >= 2.20061018, gcc, make
PreReq:       OpenPKG, openpkg >= 2.20061018
@


1.11
log
@requires GNU make
@
text
@d3 2
a4 2
##  Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
##  Copyright (c) 2000-2005 Ralf S. Engelschall <http://engelschall.com/>
@


1.10
log
@seems to require gcc
@
text
@d36 1
a36 1
Release:      20051015
d49 1
a49 1
BuildPreReq:  OpenPKG, openpkg >= 20040130, gcc
@


1.9
log
@Adjust the copyright declaration in this (RSE's) copy of the OpenPKG
source code now that the fork point for C&W was established (CVS tag
OPENPKG_CW_FP), the shared copyright agreement between RSE and C&W is
no longer active (as C&W no longer officially sponsors OpenPKG) and the
new shared copyright from RSE can be taken over by the newly established
juristic entity OpenPKG Foundation e.V. (instead of the non-juristic
entity OpenPKG Project).
@
text
@d36 1
a36 1
Release:      20050218
d49 1
a49 1
BuildPreReq:  OpenPKG, openpkg >= 20040130
@


1.9.4.1
log
@bump release numbers for OpenPKG 2.5
@
text
@d36 1
a36 1
Release:      2.5.0
d49 2
a50 2
BuildPreReq:  OpenPKG, openpkg >= 2.5.0
PreReq:       OpenPKG, openpkg >= 2.5.0
@


1.9.4.2
log
@MFC: seems to require gcc
@
text
@d49 1
a49 1
BuildPreReq:  OpenPKG, openpkg >= 2.5.0, gcc
@


1.9.4.3
log
@MFC: requires GNU make
@
text
@d49 1
a49 1
BuildPreReq:  OpenPKG, openpkg >= 2.5.0, gcc, make
@


1.9.2.1
log
@bump release numbers for OpenPKG 2.4
@
text
@d36 1
a36 1
Release:      2.4.0
d49 2
a50 2
BuildPreReq:  OpenPKG, openpkg >= 2.4.0
PreReq:       OpenPKG, openpkg >= 2.4.0
@


1.8
log
@bless for PLUS class
@
text
@d2 3
a4 4
##  softflowd.spec -- OpenPKG RPM Specification
##  Copyright (c) 2000-2005 The OpenPKG Project <http://www.openpkg.org/>
##  Copyright (c) 2000-2005 Ralf S. Engelschall <rse@@engelschall.com>
##  Copyright (c) 2000-2005 Cable & Wireless <http://www.cw.com/>
d30 1
a30 1
Packager:     The OpenPKG Project
@


1.8.2.1
log
@bump release numbers for OpenPKG 2.3
@
text
@d37 1
a37 1
Release:      2.3.0
d50 2
a51 2
BuildPreReq:  OpenPKG, openpkg >= 2.3.0
PreReq:       OpenPKG, openpkg >= 2.3.0
@


1.7
log
@upgrading package: softflowd 0.9.6 -> 0.9.7
@
text
@d33 1
a33 1
Class:        EVAL
d37 1
a37 1
Release:      20050115
@


1.6
log
@Happy New Year 2005
@
text
@d36 2
a37 2
Version:      0.9.6
Release:      20041227
@


1.5
log
@fix run-time user and run-time directory
@
text
@d3 3
a5 3
##  Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
##  Copyright (c) 2000-2004 Ralf S. Engelschall <rse@@engelschall.com>
##  Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
@


1.4
log
@backout the 'any' change: it doesn't work as expected
@
text
@d84 4
d107 1
a107 1
        $RPM_BUILD_ROOT%{l_prefix}/var/softflowd
d127 2
a128 1
        '%config %{l_prefix}/etc/fsl/fsl.softflowd'
@


1.3
log
@by default listen on all interfaces
@
text
@d37 1
a37 1
Release:      20041223
@


1.2
log
@add usual install/upgrade/erase scriptlets
@
text
@d37 1
a37 1
Release:      20041216
@


1.1
log
@new package: softflowd 0.9.6 (NetFlow-capable Network Traffic Analyser)
@
text
@d37 1
a37 1
Release:      20041215
d130 14
@

