a62511f
# Copyright (c) 2000-2005, JPackage Project
a62511f
# All rights reserved.
a62511f
#
a62511f
# Redistribution and use in source and binary forms, with or without
a62511f
# modification, are permitted provided that the following conditions
a62511f
# are met:
a62511f
#
a62511f
# 1. Redistributions of source code must retain the above copyright
a62511f
#    notice, this list of conditions and the following disclaimer.
a62511f
# 2. Redistributions in binary form must reproduce the above copyright
a62511f
#    notice, this list of conditions and the following disclaimer in the
a62511f
#    documentation and/or other materials provided with the
a62511f
#    distribution.
a62511f
# 3. Neither the name of the JPackage Project nor the names of its
a62511f
#    contributors may be used to endorse or promote products derived
a62511f
#    from this software without specific prior written permission.
a62511f
#
a62511f
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
a62511f
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
a62511f
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
a62511f
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
a62511f
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
a62511f
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
a62511f
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
a62511f
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
a62511f
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
a62511f
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
a62511f
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
a62511f
#
a62511f
d005411
%define _with_gcj_support 1
d005411
a62511f
%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
a62511f
ef6d60d
Name:          adaptx
ef6d60d
Version:       0.9.13
a5961d5
Release:       9%{?dist}
ef6d60d
Summary:       AdaptX XSLT processor and XPath engine
ef6d60d
License:       BSD
ef6d60d
Group:         Applications/Text
ef6d60d
# svn export http://svn.codehaus.org/castor/adaptx/tags/0.9.13/ adaptx-0.9.13-src
ef6d60d
# tar cjf adaptx-0.9.13-src.tar.bz2 adaptx-0.9.13-src
ef6d60d
Source0:       %{name}-%{version}-src.tar.bz2
ef6d60d
ef6d60d
Patch0:        %{name}-%{version}-xsl.patch
ef6d60d
Patch1:        %{name}-%{version}-missingstubs.patch
Permaine Cheung f0cb27f
Patch2:        %{name}-%{version}-build-xml.patch
d516255
Patch3:        adaptx-0.9.13-no-enum-as-identifier.patch
ef6d60d
Url:           http://castor.codehaus.org/
ef6d60d
BuildRequires: ant >= 0:1.6
ef6d60d
BuildRequires: jpackage-utils >= 0:1.6
ef6d60d
BuildRequires: log4j
ef6d60d
BuildRequires: xml-commons-apis
ef6d60d
BuildRequires: xerces-j2
ef6d60d
Requires:      log4j
ef6d60d
Requires:      xml-commons-apis
ef6d60d
Requires:      xerces-j2
a5961d5
Requires:      jpackage-utils
ef6d60d
Requires(pre):    jpackage-utils
ef6d60d
Requires(postun): jpackage-utils
a62511f
%if ! %{gcj_support}
ef6d60d
BuildArch:    noarch
a62511f
%endif
ef6d60d
BuildRoot:    %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
cvsdist d023c50
a62511f
%if %{gcj_support}
ef6d60d
BuildRequires:    java-gcj-compat-devel
ef6d60d
Requires(post):   java-gcj-compat
ef6d60d
Requires(postun): java-gcj-compat
a62511f
%endif
a62511f
cvsdist d023c50
%description
gbenson 113897d
Adaptx is an XSLT processor and XPath engine.
cvsdist d023c50
cvsdist d023c50
%package javadoc
ef6d60d
Group:            Documentation
ef6d60d
Summary:          Javadoc for %{name}
a5961d5
Requires:         jpackage-utils
3632863
Requires(post):   /bin/rm,/bin/ln
3632863
Requires(postun): /bin/rm
cvsdist d023c50
cvsdist d023c50
%description javadoc
cvsdist d023c50
Javadoc for %{name}.
cvsdist d023c50
cvsdist d023c50
%package doc
ef6d60d
Summary:    Documentation for %{name}
ef6d60d
Group:      Documentation
cvsdist d023c50
cvsdist d023c50
%description doc
cvsdist d023c50
Documentation for %{name}.
cvsdist d023c50
cvsdist d023c50
%prep
a62511f
%setup -q -n %{name}-%{version}-src
cvsdist d023c50
# remove CVS internal files
cvsdist d023c50
for dir in `find . -type d -name CVS`; do rm -rf $dir; done
cvsdist d023c50
# remove all binary libs
a62511f
for j in $(find . -name "*.jar"); do
ef6d60d
    mv $j $j.no
a62511f
done
a62511f
a62511f
%patch0
a62511f
%patch1
Permaine Cheung f0cb27f
%patch2
d516255
%patch3 -p1
cvsdist d023c50
cvsdist d023c50
%build
cvsdist d023c50
perl -p -i -e 's|classic|modern|' src/build.xml
b17cb06
export CLASSPATH=$(build-classpath xml-commons-apis log4j xerces-j2)
a62511f
ant -buildfile src/build.xml jar javadoc
a62511f
CLASSPATH=$CLASSPATH:dist/adaptx_%{version}.jar
cvsdist d023c50
ant -buildfile src/build.xml doc
cvsdist d023c50
cvsdist d023c50
%install
ef6d60d
rm -rf $RPM_BUILD_ROOT
ef6d60d
cvsdist d023c50
# jar
cvsdist d023c50
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
cvsdist d023c50
install -m 644 dist/%{name}_%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
cvsdist d023c50
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} ${jar/-%{version}/}; done)
cvsdist d023c50
# javadoc
cvsdist d023c50
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cvsdist d023c50
cp -pr build/doc/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cvsdist d023c50
rm -rf build/doc/javadoc
cvsdist d023c50
a62511f
%if %{gcj_support}
a62511f
%{_bindir}/aot-compile-rpm
a62511f
%endif
a62511f
cvsdist d023c50
%clean
cvsdist d023c50
rm -rf $RPM_BUILD_ROOT
cvsdist d023c50
cvsdist d023c50
%post javadoc
cvsdist d023c50
rm -f %{_javadocdir}/%{name}
cvsdist d023c50
ln -s %{name}-%{version} %{_javadocdir}/%{name}
cvsdist d023c50
cvsdist d023c50
%postun javadoc
cvsdist d023c50
if [ "$1" = "0" ]; then
cvsdist d023c50
    rm -f %{_javadocdir}/%{name}
cvsdist d023c50
fi
cvsdist d023c50
a62511f
%post
a62511f
%if %{gcj_support}
a62511f
if [ -x %{_bindir}/rebuild-gcj-db ]
a62511f
then
a62511f
  %{_bindir}/rebuild-gcj-db
a62511f
fi
a62511f
%endif
a62511f
a62511f
%postun
a62511f
%if %{gcj_support}
a62511f
if [ -x %{_bindir}/rebuild-gcj-db ]
a62511f
then
a62511f
  %{_bindir}/rebuild-gcj-db
a62511f
fi
a62511f
%endif
a62511f
cvsdist d023c50
%files
cvsdist d023c50
%defattr(0664,root,root,0755)
cvsdist d023c50
%doc src/etc/{CHANGELOG,contributors.html,LICENSE}
cvsdist d023c50
%{_javadir}/*
cvsdist d023c50
a62511f
%if %{gcj_support}
3632863
%attr(-,root,root) %{_libdir}/gcj/%{name}
a62511f
%endif
a62511f
cvsdist d023c50
%files javadoc
cvsdist d023c50
%defattr(0664,root,root,0755)
cvsdist d023c50
%{_javadocdir}/%{name}-%{version}
cvsdist d023c50
cvsdist d023c50
%files doc
cvsdist d023c50
%defattr(0664,root,root,0755)
cvsdist d023c50
%doc build/doc/*
cvsdist d023c50
cvsdist d023c50
%changelog
a5961d5
* Thu Mar 11 2010 Peter Lemenkov <lemenkov@gmail.com> - 0.9.13-9
a5961d5
- Added missing requires jpackage-utils
a5961d5
d8a9e11
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.13-8
d8a9e11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
d8a9e11
f3a9b55
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.13-7
f3a9b55
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
f3a9b55
bbb062f
* Wed Jul  9 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.13-6
bbb062f
- drop repotag
bbb062f
9892aad
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.13-5jpp.3
9892aad
- Autorebuild for GCC 4.3
9892aad
d516255
* Wed Oct 17 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.13-4jpp.3
d516255
- enum is a reserved keyword now, fix javadoc by not naming variables "enum"
d516255
Permaine Cheung f0cb27f
* Wed Apr 18 2007 Permaine Cheung <pcheung@redhat.com> 0.9.13-4jpp.2
Permaine Cheung f0cb27f
- Fixed the building of javadoc
Permaine Cheung f0cb27f
ef6d60d
* Wed Jan 31 2007 Deepak Bhole <dbhole@redhat.com> 0.9.13-4jpp.1
ef6d60d
- Fixed issues raised by rpmlint
ef6d60d
3632863
* Thu Aug 03 2006 Deepak Bhole <dbhole@redhat.com> 0:0.9.13-3jpp.1
3632863
- Added missing requirements. 
3632863
b17cb06
* Sun Jul 23 2006 Deepak Bhole <dbhole@redhat.com> 0:0.9.13-2jpp_3fc
b17cb06
- Adding missing dependency
b17cb06
672a1f6
* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> - 0:0.9.13-2jpp_2fc
672a1f6
- Rebuilt
672a1f6
a62511f
* Wed Jul 19 2006 Deepak Bhole <dbhole@redhat.com> 0:0.9.13-2jpp_1fc
a62511f
- Add conditional native compiling.
gbenson a837ecc
a62511f
* Mon Jun 19 2006 Ralph Apel <r.apel at r-apel.de> 0:0.9.13-1jpp
a62511f
- Upgrade to 0.9.13
gbenson 5901768
a62511f
* Thu Aug 19 2004 Ralph Apel <r.apel at r-apel.de> 0:0.9.6-2jpp
a62511f
- Build with ant-1.6.2
a62511f
- Set xmlns in **/*.xsl
cvsdist d023c50
cvsdist d023c50
* Tue Sep 09 2003 David Walluck <david@anti-microsoft.org> 0:0.9.6-1jpp
cvsdist d023c50
- 0.9.6
cvsdist d023c50
- Nicolas wrote the last changelog entry, not me
cvsdist d023c50
- adaptx requires itself to build, so I added '--without-external' in case you need or
cvsdist d023c50
  wish to use the included jar, but it defaults to '--with-external' (e.g., it defaults
cvsdist d023c50
  to using the external jpackage version of the jar).
cvsdist d023c50
- use the modern, not the classic, compiler
cvsdist d023c50
- BuildRequires: xml-commons-apis for doc target
cvsdist d023c50
cvsdist d023c50
* Fri May 16 2003 Nicolas Mailhot <Nicolas.Mailhot at laPoste.net> 0:0.9.5-2jpp
cvsdist d023c50
- do not self-require for build :)
cvsdist d023c50
cvsdist d023c50
* Sat May 10 2003 David Walluck <david@anti-microsoft.org> 0:0.9.5-1jpp
cvsdist d023c50
- release