%define rblibdir %(ruby -r rbconfig -e 'print Config::CONFIG["rubylibdir"]')

Summary: pure Ruby implementation of a non-validating XML processor
Summary(ja): Ruby で実装された non-validating XML プロセッサ
Name: nqxml
Version: 1.1.3p1
Release: 1%{?_dist_release}
License: distributable
Group: Development/Libraries
Source: http://downloads.sourceforge.net/nqxml/%{name}-%{version}.tar.gz
URL: http://nqxml.sourceforge.net/
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: ruby
BuildRequires: ruby-devel >= 1.6.4-0vl3
Requires: libruby >= 1.6

%description
NQXML is a pure Ruby implementation of a non-validating XML processor. It
includes an XML tokenizer, a SAX-style streaming XML parser, a DOM-style
tree parser, and an XML writer. ``NQ'' stands for ``Not Quite''. There is
some limitations.

%description -l ja
NQXMLは完全にRubyだけで実装されたnon-validating XMLプロセッサです．
XMLトークン化，SAXスタイルでのパーズ，DOMスタイルでのパーズ，XML出
力が可能です．「NQ」は「Not Quite」を意味しており，いくつかの制限
事項があります．

%prep
%setup -q -c

%build

%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{rblibdir}

cd %{name}-%{version}
ruby install.rb --install-dir=${RPM_BUILD_ROOT}%{rblibdir}
cd ..

(find \
  $RPM_BUILD_ROOT%{rblibdir} \
      -type f -o -type l) | 
 sort | sed -e "s,^$RPM_BUILD_ROOT,," > nqxml.files

%clean
rm -f nqxml.files
rm -rf ${RPM_BUILD_ROOT}

%pre

%post

%files -f nqxml.files
%defattr(-, root, root)
%doc %{name}-%{version}/ChangeLog
%doc %{name}-%{version}/Credits
%doc %{name}-%{version}/INSTALL
%doc %{name}-%{version}/README
%doc %{name}-%{version}/TODO
%doc %{name}-%{version}/contrib/
%doc %{name}-%{version}/examples/
%doc %{name}-%{version}/tests/

%changelog
* Wed Mar 11 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.3p1-1
- updated to 1.1.3p1
- changed Group to Development/Libraries

* Wed Oct 08 2008 Shu KONNO <owa@bg.wakwak.com> 1.1.1-1vl5
- applied new versioning policy, spec in utf-8
- s/Copyright/License/

* Sun Oct 14 2001 akira yamada <akira@vinelinux.org> 1.1.1-0vl1
- Initial packaging.
