# Copyright (c) 2000-2009, JPackage Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the # distribution. # 3. Neither the name of the JPackage Project nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Name: nanoxml Version: 2.2.3 Release: 6%{?dist} Summary: Small XML parser for Java License: zlib Group: Development/Libraries BuildArch: noarch URL: http://nanoxml.cyberelf.be/ Source0: http://nanoxml.cyberelf.be/downloads/NanoXML-2.2.3.tar.gz Patch0: nanoxml-build.patch Patch1: nanoxml-compat-build.patch Requires: java Requires: jpackage-utils BuildRequires: java-devel >= 1.4.0 BuildRequires: jpackage-utils >= 1.5 BuildRequires: java-javadoc BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description The intent of NanoXML is to be a small parser which is easy to use. Although many features were added to NanoXML, it is very small. The full parser with builder fits in a JAR file of about 32K. %package lite Summary: Lite version of %{name} Group: Development/Libraries %description lite Lite version of %{name}. %package manual Summary: Manual for %{name} Group: Development/Libraries %description manual Documentation for %{name}. %package lite-manual Obsoletes: nanoxml-manual-lite <= 2.2.3-3jpp Provides: nanoxml-manual-lite > 2.2.3-3jpp Summary: Manual for the lite version of %{name} Group: Development/Libraries %description lite-manual Documentation for the lite version of %{name}. %package javadoc Summary: Javadoc for %{name} Group: Development/Libraries %description javadoc Javadoc for %{name}. %prep %setup -q -n NanoXML-%{version} %patch0 %patch1 find . -name "*.jar" -print0 | xargs -0 -r rm -fr %build sh ./build.sh %install rm -rf $RPM_BUILD_ROOT # jars install -dm 755 $RPM_BUILD_ROOT%{_javadir} install -pm 644 Output/%{name}-lite.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-lite-%{version}.jar install -pm 644 Output/%{name}-sax.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-sax-%{version}.jar install -pm 644 Output/%{name}.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) # javadoc rm -f $RPM_BUILD_ROOT/%{_javadocdir}/%{name} install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -pr Documentation/JavaDoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ln -s %{name}-%{version} $RPM_BUILD_ROOT/%{_javadocdir}/%{name} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{_javadir}/%{name}-%{version}.jar %{_javadir}/%{name}.jar %{_javadir}/%{name}-sax-%{version}.jar %{_javadir}/%{name}-sax.jar %files lite %defattr(-,root,root,-) %{_javadir}/%{name}-lite-%{version}.jar %{_javadir}/%{name}-lite.jar %files manual %defattr(-,root,root,-) %doc Documentation/NanoXML-Java/HTML %doc Documentation/NanoXML-Java/LaTeX/*.pdf %files lite-manual %defattr(-,root,root,-) %doc Documentation/NanoXML-Lite/HTML %doc Documentation/NanoXML-Lite/LaTeX/*.pdf %files javadoc %defattr(-,root,root,-) %doc %{_javadocdir}/%{name}-%{version} %ghost %doc %{_javadocdir}/%{name} %changelog * Sat Nov 7 2009 Michal Ingeli <mi@v3.sk> - 2.2.3-6 - Added jpackage copyright header, probably missing in 2.2.3-3jpp * Sun Nov 1 2009 Michal Ingeli <mi@v3.sk> - 2.2.3-5 - removed TeX sources from documentation - renamed manual-lite subpackage to lite-manual and obosletes original package from jpp - fixed default file modes to rely defaults * Sun Nov 1 2009 Michal Ingeli <mi@v3.sk> - 2.2.3-4 - make build.sh javac >=1.5 compatible, removed target java release, added source release 1.4 - allowed basic debug info - changed group * Mon Aug 23 2004 Fernando Nasser <fnasser@redhat.com> - 0:2.2.3-3jpp - Updated URL - Pro-forma rebuild with Ant 1.6.2 present * Sat Jan 10 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.2.3-2jpp - Add Epoch. - Change group to Text Processing/Markup/XML. - Add unversioned javadoc dir symlinks, mark javadoc as %%doc. - Install manual as normal %%doc, not into %%{_javadocdir}. - BuildRequires java-devel (not ant). - Don't use bundled SAX jar. * Sat Dec 27 2003 Thomas Leonard <tle@sirius.sued.tremium.de> - 2.2.3-1 - Initial build.