ripe-asused.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. ##
  2. ## ripe-asused.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 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 [EVAL]
  32. Group: Network
  33. License: RIPE NCC
  34. Version: 3.72
  35. Release: 20031128
  36. # list of sources
  37. Source0: ftp://ftp.ripe.net/tools/asused-%{version}.tar.gz
  38. Source1: asused.conf
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20030103, perl, perl-openpkg
  43. PreReq: OpenPKG, openpkg >= 20030103, perl
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. Asused is a tool for ISP IP administrators to check various aspects
  48. of IP allocations and assigments of Autonomous Systems (AS) as
  49. stored in the RIPE NCC database.
  50. %prep
  51. %setup -q -n asused-%{version}
  52. %build
  53. %install
  54. # install program
  55. rm -rf $RPM_BUILD_ROOT
  56. %{l_prefix}/bin/perl-openpkg prolog
  57. %{l_prefix}/bin/perl-openpkg install
  58. # install manual page
  59. eval `%{l_prefix}/bin/perl -V:installarchlib -V:installprivlib -V:installsitearch -V:installsitelib`
  60. %{l_prefix}/bin/pod2man $RPM_BUILD_ROOT$installsitelib/asused.pod >asused.1
  61. rm -f $RPM_BUILD_ROOT$installsitelib/asused.pod
  62. %{l_shtool} mkdir -f -p -m 755 \
  63. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  64. %{l_shtool} install -c -m 644 \
  65. asused.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  66. # post-adjust installation files
  67. %{l_shtool} subst \
  68. -e "s;-Iblib/lib;;" \
  69. -e "s;'asused.conf';'%{l_prefix}/etc/ripe-asused/asused.conf';" \
  70. $RPM_BUILD_ROOT%{l_prefix}/bin/asused
  71. # install default configuration
  72. %{l_shtool} mkdir -f -p -m 755 \
  73. $RPM_BUILD_ROOT%{l_prefix}/etc/ripe-asused
  74. %{l_shtool} install -c -m 644 \
  75. %{SOURCE asused.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/ripe-asused/
  76. # post-processing of installation tree
  77. %{l_prefix}/bin/perl-openpkg epilog
  78. rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3
  79. # determine installation files
  80. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  81. %{l_files_std} \
  82. '%config %{l_prefix}/etc/ripe-asused/*' \
  83. '%not %dir %{l_prefix}/lib/perl' \
  84. '%not %dir %{l_prefix}/lib/perl/*' \
  85. "%not %dir $installarchlib" \
  86. "%not %dir $installprivlib" \
  87. "%not %dir $installsitearch" \
  88. "%not %dir $installsitelib" \
  89. "%not %dir $installarchlib/auto" \
  90. "%not %dir $installprivlib/auto" \
  91. "%not %dir $installsitearch/auto" \
  92. "%not %dir $installsitelib/auto"
  93. %files -f files
  94. %clean
  95. rm -rf $RPM_BUILD_ROOT