ruby-xmlparser-vl.spec 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. %define oname xmlparser
  2. %define libdir %(ruby -r rbconfig -e 'print Config::CONFIG["libdir"]')
  3. %define archdir %(ruby -r rbconfig -e 'print Config::CONFIG["archdir"]')
  4. Name: ruby-xmlparser
  5. Version: 0.6.1
  6. Release: 0vl2
  7. Copyright: distributable
  8. Group: Development/Languages
  9. Source: http://www.yoshidam.net/%{oname}-%{version}.tar.gz
  10. URL: http://www.yoshidam.net/Ruby.html#xmlparser
  11. Prefix: /usr
  12. BuildRoot: %{_tmppath}/%{oname}-%{version}-root
  13. BuildPreReq: ruby, ruby-devel >= 1.6.4-0vl3, diffutils
  14. BuildRequires: expat-devel
  15. Summary: The interface of expat for the scripting language Ruby.
  16. Summary(ja): Ruby用のexpatインタフェース
  17. %description
  18. This is the module to access to James Clark's XML Parser Toolkit "expat"
  19. <URL:http://www.jclark.com/xml/expat.html> from Ruby.
  20. %description -l ja
  21. RubyからJames ClarkのXMLパーザツールキットであるexpatを利用するための
  22. クラスライブラリです.
  23. %prep
  24. %setup -q -c
  25. %build
  26. cd %{oname}
  27. ruby extconf.rb
  28. make
  29. cd ..
  30. %install
  31. rm -rf ${RPM_BUILD_ROOT}
  32. mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
  33. # installing binaries ...
  34. cd %{oname}
  35. make install DESTDIR=${RPM_BUILD_ROOT}
  36. cd ..
  37. (find \
  38. $RPM_BUILD_ROOT%{_libdir} \
  39. -type f -o -type l) |
  40. sort | sed -e "s,^$RPM_BUILD_ROOT,," > ruby-xmlparser.files
  41. # fixing `#!' paths
  42. mkdir -p tmp/samples
  43. (cd %{oname}/samples && tar cf - .) | (cd tmp/samples && tar xf -)
  44. for f in `find tmp/samples -type f`
  45. do
  46. cp -p $f $f.n
  47. sed -e 's,^#![ ]*\([^ ]*\)/\(ruby\|with\|perl\|env\),#!/usr/bin/\2,' < $f > $f.n
  48. if cmp -s $f $f.n
  49. then
  50. rm -f $f.n
  51. else
  52. mv -f $f.n $f
  53. fi
  54. done
  55. %clean
  56. rm -f ruby-xmlparser.files
  57. rm -rf tmp
  58. rm -rf ${RPM_BUILD_ROOT}
  59. %pre
  60. %post
  61. %files -f ruby-xmlparser.files
  62. %defattr(-, root, root)
  63. %doc %{oname}/README
  64. %doc %{oname}/README.ja
  65. %doc %{oname}/Encodings
  66. %doc tmp/samples
  67. %changelog
  68. * Sun Oct 14 2001 akira yamada <akira@vinelinux.org> 0.6.1-0vl2
  69. - fixed shbang line of sample scripts.
  70. * Sun Oct 14 2001 akira yamada <akira@vinelinux.org> 0.6.1-0vl1
  71. - Initial packaging.