fprot.spec 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. ##
  2. ## fprot.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.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 information
  26. Name: fprot
  27. Summary: F-Prot Anti-Virus
  28. URL: http://www.f-prot.com/
  29. Vendor: FRISK Software International
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: EVAL
  33. Group: Filesystem
  34. License: Commercial/Free-Private-Use
  35. Version: 4.4.8
  36. Release: 20041119
  37. # list of sources
  38. Source0: ftp://ftp.f-prot.com/pub/bsd/fp-freebsd-ws-%{version}.tar.gz
  39. Source1: ftp://ftp.f-prot.com/pub/linux/fp-linux-ws-%{version}.tar.gz
  40. Source2: ftp://ftp.f-prot.com/pub/solaris/fp-solaris-i386-ws-%{version}.tar.gz
  41. Source3: ftp://ftp.f-prot.com/pub/solaris/fp-solaris-sparc-ws-%{version}.tar.gz
  42. Source4: rc.fprot
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20040130
  47. PreReq: OpenPKG, openpkg >= 20040130, perl, perl-www, perl-net, infozip
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. F-PROT is the AntiVirus scanner from FRISK Software International.
  52. It is free for private use.
  53. %track
  54. prog fprot = {
  55. version = %{version}
  56. url = ftp://ftp.f-prot.com/pub/bsd/
  57. regex = fp-freebsd-ws-(__VER__)\.tar\.gz
  58. }
  59. %prep
  60. %setup -q -T -c
  61. # unpack platform-specific Engine
  62. case "%{l_platform -t}" in
  63. *-freebsd* ) engine="%{SOURCE0}" ;;
  64. *-linux* ) engine="%{SOURCE1}" ;;
  65. x?86-sunos* ) engine="%{SOURCE2}" ;;
  66. sun*-sunos* ) engine="%{SOURCE3}" ;;
  67. * ) echo "Sorry, platform %{l_platform -t} not supported" 1>&2; exit 1 ;;
  68. esac
  69. %{l_gzip} -d -c $engine | %{l_tar} xf -
  70. %build
  71. %install
  72. rm -rf $RPM_BUILD_ROOT
  73. %{l_shtool} mkdir -f -p -m 755 \
  74. $RPM_BUILD_ROOT%{l_prefix}/bin \
  75. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  76. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  77. $RPM_BUILD_ROOT%{l_prefix}/libexec/fprot \
  78. $RPM_BUILD_ROOT%{l_prefix}/share/fprot \
  79. $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  80. $RPM_BUILD_ROOT%{l_prefix}/man/man8
  81. %{l_shtool} install -c -s -m 755 \
  82. f-prot/f-prot $RPM_BUILD_ROOT%{l_prefix}/libexec/fprot/
  83. ln \
  84. $RPM_BUILD_ROOT%{l_prefix}/libexec/fprot/f-prot \
  85. $RPM_BUILD_ROOT%{l_prefix}/share/fprot/f-prot
  86. # intentionally execute f-prot through the link in the data directory
  87. ( echo "#!/bin/sh"
  88. echo "exec %{l_prefix}/share/fprot/f-prot \${1+\"\$@\"}"
  89. ) >f-prot.sh
  90. %{l_shtool} install -c -m 755 \
  91. f-prot.sh $RPM_BUILD_ROOT%{l_prefix}/bin/f-prot
  92. %{l_shtool} install -c -m 644 \
  93. f-prot/man_pages/f-prot.1 \
  94. $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  95. %{l_shtool} install -c -m 755 \
  96. -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;' \
  97. -e 's;/var/tmp/f-prot/;/tmp/fprot/;' \
  98. -e 's;/usr/local/f-prot/;%{l_prefix}/share/fprot;' \
  99. -e 's;"unzip;"%{l_prefix}/bin/unzip;g' \
  100. -e 's;> /dev/null;>/dev/null 2>\&1;g' \
  101. f-prot/tools/check-updates.pl \
  102. $RPM_BUILD_ROOT%{l_prefix}/sbin/f-prot-update
  103. %{l_shtool} install -c -m 644 \
  104. f-prot/man_pages/check-updates.pl.8 \
  105. $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  106. %{l_shtool} install -c -m 644 \
  107. f-prot/ENGLISH.TX0 f-prot/*.DEF \
  108. $RPM_BUILD_ROOT%{l_prefix}/share/fprot/
  109. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  110. %{SOURCE rc.fprot} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  111. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  112. %files -f files
  113. %clean
  114. rm -rf $RPM_BUILD_ROOT