| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- ##
- ## sav.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 version
- %define V_engine 2.19
- %define V_ides_maj 3
- %define V_ides_min 81
- # package information
- Name: sav
- Summary: Sophos Anti-Virus
- URL: http://www.sophos.com/products/sav/
- Vendor: Sophos Plc.
- Packager: The OpenPKG Project
- Distribution: OpenPKG
- Class: EVAL
- Group: System
- License: Commercial/Free-Trial
- Version: %{V_engine}.%{V_ides_maj}%{V_ides_min}
- Release: 20040523
- # list of sources
- Source0: http://downloads.sophos.com/dp/full/freebsd.elf.tar.Z
- Source1: http://downloads.sophos.com/dp/full/linux.intel.libc6.tar.Z
- Source2: http://downloads.sophos.com/dp/full/solaris.sparc.tar.Z
- Source3: rc.sav
- Source4: sav.conf
- Source5: sweep.sh
- Source6: sweep.c
- Source7: sweep.mk
- %NoSource 0
- %NoSource 1
- %NoSource 2
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20040130, gcc
- PreReq: OpenPKG, openpkg >= 20040130, curl, infozip
- AutoReq: no
- AutoReqProv: no
- %description
- This is the free-trail version of the Sophos Anti-Virus virus
- scanner for Unix.
- %track
- prog sav:ides = {
- comment = "thl: vcheck url for tracking only; download url see spec, look for vdl-...dat in tarball"
- version = %{V_ides_maj}%{V_ides_min}
- url = http://www.sophos.com/downloads/ide/
- regex = (__VER__)_ides.zip
- }
- %prep
- %setup -q -T -c
- # select and decompress platform specific anti-virus engine
- case "%{l_platform -t}" in
- *-freebsd* ) engine="%{SOURCE freebsd.elf.tar.Z}" ;;
- *-linux* ) engine="%{SOURCE linux.intel.libc6.tar.Z}" ;;
- *-sunos* ) engine="%{SOURCE solaris.sparc.tar.Z}" ;;
- * ) echo "Sorry, platform %{l_platform -t} not supported" 1>&2; exit 1 ;;
- esac
- %{l_gzip} -d -c $engine | %{l_tar} xf -
- %build
- # build open(2) wrapper DSO
- # (for mapping hard-coded /etc/sav.conf to %{l_prefix}/etc/sav/sav.conf)
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
- %{SOURCE sweep.c} %{SOURCE sweep.mk} ./
- case "%{l_platform -t}" in
- *-freebsd* ) target="freebsd" ;;
- *-linux* ) target="linux" ;;
- *-sunos* ) target="solaris" ;;
- esac
- %{l_make} %{l_mflags} -f sweep.mk $target
- %install
- rm -rf $RPM_BUILD_ROOT
- # create directory structure
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/bin \
- $RPM_BUILD_ROOT%{l_prefix}/etc/sav \
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
- $RPM_BUILD_ROOT%{l_prefix}/lib/sav \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/sav \
- $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
- $RPM_BUILD_ROOT%{l_prefix}/var/sav/data
- # install open(2) wrapper library
- %{l_shtool} install -c -m 755 \
- sweep.so \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/sav/
- # install binary wrapper script
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
- %{SOURCE sweep.sh} \
- $RPM_BUILD_ROOT%{l_prefix}/bin/sweep
- # install run-command script
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
- %{SOURCE rc.sav} \
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
- # install default configuration
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
- %{SOURCE sav.conf} \
- $RPM_BUILD_ROOT%{l_prefix}/etc/sav/
- # install SAVI library and add compatibility links
- %{l_shtool} install -c -m 755 \
- sav-install/libsavi.so* \
- $RPM_BUILD_ROOT%{l_prefix}/lib/sav/
- ( cd $RPM_BUILD_ROOT%{l_prefix}/lib/sav
- %{l_shtool} mkln -s -f libsavi.so.3.* libsavi.so.3
- %{l_shtool} mkln -s -f libsavi.so.3.* libsavi.so
- ) || exit $?
- # install original binary
- %{l_shtool} install -c -m 755 \
- sav-install/sweep \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/sav/sweep
- # install man page
- %{l_shtool} install -c -m 644 \
- sav-install/sweep.1 \
- $RPM_BUILD_ROOT%{l_prefix}/man/man1/
- # install virus description and identity files
- %{l_shtool} install -c -m 644 \
- sav-install/vdl-%{V_ides_maj}.%{V_ides_min}.dat \
- $RPM_BUILD_ROOT%{l_prefix}/var/sav/data/vdl.dat
- %{l_shtool} install -c -m 644 \
- sav-install/vdl*.vdb \
- $RPM_BUILD_ROOT%{l_prefix}/var/sav/data/
- # install message catalog
- %{l_shtool} install -c -m 644 \
- sav-install/swpmess.dat \
- $RPM_BUILD_ROOT%{l_prefix}/var/sav/data/
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- '%config %{l_prefix}/etc/sav/*'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|