# 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.
#
Name: adaptx
Version: 0.9.13
Release: 12%{?dist}
Summary: AdaptX XSLT processor and XPath engine
License: BSD
Group: Applications/Text
# svn export http://svn.codehaus.org/castor/adaptx/tags/0.9.13/ adaptx-0.9.13-src
# tar cjf adaptx-0.9.13-src.tar.bz2 adaptx-0.9.13-src
Source0: %{name}-%{version}-src.tar.bz2
Patch0: %{name}-%{version}-xsl.patch
Patch1: %{name}-%{version}-missingstubs.patch
Patch2: %{name}-%{version}-build-xml.patch
Patch3: adaptx-0.9.13-no-enum-as-identifier.patch
URL: http://castor.codehaus.org/
BuildRequires: ant >= 0:1.6
BuildRequires: ant-nodeps
BuildRequires: jpackage-utils >= 0:1.6
BuildRequires: log4j
BuildRequires: xml-commons-apis
BuildRequires: xerces-j2
Requires: log4j
Requires: xml-commons-apis
Requires: xerces-j2
Requires: jpackage-utils
Requires(pre): jpackage-utils
Requires(postun): jpackage-utils
BuildArch: noarch
%description
Adaptx is an XSLT processor and XPath engine.
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
Requires: jpackage-utils
%description javadoc
Javadoc for %{name}.
%package doc
Summary: Documentation for %{name}
Group: Documentation
%description doc
Documentation for %{name}.
%prep
%setup -q -n %{name}-%{version}-src
# remove CVS internal files
for dir in `find . -type d -name CVS`; do rm -rf $dir; done
# remove all binary libs
for j in $(find . -name "*.jar"); do
mv $j $j.no
done
%patch0
%patch1
%patch2
%patch3 -p1
%build
perl -p -i -e 's|classic|modern|' src/build.xml
export CLASSPATH=$(build-classpath xml-commons-apis log4j xerces-j2)
ant -buildfile src/build.xml jar javadoc
CLASSPATH=$CLASSPATH:dist/adaptx_%{version}.jar
ant -buildfile src/build.xml doc
%install
rm -rf $RPM_BUILD_ROOT
# jar
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 dist/%{name}_%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr build/doc/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
rm -rf build/doc/javadoc
%files
%defattr(-,root,root,-)
%doc src/etc/{CHANGELOG,contributors.html,LICENSE}
%{_javadir}/*
%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}
%files doc
%defattr(-,root,root,-)
%doc build/doc/*
%changelog
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.13-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.13-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Tue Dec 21 2010 Alexander Kurtakov <akurtako@redhat.com> 0.9.13-10
- Fix FTBFS.
- Drop gcj.
- Adapt to current guidelines.
* Thu Mar 11 2010 Peter Lemenkov <lemenkov@gmail.com> - 0.9.13-9
- Added missing requires jpackage-utils
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.13-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.13-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Wed Jul 9 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.13-6
- drop repotag
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.13-5jpp.3
- Autorebuild for GCC 4.3
* Wed Oct 17 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.13-4jpp.3
- enum is a reserved keyword now, fix javadoc by not naming variables "enum"
* Wed Apr 18 2007 Permaine Cheung <pcheung@redhat.com> 0.9.13-4jpp.2
- Fixed the building of javadoc
* Wed Jan 31 2007 Deepak Bhole <dbhole@redhat.com> 0.9.13-4jpp.1
- Fixed issues raised by rpmlint
* Thu Aug 03 2006 Deepak Bhole <dbhole@redhat.com> 0:0.9.13-3jpp.1
- Added missing requirements.
* Sun Jul 23 2006 Deepak Bhole <dbhole@redhat.com> 0:0.9.13-2jpp_3fc
- Adding missing dependency
* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> - 0:0.9.13-2jpp_2fc
- Rebuilt
* Wed Jul 19 2006 Deepak Bhole <dbhole@redhat.com> 0:0.9.13-2jpp_1fc
- Add conditional native compiling.
* Mon Jun 19 2006 Ralph Apel <r.apel at r-apel.de> 0:0.9.13-1jpp
- Upgrade to 0.9.13
* Thu Aug 19 2004 Ralph Apel <r.apel at r-apel.de> 0:0.9.6-2jpp
- Build with ant-1.6.2
- Set xmlns in **/*.xsl
* Tue Sep 09 2003 David Walluck <david@anti-microsoft.org> 0:0.9.6-1jpp
- 0.9.6
- Nicolas wrote the last changelog entry, not me
- adaptx requires itself to build, so I added '--without-external' in case you need or
wish to use the included jar, but it defaults to '--with-external' (e.g., it defaults
to using the external jpackage version of the jar).
- use the modern, not the classic, compiler
- BuildRequires: xml-commons-apis for doc target
* Fri May 16 2003 Nicolas Mailhot <Nicolas.Mailhot at laPoste.net> 0:0.9.5-2jpp
- do not self-require for build :)
* Sat May 10 2003 David Walluck <david@anti-microsoft.org> 0:0.9.5-1jpp
- release