ripe-asused.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. ##
  2. ## ripe-asused.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: ripe-asused
  27. Summary: RIPE NCC Autonomous Systems Query
  28. URL: http://www.ripe.net/ripencc/pub-services/db/
  29. Vendor: RIPE NCC
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: EVAL
  33. Group: Network
  34. License: RIPE NCC
  35. Version: 3.72
  36. Release: 20040203
  37. # list of sources
  38. Source0: ftp://ftp.ripe.net/tools/asused-%{version}.tar.gz
  39. Source1: asused.conf
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130, perl, perl-openpkg >= 20040126
  44. PreReq: OpenPKG, openpkg >= 20040130, perl
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. Asused is a tool for ISP IP administrators to check various aspects
  49. of IP allocations and assigments of Autonomous Systems (AS) as
  50. stored in the RIPE NCC database.
  51. %track
  52. prog ripe-asused = {
  53. version = 3.72
  54. url = ftp://ftp.ripe.net/tools/
  55. regex = asused-(__VER__)\.tar\.gz
  56. }
  57. %prep
  58. %setup -q -n asused-%{version}
  59. %build
  60. %install
  61. # install program
  62. rm -rf $RPM_BUILD_ROOT
  63. %{l_prefix}/bin/perl-openpkg prepare
  64. # install manual page
  65. %{l_prefix}/bin/perl-openpkg configure build install
  66. eval `%{l_prefix}/bin/perl -V:installarchlib -V:installprivlib -V:installvendorarch -V:installvendorlib`
  67. %{l_prefix}/bin/pod2man $RPM_BUILD_ROOT$installvendorlib/asused.pod >asused.1
  68. rm -f $RPM_BUILD_ROOT$installvendorlib/asused.pod
  69. %{l_shtool} mkdir -f -p -m 755 \
  70. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  71. %{l_shtool} install -c -m 644 \
  72. asused.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  73. # post-adjust installation files
  74. %{l_shtool} subst \
  75. -e "s;-Iblib/lib;;" \
  76. -e "s;'asused.conf';'%{l_prefix}/etc/ripe-asused/asused.conf';" \
  77. $RPM_BUILD_ROOT%{l_prefix}/bin/asused
  78. # install default configuration
  79. %{l_shtool} mkdir -f -p -m 755 \
  80. $RPM_BUILD_ROOT%{l_prefix}/etc/ripe-asused
  81. %{l_shtool} install -c -m 644 \
  82. %{SOURCE asused.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/ripe-asused/
  83. # post-processing of installation tree
  84. rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3
  85. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  86. # determine installation files
  87. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  88. %{l_files_std} `cat perl-openpkg-files` \
  89. '%config %{l_prefix}/etc/ripe-asused/*'
  90. %files -f files
  91. %clean
  92. rm -rf $RPM_BUILD_ROOT