Blame SPECS/saxon.spec

3fb340
# Copyright (c) 2000-2005, JPackage Project
3fb340
# All rights reserved.
3fb340
#
3fb340
# Redistribution and use in source and binary forms, with or without
3fb340
# modification, are permitted provided that the following conditions
3fb340
# are met:
3fb340
#
3fb340
# 1. Redistributions of source code must retain the above copyright
3fb340
#    notice, this list of conditions and the following disclaimer.
3fb340
# 2. Redistributions in binary form must reproduce the above copyright
3fb340
#    notice, this list of conditions and the following disclaimer in the
3fb340
#    documentation and/or other materials provided with the
3fb340
#    distribution.
3fb340
# 3. Neither the name of the JPackage Project nor the names of its
3fb340
#    contributors may be used to endorse or promote products derived
3fb340
#    from this software without specific prior written permission.
3fb340
#
3fb340
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3fb340
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3fb340
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3fb340
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3fb340
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3fb340
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3fb340
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3fb340
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3fb340
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3fb340
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3fb340
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3fb340
#
3fb340
3fb340
Summary:        Java XPath, XSLT 2.0 and XQuery implementation
3fb340
Name:           saxon
3fb340
Version:        9.3.0.4
3fb340
Release:        11%{?dist}
3fb340
# net.sf.saxon.om.XMLChar is from ASL-licensed Xerces
3fb340
# net/sf/saxon/option/jdom/ is MPLv1.1
3fb340
# net/sf/saxon/serialize/codenorm/ is UCD
3fb340
# net/sf/saxon/expr/sort/GenericSorter.java is MIT
3fb340
# net/sf/saxon/expr/Tokenizer.java and few other bits are BSD
3fb340
License:        MPLv1.0 and MPLv1.1 and ASL 1.1 and UCD and MIT
3fb340
Group:          Applications/Text
3fb340
URL:            http://saxon.sourceforge.net/
3fb340
Source0:        https://downloads.sourceforge.net/project/saxon/Saxon-HE/9.3/saxon9-3-0-4source.zip
3fb340
Source1:        %{name}.saxon.script
3fb340
Source2:        %{name}.saxonq.script
3fb340
Source3:        %{name}.build.script
3fb340
Source4:        %{name}.1
3fb340
Source5:        %{name}q.1
3fb340
Source6:        https://downloads.sourceforge.net/project/saxon/Saxon-HE/9.3/saxon-resources9-3.zip
3fb340
Source7:        http://irrational.googlecode.com/svn/trunk/maven-repo/net/sf/saxon/saxon-he/9.3.0.4/saxon-he-9.3.0.4.pom
3fb340
Source8:        http://www.mozilla.org/MPL/1.0/index.txt#/mpl-1.0.txt
3fb340
Source9:        http://www.mozilla.org/MPL/1.0/index.txt#/mpl-1.1.txt
3fb340
BuildRequires:  unzip
3fb340
BuildRequires:  java-devel >= 1:1.6.0
3fb340
BuildRequires:  ant
3fb340
BuildRequires:  jpackage-utils >= 0:1.6
3fb340
BuildRequires:  bea-stax-api
3fb340
BuildRequires:  xml-commons-apis
3fb340
BuildRequires:  jdom >= 0:1.0-0.b7
3fb340
BuildRequires:  java-javadoc
3fb340
BuildRequires:  jdom-javadoc >= 0:1.0-0.b9.3jpp
3fb340
BuildRequires:  dom4j
3fb340
Requires:       jpackage-utils
3fb340
Requires:       bea-stax-api
3fb340
Requires:       bea-stax
3fb340
Requires:       chkconfig
3fb340
Provides:       jaxp_transform_impl = %{version}-%{release}
3fb340
3fb340
# Older versions were split into multile packages
3fb340
Obsoletes:  %{name}-xpath < %{version}-%{release}
3fb340
Obsoletes:  %{name}-xom < %{version}-%{release}
3fb340
Obsoletes:  %{name}-sql < %{version}-%{release}
3fb340
Obsoletes:  %{name}-jdom < %{version}-%{release}
3fb340
Obsoletes:  %{name}-dom < %{version}-%{release}
3fb340
3fb340
BuildArch:      noarch
3fb340
3fb340
%description
3fb340
Saxon HE is Saxonica's non-schema-aware implementation of the XPath 2.0,
3fb340
XSLT 2.0, and XQuery 1.0 specifications aligned with the W3C Candidate
3fb340
Recommendation published on 3 November 2005. It is a complete and
3fb340
conformant implementation, providing all the mandatory features of
3fb340
those specifications and nearly all the optional features.
3fb340
3fb340
3fb340
%package        manual
3fb340
Summary:        Manual for %{name}
3fb340
Group:          Applications/Text
3fb340
3fb340
%description    manual
3fb340
Manual for %{name}.
3fb340
3fb340
%package        javadoc
3fb340
Summary:        Javadoc for %{name}
3fb340
Group:          Documentation
3fb340
3fb340
%description    javadoc
3fb340
Javadoc for %{name}.
3fb340
3fb340
%package        demo
3fb340
Summary:        Demos for %{name}
3fb340
Group:          Applications/Text
3fb340
Requires:       %{name} = %{version}-%{release}
3fb340
3fb340
%description    demo
3fb340
Demonstrations and samples for %{name}.
3fb340
3fb340
%package        scripts
3fb340
Summary:        Utility scripts for %{name}
3fb340
Group:          Applications/Text
3fb340
Requires:       jpackage-utils >= 0:1.5
3fb340
Requires:       %{name} = %{version}-%{release}
3fb340
3fb340
%description    scripts
3fb340
Utility scripts for %{name}.
3fb340
3fb340
3fb340
%prep
3fb340
%setup -q -c
3fb340
3fb340
unzip -q %{SOURCE6}
3fb340
cp -p %{SOURCE3} ./build.xml
3fb340
3fb340
# deadNET
3fb340
rm -rf net/sf/saxon/dotnet
3fb340
3fb340
# Depends on XQJ (javax.xml.xquery)
3fb340
rm -rf net/sf/saxon/xqj
3fb340
3fb340
# XOM support is not wanted
3fb340
rm -rf ./doc/javadoc/net/sf/saxon/option/xom
3fb340
rm -rf ./net/sf/saxon/option/xom
3fb340
3fb340
# This requires a EE edition feature (com.saxonica.xsltextn)
3fb340
rm -rf net/sf/saxon/option/sql/SQLElementFactory.java
3fb340
3fb340
# cleanup unnecessary stuff we'll build ourselves
3fb340
rm -rf docs/api
3fb340
find . \( -name "*.jar" -name "*.pyc" \) -delete
3fb340
3fb340
cp %{SOURCE8} %{SOURCE9} .
3fb340
3fb340
%build
3fb340
mkdir -p build/classes
3fb340
cat >build/classes/edition.properties <
3fb340
config=net.sf.saxon.Configuration
3fb340
platform=net.sf.saxon.java.JavaPlatform
3fb340
EOF
3fb340
3fb340
export CLASSPATH=%(build-classpath xml-commons-apis jdom bea-stax-api dom4j)
3fb340
ant \
3fb340
  -Dj2se.javadoc=%{_javadocdir}/java \
3fb340
  -Djdom.javadoc=%{_javadocdir}/jdom
3fb340
3fb340
3fb340
%install
3fb340
rm -rf $RPM_BUILD_ROOT
3fb340
3fb340
# jars
3fb340
mkdir -p $RPM_BUILD_ROOT%{_javadir}
3fb340
cp -p build/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
3fb340
3fb340
# javadoc
3fb340
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
3fb340
cp -pr build/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
3fb340
3fb340
# demo
3fb340
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
3fb340
cp -pr samples/* $RPM_BUILD_ROOT%{_datadir}/%{name}
3fb340
3fb340
# scripts
3fb340
mkdir -p $RPM_BUILD_ROOT%{_bindir}
3fb340
install -p -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}
3fb340
install -p -m755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}q
3fb340
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
3fb340
install -p -m644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
3fb340
install -p -m644 %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/%{name}q.1
3fb340
3fb340
# jaxp_transform_impl ghost symlink
3fb340
ln -s %{_sysconfdir}/alternatives \
3fb340
  $RPM_BUILD_ROOT%{_javadir}/jaxp_transform_impl.jar
3fb340
3fb340
# a simple POM
3fb340
install -dm 755 $RPM_BUILD_ROOT%{_mavenpomdir}
3fb340
install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
3fb340
sed -i -e 's/saxon-he/saxon/' $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
3fb340
%add_maven_depmap JPP-%{name}.pom %{name}.jar
3fb340
3fb340
%post
3fb340
update-alternatives --install %{_javadir}/jaxp_transform_impl.jar \
3fb340
  jaxp_transform_impl %{_javadir}/%{name}.jar 25
3fb340
3fb340
%preun
3fb340
{
3fb340
  [ $1 -eq 0 ] || exit 0
3fb340
  update-alternatives --remove jaxp_transform_impl %{_javadir}/%{name}.jar
3fb340
} >/dev/null 2>&1 || :
3fb340
3fb340
%files
3fb340
%defattr(-,root,root,-)
3fb340
%doc mpl-1.0.txt mpl-1.1.txt
3fb340
%{_javadir}/%{name}.jar
3fb340
%{_mavenpomdir}/JPP-%{name}.pom
3fb340
%{_mavendepmapfragdir}/%{name}
3fb340
%ghost %{_javadir}/jaxp_transform_impl.jar
3fb340
3fb340
%files manual
3fb340
%defattr(-,root,root,-)
3fb340
%doc doc/*
3fb340
3fb340
%files javadoc
3fb340
%defattr(-,root,root,-)
3fb340
%doc %{_javadocdir}/%{name}
3fb340
3fb340
%files demo
3fb340
%defattr(-,root,root,-)
3fb340
%{_datadir}/%{name}
3fb340
3fb340
%files scripts
3fb340
%defattr(-,root,root,-)
3fb340
%{_bindir}/%{name}
3fb340
%{_bindir}/%{name}q
3fb340
%{_mandir}/man1/%{name}.1*
3fb340
%{_mandir}/man1/%{name}q.1*
3fb340
3fb340
3fb340
%changelog
3fb340
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 9.3.0.4-11
3fb340
- Mass rebuild 2013-12-27
3fb340
3fb340
* Wed Sep 25 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 9.3.0.4-10
3fb340
- Disable support for XOM
3fb340
3fb340
* Fri Jul 12 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 9.3.0.4-9
3fb340
- Remove workaround for rpm bug #646523
3fb340
3fb340
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 9.3.0.4-8
3fb340
- Rebuild to regenerate API documentation
3fb340
- Resolves: CVE-2013-1571
3fb340
3fb340
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.3.0.4-7
3fb340
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
3fb340
3fb340
* Thu Nov 15 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 9.3.0.4-6
3fb340
- Fix license tag properly to include all pieces and add comments
3fb340
3fb340
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.3.0.4-5
3fb340
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
3fb340
3fb340
* Wed Jul 11 2012 Andy Grimm <agrimm@gmail.com> - 9.3.0.4-4
3fb340
- Fix option syntax in scripts when using xml-commons-resolver (#831631)
3fb340
3fb340
* Wed Feb 15 2012 Andy Grimm <agrimm@gmail.com> - 9.3.0.4-3
3fb340
- Fix FTBFS (#791033)
3fb340
- Add a simple POM file
3fb340
3fb340
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.3.0.4-2
3fb340
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
3fb340
3fb340
* Thu Feb 17 2011 Alexander Kurtakov <akurtako@redhat.com> 9.3.0.4-1
3fb340
- Update to new upstream version.
3fb340
- Adapt to current guidelines.
3fb340
3fb340
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.2.0.3-2
3fb340
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
3fb340
3fb340
* Tue Nov 03 2009 Lubomir Rintel <lkundrak@v3.sk> - 9.2.0.3-1
3fb340
- New package, based on saxon8
3fb340
3fb340
* Tue Nov 03 2009 Lubomir Rintel <lkundrak@v3.sk> - 0:8.7-1
3fb340
- Tidied up for Fedora
3fb340
3fb340
* Tue Mar 14 2006 Deepak Bhole <dbhole@redhat.com> - 0:B.8.7-1jpp
3fb340
- Changed package name for compatibility
3fb340
- Upgraded to 8.7
3fb340
- Added saxonq script for queries
3fb340
- Updated man pages
3fb340
3fb340
* Mon Jan 30 2006 Ralph Apel <r.apel@r-apel.de> - 0:8.6.1-1jpp
3fb340
- Derive saxonb8 from saxon7
3fb340
3fb340
* Mon Sep 05 2005 Ralph Apel <r.apel@r-apel.de> - 0:7.9.1-1jpp
3fb340
- Derive saxon7 from saxon
3fb340
- no more aelfred nor fop subpackages
3fb340
3fb340
* Fri Sep 03 2004 Fernando Nasser <fnasser@redhat.com> - 0:6.5.3-3jpp
3fb340
- Rebuilt with Ant 1.6.2
3fb340
3fb340
* Mon Jul 19 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:6.5.3-2jpp
3fb340
- Apply two patches for known limitations from
3fb340
  http://saxon.sourceforge.net/saxon6.5.3/limitations.html
3fb340
- Make the command line script use xml-commons-resolver if it's available.
3fb340
- Include man page for command line script.
3fb340
- Add patch to fix command line option handling and document missing options.
3fb340
- New style versionless javadoc dir symlinking.
3fb340
- Crosslink with local J2SE javadocs.
3fb340
- Add missing jdom-javadoc build dependency.
3fb340
3fb340
* Sun Aug 31 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:6.5.3-1jpp
3fb340
- Update to 6.5.3.
3fb340
- Crosslink with local xml-commons-apis and fop javadocs.
3fb340
3fb340
* Tue Jun  3 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:6.5.2-7jpp
3fb340
- Non-versioned javadoc symlinking.
3fb340
- Include Main-Class attribute in saxon.jar.
3fb340
- Own (ghost) %%{_javadir}/jaxp_transform_impl.jar.
3fb340
- Remove alternatives in preun instead of postun.
3fb340
3fb340
* Thu Apr 17 2003 Ville Skyttä <ville.skytta at iki.fi> - 6.5.2-6jpp
3fb340
- Rebuild for JPackage 1.5.
3fb340
- Split shell script to -scripts subpackage.
3fb340
- Use non-versioned jar in jaxp_transform_impl alternative, and don't remove
3fb340
  it on upgrade.
3fb340
- Spec file cleanups.
3fb340
3fb340
* Thu Jul 25 2002 Ville Skyttä <ville.skytta at iki.fi> 6.5.2-5jpp
3fb340
- Fix shell script (again).
3fb340
- Rebuild with -Dbuild.compiler=modern (saxon-fop won't build with jikes).
3fb340
3fb340
* Fri Jul 19 2002 Ville Skyttä <ville.skytta at iki.fi> 6.5.2-4jpp
3fb340
- First public JPackage release.
3fb340
- Compile with build.xml by yours truly.
3fb340
- AElfred no more provides jaxp_parser_impl; it's SAX only, no DOM.
3fb340
- Fix shell script.
3fb340
3fb340
* Mon Jul  1 2002 Ville Skyttä <ville.skytta at iki.fi> 6.5.2-3jpp
3fb340
- Provides jaxp_parser_impl.
3fb340
- Requires xml-commons-apis.
3fb340
3fb340
* Sun Jun 30 2002 Ville Skyttä <ville.skytta at iki.fi> 6.5.2-2jpp
3fb340
- Use sed instead of bash 2 extension when symlinking jars.
3fb340
- Provides jaxp_transform_impl.
3fb340
3fb340
* Sat May 11 2002 Ville Skyttä <ville.skytta at iki.fi> 6.5.2-1jpp
3fb340
- First JPackage release.
3fb340
- Provides jaxp_parser2 though there's no DOM implementation in this AElfred.