sav.spec 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. ##
  2. ## sav.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package versions
  26. %define V_full 3.56
  27. %define V_short 356
  28. # package information
  29. Name: sav
  30. Summary: SOPHOS Anti-Virus
  31. URL: http://www.sophos.com/
  32. Vendor: SOPHOS
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG [PRIV]
  35. Group: Filesystem
  36. License: Commercial/Free-Trail
  37. Version: %{V_full}
  38. Release: 20021122
  39. # list of sources
  40. Source0: http://www.sophos.com/downloads/ide/%{V_short}_ides.zip
  41. Source1: http://downloads.sophos.com/dp/full/freebsd.elf.tar.Z
  42. Source2: http://downloads.sophos.com/dp/full/linux.intel.libc6.tar.Z
  43. Source3: http://downloads.sophos.com/dp/full/solaris.sparc.tar.Z
  44. Source4: sweep.sh
  45. Source5: freebsd.libc.so.3
  46. # build information
  47. Prefix: %{l_prefix}
  48. BuildRoot: %{l_buildroot}
  49. BuildPreReq: OpenPKG, openpkg >= 20021120, infozip
  50. PreReq: OpenPKG, openpkg >= 20021120
  51. AutoReq: no
  52. AutoReqProv: no
  53. %description
  54. This is the free-trail version of the SOPHOS Anti-Virus
  55. command line virus scanner for Unix.
  56. %prep
  57. rm -rf sav-%{version}
  58. mkdir sav-%{version}
  59. cd sav-%{version}
  60. case "%{l_target}" in
  61. *-freebsd* ) engine="%{SOURCE1}" ;;
  62. *-linux* ) engine="%{SOURCE2}" ;;
  63. *-solaris* ) engine="%{SOURCE3}" ;;
  64. * ) echo "Sorry, platform %{l_target} not supported" 1>&2; exit 1 ;;
  65. esac
  66. %{l_gzip} -d -c $engine | %{l_tar} xf -
  67. ( mkdir ides; cd ides;
  68. %{l_prefix}/bin/unzip -x %{SOURCE0}
  69. )
  70. %build
  71. # no-op
  72. %install
  73. rm -rf $RPM_BUILD_ROOT
  74. cd sav-%{version}
  75. %{l_shtool} mkdir -f -p -m 755 \
  76. $RPM_BUILD_ROOT%{l_prefix}/bin \
  77. $RPM_BUILD_ROOT%{l_prefix}/etc/sav \
  78. $RPM_BUILD_ROOT%{l_prefix}/libexec/sav \
  79. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  80. ( cd sav-install
  81. chmod u+w install.sh
  82. %{l_shtool} subst -e 's;chown;true;g' -e 's;chgrp;true;g' install.sh
  83. %{l_bash} install.sh -readytogo -v \
  84. -d $RPM_BUILD_ROOT%{l_prefix} \
  85. -b $RPM_BUILD_ROOT%{l_prefix}/libexec/sav \
  86. -l $RPM_BUILD_ROOT%{l_prefix}/libexec/sav \
  87. -m $RPM_BUILD_ROOT%{l_prefix}/man \
  88. -s $RPM_BUILD_ROOT%{l_prefix}/share/sav \
  89. -ni -nssi -nrm
  90. )
  91. for ide in ides/*.ide; do
  92. %{l_shtool} install -c -m 644 \
  93. $ide $RPM_BUILD_ROOT%{l_prefix}/share/sav/
  94. done
  95. case "%{l_target}" in
  96. *-freebsd* )
  97. %{l_shtool} install -c -m 755 \
  98. %{SOURCE freebsd.libc.so.3} \
  99. $RPM_BUILD_ROOT%{l_prefix}/libexec/sav/libc.so.3
  100. ;;
  101. esac
  102. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  103. %{SOURCE sweep.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/sweep
  104. %{l_rpmtool} files -v -o files -r$RPM_BUILD_ROOT %{l_files_std}
  105. %files -f sav-%{version}/files
  106. %clean
  107. rm -rf $RPM_BUILD_ROOT