head	1.11;
access;
symbols
	OPENPKG_E1_MP_HEAD:1.9
	OPENPKG_E1_MP:1.9
	OPENPKG_E1_MP_2_STABLE:1.8.2.2
	OPENPKG_E1_FP:1.8.2.2
	OPENPKG_2_STABLE_MP:1.8
	OPENPKG_2_STABLE_20061018:1.8.2.2
	OPENPKG_2_STABLE:1.8.0.2
	OPENPKG_CW_FP:1.2;
locks; strict;
comment	@-- @;


1.11
date	2009.04.18.13.10.20;	author rse;	state Exp;
branches;
next	1.10;
commitid	4pHXU27WTIGCZuKt;

1.10
date	2008.01.01.14.53.52;	author rse;	state Exp;
branches;
next	1.9;
commitid	B8esaHJHoduuKILs;

1.9
date	2007.01.01.17.37.53;	author rse;	state Exp;
branches;
next	1.8;
commitid	BicZD6VUl7GuqP0s;

1.8
date	2006.10.13.17.28.02;	author thl;	state Exp;
branches
	1.8.2.1;
next	1.7;
commitid	q5GSxzsSDX29XxQr;

1.7
date	2006.09.24.13.52.20;	author rse;	state Exp;
branches;
next	1.6;
commitid	flcSW6zFeRYLo5Or;

1.6
date	2006.08.25.19.16.30;	author rse;	state Exp;
branches;
next	1.5;
commitid	Tvsj1UyQ8rQ89gKr;

1.5
date	2006.01.11.13.41.58;	author rse;	state Exp;
branches;
next	1.4;
commitid	VYnyjnrYM6Ipzbhr;

1.4
date	2006.01.01.13.13.37;	author rse;	state Exp;
branches;
next	1.3;
commitid	otZG8yKMCw1JFTfr;

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

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

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

1.8.2.1
date	2006.10.13.17.28.02;	author rse;	state dead;
branches;
next	1.8.2.2;
commitid	iZxwRSmmWscPXUQr;

1.8.2.2
date	2006.10.16.14.50.02;	author rse;	state Exp;
branches;
next	;
commitid	iZxwRSmmWscPXUQr;


desc
@@


1.11
log
@bump years in copyright messages
@
text
@##
##  flowscan.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 versions
%define       V_flowscan     1.006
%define       V_cuflow       1.7
%define       V_configreader 0.5

#   package information
Name:         flowscan
Summary:      NetFlow Scanning and Graphing Frontend
URL:          http://net.doit.wisc.edu/~plonka/FlowScan/
Vendor:       Dave Plonka
Packager:     OpenPKG Foundation e.V.
Distribution: OpenPKG Community
Class:        EVAL
Group:        Auditing
License:      GPL
Version:      %{V_flowscan}
Release:      20080101

#   list of sources
Source0:      http://net.doit.wisc.edu/~plonka/FlowScan/FlowScan-%{V_flowscan}.tar.gz
Source1:      http://www.columbia.edu/acis/networks/advanced/CUFlow/CUFlow-%{V_cuflow}.tgz
Source2:      http://www.cpan.org/modules/by-module/ConfigReader/ConfigReader-%{V_configreader}.tar.gz
Source3:      rc.flowscan
Source4:      flowscan-apache.conf
Source5:      flowscan-cuflow.cf
Source6:      flowscan-queue.sh
Source7:      flowscan.cf
Patch0:       flowscan.patch

#   build information
Prefix:       %{l_prefix}
BuildRoot:    %{l_buildroot}
BuildPreReq:  OpenPKG, openpkg >= 20060823, perl-openpkg
PreReq:       OpenPKG, openpkg >= 20060823
BuildPreReq:  perl, perl-net, perl-xml, perl-sys, perl-crypto, perl-www
PreReq:       perl, perl-net, perl-xml, perl-sys, perl-crypto, perl-www
BuildPreReq:  rrdtool, flowtools, flowtools::with_perl = yes
PreReq:       rrdtool, flowtools, flowtools::with_perl = yes
AutoReq:      no
AutoReqProv:  no

%description
    FlowScan analyzes and reports on Internet Protocol (IP) flow data
    exported by network components. FlowScan binds together a NetFlow
    collection engine, a high performance database, and a visualization
    tool. FlowScan produces graph images that provide a continuous, near
    real-time view of the network traffic.

%track
    prog flowscan = {
        version   = %{V_flowscan}
        url       = http://net.doit.wisc.edu/~plonka/FlowScan/
        regex     = FlowScan-(__VER__)\.tar\.gz
    }
    prog flowscan:cuflow = {
        version   = %{V_cuflow}
        url       = http://www.columbia.edu/acis/networks/advanced/CUFlow/
        regex     = CUFlow-(__VER__)\.tgz
    }
    prog flowscan:configreader = {
        version   = %{V_configreader}
        url       = http://www.cpan.org/modules/by-module/ConfigReader/
        regex     = ConfigReader-(__VER__)\.tar\.gz
    }

%prep
    %setup -q -c
    %setup -q -D -T -a 1
    %setup -q -D -T -a 2
    %patch -p0 -d FlowScan-%{V_flowscan}

%build

%install
    #   create installation hierarchy
    rm -rf $RPM_BUILD_ROOT
    %{l_shtool} mkdir -f -p -m 755 \
        $RPM_BUILD_ROOT%{l_prefix}/bin \
        $RPM_BUILD_ROOT%{l_prefix}/cgi \
        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
        $RPM_BUILD_ROOT%{l_prefix}/etc/flowscan \
        $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/ConfigReader \
        $RPM_BUILD_ROOT%{l_prefix}/var/flowscan/queue \
        $RPM_BUILD_ROOT%{l_prefix}/var/flowscan/cuflow/rrd \
        $RPM_BUILD_ROOT%{l_prefix}/var/flowscan/cuflow/web \
        $RPM_BUILD_ROOT%{l_prefix}/man/man1

    #   install ConfigReader module
    ( cd ConfigReader-%{V_configreader}
      %{l_shtool} install -c -m 644 \
          ConfigReader.pod $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/
      %{l_shtool} install -c -m 644 \
          DirectiveStyle.pm Spec.pm Values.pm \
          $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/ConfigReader/
    ) || exit $?

    #   install FlowScan components
    ( cd FlowScan-%{V_flowscan}
      perllib=$RPM_BUILD_ROOT%{l_prefix}/lib/flowscan \
      ./configure --prefix=%{l_prefix}
      %{l_shtool} install -c -m 755 \
          -e 's;use lib $FindBin::Bin;use lib "%{l_prefix}/lib/flowscan";' \
          -e 's;..FindBin::Bin./..FindBin::Script.\.cf;%{l_prefix}/etc/flowscan/flowscan.cf;' \
          flowscan $RPM_BUILD_ROOT%{l_prefix}/bin/
      %{l_shtool} install -c -m 755 \
          util/ip2hostname $RPM_BUILD_ROOT%{l_prefix}/bin/
      %{l_shtool} install -c -m 644 \
          FlowScan.pm $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/
      %{l_shtool} install -c -m 644 \
          -e 's;..FindBin::Bin./CampusIO\.cf;%{l_prefix}/etc/flowscan/flowscan-campusio.cf;' \
          CampusIO.pm $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/
      %{l_shtool} install -c -m 644 \
          -e 's;..FindBin::Bin./SubNetIO\.cf;%{l_prefix}/etc/flowscan/flowscan-subnetio.cf;' \
          SubNetIO.pm $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/
      %{l_shtool} install -c -m 644 %{l_value -s -a} \
          %{SOURCE flowscan.cf} $RPM_BUILD_ROOT%{l_prefix}/etc/flowscan/
      %{l_shtool} install -c -m 644 \
          cf/SubNetIO.cf $RPM_BUILD_ROOT%{l_prefix}/etc/flowscan/flowscan-subnetio.cf
      %{l_shtool} install -c -m 644 \
          cf/CampusIO.cf $RPM_BUILD_ROOT%{l_prefix}/etc/flowscan/flowscan-campusio.cf
    ) || exit $?

    #   install CUFlow reporting plugin
    ( cd CUFlow-%{V_cuflow}
      %{l_shtool} install -c -m 644 \
          -e 's;..FindBin::Bin./CUFlow\.cf;%{l_prefix}/etc/flowscan/flowscan-cuflow.cf;' \
          CUFlow.pm $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/
      %{l_shtool} install -c -m 644 %{l_value -s -a} \
          %{SOURCE flowscan-cuflow.cf} $RPM_BUILD_ROOT%{l_prefix}/etc/flowscan/
      %{l_shtool} install -c -m 755 \
          -e 's;#! /usr/bin/perl -w;#!%{l_prefix}/bin/perl;' \
          -e 's;/cflow/reports/rrds;%{l_prefix}/var/flowscan/cuflow/rrd;' \
          -e 's;Estimated Columbia University Campus;OpenPKG;' \
          CUGrapher.pl $RPM_BUILD_ROOT%{l_prefix}/cgi/flowscan-cuflow.cgi
    ) || exit $?

    #   install queuing program
    %{l_shtool} install -c -m 755 %{l_value -s -a} \
        %{SOURCE flowscan-queue.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/flowscan-queue

    #   install Apache configuration
    %{l_shtool} install -c -m 755 %{l_value -s -a} \
        %{SOURCE flowscan-apache.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/flowscan/

    #   install run-command script
    %{l_shtool} install -c -m 755 %{l_value -s -a} \
        %{SOURCE rc.flowscan} $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/flowscan/*' \
        '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/flowscan' \
        '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/flowscan/*' \
        '%attr(1777,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/flowscan/queue'

%files -f files

%clean
    rm -rf $RPM_BUILD_ROOT

%post
    if [ ".$1" = .1 ]; then
        #   add hook to Apache configuration
        apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf"
        if [ -f $apacheconf ]; then
            ( echo "Include $RPM_INSTALL_PREFIX/etc/flowscan/flowscan-apache.conf"
            ) | $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
                    -a -i "$RPM_INSTALL_PREFIX:flowscan" $apacheconf
        fi
    fi
    #   after upgrade, restart service
    [ $1 -eq 2 ] || exit 0
    eval `%{l_rc} flowscan status 2>/dev/null`
    [ ".$flowscan_active" = .yes ] && %{l_rc} flowscan restart
    exit 0

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

%postun
    if [ ".$1" = .0 ]; then
        #   remove hook from Apache configuration
        apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf"
        if [ -f $apacheconf ]; then
            $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
                -r -i "$RPM_INSTALL_PREFIX:flowscan" $apacheconf
        fi
    fi

@


1.10
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.9
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/>
d40 1
a40 1
Release:      20061013
@


1.8
log
@new world order for "Packager" and "Distribution" headers
@
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.8.2.1
log
@file flowscan.spec was added on branch OPENPKG_2_STABLE on 2006-10-16 14:50:02 +0000
@
text
@d1 221
@


1.8.2.2
log
@Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class)
@
text
@a0 221
##
##  flowscan.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 versions
%define       V_flowscan     1.006
%define       V_cuflow       1.7
%define       V_configreader 0.5

#   package information
Name:         flowscan
Summary:      NetFlow Scanning and Graphing Frontend
URL:          http://net.doit.wisc.edu/~plonka/FlowScan/
Vendor:       Dave Plonka
Packager:     OpenPKG Foundation e.V.
Distribution: OpenPKG Community
Class:        EVAL
Group:        Auditing
License:      GPL
Version:      %{V_flowscan}
Release:      2.20061018

#   list of sources
Source0:      http://net.doit.wisc.edu/~plonka/FlowScan/FlowScan-%{V_flowscan}.tar.gz
Source1:      http://www.columbia.edu/acis/networks/advanced/CUFlow/CUFlow-%{V_cuflow}.tgz
Source2:      http://www.cpan.org/modules/by-module/ConfigReader/ConfigReader-%{V_configreader}.tar.gz
Source3:      rc.flowscan
Source4:      flowscan-apache.conf
Source5:      flowscan-cuflow.cf
Source6:      flowscan-queue.sh
Source7:      flowscan.cf
Patch0:       flowscan.patch

#   build information
Prefix:       %{l_prefix}
BuildRoot:    %{l_buildroot}
BuildPreReq:  OpenPKG, openpkg >= 2.20061018, perl-openpkg
PreReq:       OpenPKG, openpkg >= 2.20061018
BuildPreReq:  perl, perl-net, perl-xml, perl-sys, perl-crypto, perl-www
PreReq:       perl, perl-net, perl-xml, perl-sys, perl-crypto, perl-www
BuildPreReq:  rrdtool, flowtools, flowtools::with_perl = yes
PreReq:       rrdtool, flowtools, flowtools::with_perl = yes
AutoReq:      no
AutoReqProv:  no

%description
    FlowScan analyzes and reports on Internet Protocol (IP) flow data
    exported by network components. FlowScan binds together a NetFlow
    collection engine, a high performance database, and a visualization
    tool. FlowScan produces graph images that provide a continuous, near
    real-time view of the network traffic.

%track
    prog flowscan = {
        version   = %{V_flowscan}
        url       = http://net.doit.wisc.edu/~plonka/FlowScan/
        regex     = FlowScan-(__VER__)\.tar\.gz
    }
    prog flowscan:cuflow = {
        version   = %{V_cuflow}
        url       = http://www.columbia.edu/acis/networks/advanced/CUFlow/
        regex     = CUFlow-(__VER__)\.tgz
    }
    prog flowscan:configreader = {
        version   = %{V_configreader}
        url       = http://www.cpan.org/modules/by-module/ConfigReader/
        regex     = ConfigReader-(__VER__)\.tar\.gz
    }

%prep
    %setup -q -c
    %setup -q -D -T -a 1
    %setup -q -D -T -a 2
    %patch -p0 -d FlowScan-%{V_flowscan}

%build

%install
    #   create installation hierarchy
    rm -rf $RPM_BUILD_ROOT
    %{l_shtool} mkdir -f -p -m 755 \
        $RPM_BUILD_ROOT%{l_prefix}/bin \
        $RPM_BUILD_ROOT%{l_prefix}/cgi \
        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
        $RPM_BUILD_ROOT%{l_prefix}/etc/flowscan \
        $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/ConfigReader \
        $RPM_BUILD_ROOT%{l_prefix}/var/flowscan/queue \
        $RPM_BUILD_ROOT%{l_prefix}/var/flowscan/cuflow/rrd \
        $RPM_BUILD_ROOT%{l_prefix}/var/flowscan/cuflow/web \
        $RPM_BUILD_ROOT%{l_prefix}/man/man1

    #   install ConfigReader module
    ( cd ConfigReader-%{V_configreader}
      %{l_shtool} install -c -m 644 \
          ConfigReader.pod $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/
      %{l_shtool} install -c -m 644 \
          DirectiveStyle.pm Spec.pm Values.pm \
          $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/ConfigReader/
    ) || exit $?

    #   install FlowScan components
    ( cd FlowScan-%{V_flowscan}
      perllib=$RPM_BUILD_ROOT%{l_prefix}/lib/flowscan \
      ./configure --prefix=%{l_prefix}
      %{l_shtool} install -c -m 755 \
          -e 's;use lib $FindBin::Bin;use lib "%{l_prefix}/lib/flowscan";' \
          -e 's;..FindBin::Bin./..FindBin::Script.\.cf;%{l_prefix}/etc/flowscan/flowscan.cf;' \
          flowscan $RPM_BUILD_ROOT%{l_prefix}/bin/
      %{l_shtool} install -c -m 755 \
          util/ip2hostname $RPM_BUILD_ROOT%{l_prefix}/bin/
      %{l_shtool} install -c -m 644 \
          FlowScan.pm $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/
      %{l_shtool} install -c -m 644 \
          -e 's;..FindBin::Bin./CampusIO\.cf;%{l_prefix}/etc/flowscan/flowscan-campusio.cf;' \
          CampusIO.pm $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/
      %{l_shtool} install -c -m 644 \
          -e 's;..FindBin::Bin./SubNetIO\.cf;%{l_prefix}/etc/flowscan/flowscan-subnetio.cf;' \
          SubNetIO.pm $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/
      %{l_shtool} install -c -m 644 %{l_value -s -a} \
          %{SOURCE flowscan.cf} $RPM_BUILD_ROOT%{l_prefix}/etc/flowscan/
      %{l_shtool} install -c -m 644 \
          cf/SubNetIO.cf $RPM_BUILD_ROOT%{l_prefix}/etc/flowscan/flowscan-subnetio.cf
      %{l_shtool} install -c -m 644 \
          cf/CampusIO.cf $RPM_BUILD_ROOT%{l_prefix}/etc/flowscan/flowscan-campusio.cf
    ) || exit $?

    #   install CUFlow reporting plugin
    ( cd CUFlow-%{V_cuflow}
      %{l_shtool} install -c -m 644 \
          -e 's;..FindBin::Bin./CUFlow\.cf;%{l_prefix}/etc/flowscan/flowscan-cuflow.cf;' \
          CUFlow.pm $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/
      %{l_shtool} install -c -m 644 %{l_value -s -a} \
          %{SOURCE flowscan-cuflow.cf} $RPM_BUILD_ROOT%{l_prefix}/etc/flowscan/
      %{l_shtool} install -c -m 755 \
          -e 's;#! /usr/bin/perl -w;#!%{l_prefix}/bin/perl;' \
          -e 's;/cflow/reports/rrds;%{l_prefix}/var/flowscan/cuflow/rrd;' \
          -e 's;Estimated Columbia University Campus;OpenPKG;' \
          CUGrapher.pl $RPM_BUILD_ROOT%{l_prefix}/cgi/flowscan-cuflow.cgi
    ) || exit $?

    #   install queuing program
    %{l_shtool} install -c -m 755 %{l_value -s -a} \
        %{SOURCE flowscan-queue.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/flowscan-queue

    #   install Apache configuration
    %{l_shtool} install -c -m 755 %{l_value -s -a} \
        %{SOURCE flowscan-apache.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/flowscan/

    #   install run-command script
    %{l_shtool} install -c -m 755 %{l_value -s -a} \
        %{SOURCE rc.flowscan} $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/flowscan/*' \
        '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/flowscan' \
        '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/flowscan/*' \
        '%attr(1777,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/flowscan/queue'

%files -f files

%clean
    rm -rf $RPM_BUILD_ROOT

%post
    if [ ".$1" = .1 ]; then
        #   add hook to Apache configuration
        apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf"
        if [ -f $apacheconf ]; then
            ( echo "Include $RPM_INSTALL_PREFIX/etc/flowscan/flowscan-apache.conf"
            ) | $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
                    -a -i "$RPM_INSTALL_PREFIX:flowscan" $apacheconf
        fi
    fi
    #   after upgrade, restart service
    [ $1 -eq 2 ] || exit 0
    eval `%{l_rc} flowscan status 2>/dev/null`
    [ ".$flowscan_active" = .yes ] && %{l_rc} flowscan restart
    exit 0

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

%postun
    if [ ".$1" = .0 ]; then
        #   remove hook from Apache configuration
        apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf"
        if [ -f $apacheconf ]; then
            $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
                -r -i "$RPM_INSTALL_PREFIX:flowscan" $apacheconf
        fi
    fi

@


1.7
log
@adjust Group header
@
text
@d35 2
a36 2
Packager:     OpenPKG
Distribution: OpenPKG
d41 1
a41 1
Release:      20060924
@


1.6
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
@d38 1
a38 1
Group:        Network
d41 1
a41 1
Release:      20060825
@


1.5
log
@modifying package: flowscan-1.006 20041218 -> 20060111
@
text
@d41 1
a41 1
Release:      20060111
d57 2
a58 2
BuildPreReq:  OpenPKG, openpkg >= 20040130, perl-openpkg
PreReq:       OpenPKG, openpkg >= 20040130
@


1.4
log
@adjust copyrights for new year 2006
@
text
@d27 1
a27 1
%define       V_cuflow       1.5
d41 1
a41 1
Release:      20041218
@


1.3
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
@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.2
log
@Happy New Year 2005
@
text
@d2 3
a4 4
##  flowscan.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/>
d35 1
a35 1
Packager:     The OpenPKG Project
@


1.1
log
@new package: flowscan 1.006 (NetFlow Scanning and Graphing Frontend)
@
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/>
@

