uvscan.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. ##
  2. ## uvscan.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_engine 4.1.6
  27. %define V_engine_dist1 4.16
  28. %define V_engine_dist2 416
  29. %define V_datfiles 4240
  30. # package information
  31. Name: uvscan
  32. Summary: McAfee VirusScan
  33. URL: http://www.mcafee-at-home.com/
  34. Vendor: Network Associates, Inc (NAI)
  35. Packager: The OpenPKG Project
  36. Distribution: OpenPKG [PRIV]
  37. Group: Filesystem
  38. License: Commercial/Free-Trial
  39. Version: %{V_engine}.%{V_datfiles}
  40. Release: 20021231
  41. # list of sources
  42. Source0: ftp://ftp.nai.com/pub/antivirus/datfiles/4.x/dat-%{V_datfiles}.tar
  43. Source1: http://download.nai.com/products/evaluation/virusscan/english/cmdline/bsd/version_%{V_engine_dist1}/vbsd%{V_engine_dist2}e.tar.Z
  44. Source2: http://download.nai.com/products/evaluation/virusscan/english/cmdline/linux/version_%{V_engine_dist}/vlnx%{V_engine_dist2}e.tar.Z
  45. Source3: http://download.nai.com/products/evaluation/virusscan/english/cmdline/sun/version_%{V_engine_dist}/vsun%{V_engine_dist2}e.tar.Z
  46. Source4: uvscan.sh
  47. # build information
  48. Prefix: %{l_prefix}
  49. BuildRoot: %{l_buildroot}
  50. BuildPreReq: OpenPKG, openpkg >= 20021230
  51. PreReq: OpenPKG, openpkg >= 20021230
  52. AutoReq: no
  53. AutoReqProv: no
  54. %description
  55. This is the free-trail version of the NAI McAfee VirusScan 4
  56. command line virus scanner for Unix.
  57. %options
  58. %prep
  59. rm -rf uvscan-%{version}
  60. mkdir uvscan-%{version}
  61. cd uvscan-%{version}
  62. case "%{l_target}" in
  63. *-freebsd* ) engine="%{SOURCE1}" ;;
  64. *-linux* ) engine="%{SOURCE2}" ;;
  65. *-solaris* ) engine="%{SOURCE3}" ;;
  66. * ) echo "Sorry, platform %{l_target} not supported" 1>&2; exit 1 ;;
  67. esac
  68. ( mkdir engine; cd engine
  69. %{l_gzip} -d -c $engine | %{l_tar} xf -
  70. )
  71. ( mkdir datfiles; cd datfiles;
  72. %{l_tar} xf %{SOURCE0}
  73. )
  74. %build
  75. # no-op
  76. %install
  77. rm -rf $RPM_BUILD_ROOT
  78. cd uvscan-%{version}
  79. %{l_shtool} mkdir -f -p -m 755 \
  80. $RPM_BUILD_ROOT%{l_prefix}/bin \
  81. $RPM_BUILD_ROOT%{l_prefix}/libexec/uvscan \
  82. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  83. cp datfiles/*.dat engine/
  84. ( cd engine
  85. (echo "n"; echo "n"; echo "n"; echo "n"; echo "n") |\
  86. ./install-uvscan $RPM_BUILD_ROOT%{l_prefix}/libexec/uvscan/
  87. )
  88. rm -f $RPM_BUILD_ROOT%{l_prefix}/libexec/uvscan/uninstall-uvscan
  89. mv $RPM_BUILD_ROOT%{l_prefix}/libexec/uvscan/uvscan.1 \
  90. $RPM_BUILD_ROOT%{l_prefix}/man/man1/uvscan.1
  91. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  92. %{SOURCE uvscan.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/uvscan
  93. %{l_rpmtool} files -v -o files -r$RPM_BUILD_ROOT %{l_files_std}
  94. %files -f uvscan-%{version}/files
  95. %clean
  96. rm -rf $RPM_BUILD_ROOT