# Copyright (c) 2000-2005, 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. # %define _with_gcj_support 1 %define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support: %{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support: %{_gcj_support}}%{!?_gcj_support:0}}} Summary: Small fast XML parser Name: piccolo Version: 1.04 Release: %mkrel 2.2.8 Epoch: 0 License: Apache Software License URL: http://piccolo.sourceforge.net/ Group: Development/Java Source0: piccolo-%{version}-src.zip Patch0: piccolo-build_xml.patch BuildRequires: java-rpmbuild >= 0:1.5.32 BuildRequires: ant >= 0:1.6 BuildRequires: ant-junit BuildRequires: junit Requires: jpackage-utils %if ! %{gcj_support} BuildArch: noarch %endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %if %{gcj_support} BuildRequires: java-gcj-compat-devel %endif %description Piccolo is a small, extremely fast XML parser for Java. It implements the SAX 1, SAX 2.0.1, and JAXP 1.1 (SAX parsing only) interfaces as a non-validating parser and attempts to detect all XML well-formedness errors. %package javadoc Summary: Javadoc for %{name} Group: Development/Java %description javadoc %{summary}. %prep %setup -q -T -c -n %{name}-%{version} cd .. unzip -q %{SOURCE0} cd %{name}-%{version} rm -r src/org src/javax %patch0 #Fix wrong-file-end-of-line-encoding sed -i 's/\r$//g' LICENSE.txt %build export OPT_JAR_LIST="ant/ant-junit junit" export CLASSPATH= ant -Dbuild.sysclasspath=first build javadoc %install rm -rf $RPM_BUILD_ROOT # jars mkdir -p $RPM_BUILD_ROOT%{_javadir} cp -p lib/Piccolo.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) # javadoc mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name} cp -pr doc/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} %if %{gcj_support} %{_bindir}/aot-compile-rpm %endif %clean rm -rf $RPM_BUILD_ROOT %if %{gcj_support} %post %{update_gcjdb} %postun %{clean_gcjdb} %endif %files %defattr(0644,root,root,0755) %doc LICENSE.txt %{_javadir}/%{name}.jar %{_javadir}/%{name}-%{version}.jar %if %{gcj_support} %dir %{_libdir}/gcj/%{name} %attr(-,root,root) %{_libdir}/gcj/%{name}/piccolo-1.04.jar.* %endif %files javadoc %defattr(0644,root,root,0755) %doc %{_javadocdir}/* # ----------------------------------------------------------------------------- %changelog * Sun Jan 13 2013 umeabot <umeabot> 0:1.04-2.2.8.mga3 + Revision: 377685 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Mon Jan 17 2011 dmorgan <dmorgan> 0:1.04-2.2.7.mga1 + Revision: 21571 - imported package piccolo