Procházet zdrojové kódy

new package: fprot 4.4.2 (F-Prot Anti-Virus)

Ralf S. Engelschall před 21 roky
rodič
revize
dfab5e0898
2 změnil soubory, kde provedl 162 přidání a 0 odebrání
  1. 126 0
      fprot/fprot.spec
  2. 36 0
      fprot/rc.fprot

+ 126 - 0
fprot/fprot.spec

@@ -0,0 +1,126 @@
+##
+##  fprot.spec -- OpenPKG RPM Specification
+##  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/>
+##
+##  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:         fprot
+Summary:      F-Prot Anti-Virus
+URL:          http://www.f-prot.com/
+Vendor:       FRISK Software International
+Packager:     The OpenPKG Project
+Distribution: OpenPKG
+Class:        EVAL
+Group:        Filesystem
+License:      Commercial/Free-Private-Use
+Version:      4.4.2
+Release:      20040526
+
+#   list of sources
+Source0:      ftp://ftp.f-prot.com/pub/bsd/fp-freebsd-ws-%{version}.tar.gz
+Source1:      ftp://ftp.f-prot.com/pub/linux/fp-linux-ws-%{version}.tar.gz
+Source2:      ftp://ftp.f-prot.com/pub/solaris/fp-solaris-i386-ws-%{version}.tar.gz
+Source3:      ftp://ftp.f-prot.com/pub/solaris/fp-solaris-sparc-ws-%{version}.tar.gz
+Source4:      rc.fprot
+
+#   build information
+Prefix:       %{l_prefix}
+BuildRoot:    %{l_buildroot}
+BuildPreReq:  OpenPKG, openpkg >= 20040130
+PreReq:       OpenPKG, openpkg >= 20040130, perl, perl-www, perl-net, infozip
+AutoReq:      no
+AutoReqProv:  no
+
+%description
+    F-PROT is the AntiVirus scanner from FRISK Software International.
+    It is free for private use.
+
+%track
+    prog fprot = {
+        version   = %{version}
+        url       = ftp://ftp.f-prot.com/pub/bsd/
+        regex     = fp-freebsd-ws-(__VER__)\.tar\.gz
+    }
+
+%prep
+    %setup -q -T -c
+
+    #   unpack platform-specific Engine
+    case "%{l_platform -t}" in
+        *-freebsd*  ) engine="%{SOURCE0}" ;;
+        *-linux*    ) engine="%{SOURCE1}" ;;
+        x?86-sunos* ) engine="%{SOURCE2}" ;;
+        sun*-sunos* ) engine="%{SOURCE3}" ;;
+        * ) echo "Sorry, platform %{l_platform -t} not supported" 1>&2; exit 1 ;;
+    esac
+    %{l_gzip} -d -c $engine | %{l_tar} xf -
+
+%build
+
+%install
+    rm -rf $RPM_BUILD_ROOT
+    %{l_shtool} mkdir -f -p -m 755 \
+        $RPM_BUILD_ROOT%{l_prefix}/bin \
+        $RPM_BUILD_ROOT%{l_prefix}/sbin \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
+        $RPM_BUILD_ROOT%{l_prefix}/libexec/fprot \
+        $RPM_BUILD_ROOT%{l_prefix}/share/fprot \
+        $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
+        $RPM_BUILD_ROOT%{l_prefix}/man/man8
+    %{l_shtool} install -c -s -m 755 \
+        f-prot/f-prot $RPM_BUILD_ROOT%{l_prefix}/libexec/fprot/
+    ln \
+        $RPM_BUILD_ROOT%{l_prefix}/libexec/fprot/f-prot \
+        $RPM_BUILD_ROOT%{l_prefix}/share/fprot/f-prot
+    #   intentionally execute f-prot through the link in the data directory
+    ( echo "#!/bin/sh"
+      echo "exec %{l_prefix}/share/fprot/f-prot \${1+\"\$@\"}"
+    ) >f-prot.sh
+    %{l_shtool} install -c -m 755 \
+        f-prot.sh $RPM_BUILD_ROOT%{l_prefix}/bin/f-prot
+    %{l_shtool} install -c -m 644 \
+        f-prot/man_pages/f-prot.1 \
+        $RPM_BUILD_ROOT%{l_prefix}/man/man1/
+    %{l_shtool} install -c -m 755 \
+        -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;' \
+        -e 's;/var/tmp/f-prot/;/tmp/fprot/;' \
+        -e 's;/usr/local/f-prot/;%{l_prefix}/share/fprot;' \
+        -e 's;"unzip;"%{l_prefix}/bin/unzip;g' \
+        -e 's;> /dev/null;>/dev/null 2>\&1;g' \
+        f-prot/tools/check-updates.pl \
+        $RPM_BUILD_ROOT%{l_prefix}/sbin/f-prot-update
+    %{l_shtool} install -c -m 644 \
+        f-prot/man_pages/check-updates.pl.8 \
+        $RPM_BUILD_ROOT%{l_prefix}/man/man8/
+    %{l_shtool} install -c -m 644 \
+        f-prot/ENGLISH.TX0 f-prot/*.DEF \
+        $RPM_BUILD_ROOT%{l_prefix}/share/fprot/
+    %{l_shtool} install -c -m 755 %{l_value -s -a} \
+        %{SOURCE rc.fprot} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
+    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+
+%files -f files
+
+%clean
+    rm -rf $RPM_BUILD_ROOT
+

+ 36 - 0
fprot/rc.fprot

@@ -0,0 +1,36 @@
+#!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc
+##
+##  rc.fprot -- Run-Commands
+##
+
+%config
+    fprot_enable="$openpkg_rc_def"
+    fprot_dats="ftp://ftp.f-prot.com/pub/"
+    fprot_update="daily"
+
+%common
+    fprot_update () {
+        rm -rf /tmp/fprot
+        @l_prefix@/sbin/f-prot-update -cron -quiet || exit $?
+        chmod 644 @l_prefix@/share/fprot/*.DEF
+        rm -rf /tmp/fprot
+    }
+
+%hourly -u @l_musr@
+    rcService fprot enable yes || exit 0
+    if [ ".$fprot_update" = .hourly ]; then
+        fprot_update || exit $?
+    fi
+
+%daily -u @l_musr@
+    rcService fprot enable yes || exit 0
+    if [ ".$fprot_update" = .daily ]; then
+        fprot_update || exit $?
+    fi
+
+%weekly -u @l_musr@
+    rcService fprot enable yes || exit 0
+    if [ ".$fprot_update" = .weekly ]; then
+        fprot_update || exit $?
+    fi
+