Blame SPECS/glassfish-jaxb.spec

4419f2
Name: glassfish-jaxb
4419f2
Version: 2.2.5
80003b
Release: 6%{?dist}
4419f2
Summary: JAXB Reference Implementation
4419f2
4419f2
Group: Development/Libraries
4419f2
License: CDDL and GPLv2 with exceptions
4419f2
URL: http://jaxb.java.net
4419f2
4419f2
# svn export https://svn.java.net/svn/jaxb~version2/tags/jaxb-2_2_5/ glassfish-jaxb-2.2.5
4419f2
# find glassfish-jaxb-2.2.5/ -name '*.class' -delete
4419f2
# find glassfish-jaxb-2.2.5/ -name '*.jar' -delete
4419f2
# find glassfish-jaxb-2.2.5/ -name '*.zip' -delete
4419f2
# find glassfish-jaxb-2.2.5/ -name '*.dll' -delete
4419f2
# tar czf glassfish-jaxb-2.2.5.tar.gz glassfish-jaxb-2.2.5
4419f2
Source0: %{name}-%{version}.tar.gz
4419f2
4419f2
# JAXB implementation POM:
4419f2
Source1: http://repo1.maven.org/maven2/com/sun/xml/bind/jaxb-impl/2.2.5/jaxb-impl-2.2.5.pom
4419f2
4419f2
# JAXB XJC POM:
4419f2
Source2: http://repo1.maven.org/maven2/com/sun/xml/bind/jaxb-xjc/2.2.5/jaxb-xjc-2.2.5.pom
4419f2
4419f2
# Ant build file used to generate the Javadoc (this is not part of the original
4419f2
# source but written on purpose for the packaging):
4419f2
Source3: build-javadoc.xml
4419f2
4419f2
# Use resolver from xml-commons-resolver instead of an internal rebundled one:
4419f2
Patch0: %{name}-dont-use-internal-resolver.patch
4419f2
4419f2
# Don't try to generate the 1.0 runtime:
4419f2
Patch1: %{name}-dont-generate-1.0-runtime.patch
4419f2
4419f2
# Removing Jing driver because of incompatibility issues:
4419f2
Patch2: %{name}-dont-generate-jing-rnc-driver.patch
4419f2
4419f2
# Don't bundle the contents of other jar files in the XJC compiler jar file:
4419f2
Patch3: %{name}-dont-bundle-other-jars.patch
4419f2
4419f2
# Remove the class-path entry from the generated manifest files:
4419f2
Patch4: %{name}-remove-classpath-from-manifests.patch
4419f2
4419f2
# Patch the POM files to include the dependencies corresponding to the jar
4419f2
# files that we aren't bundling within the jat files of this package:
4419f2
Patch5: %{name}-add-dependencies.patch
4419f2
4419f2
# Don't use the prebuilt javadocs:
4419f2
Patch6: %{name}-dont-use-prebuilt-javadocs.patch
4419f2
4419f2
# Don't build the examples as they need additional dependencies:
4419f2
Patch7: %{name}-dont-build-examples.patch
4419f2
4419f2
BuildArch: noarch
4419f2
4419f2
BuildRequires: jpackage-utils
4419f2
BuildRequires: java-devel
4419f2
4419f2
BuildRequires: ant
4419f2
BuildRequires: codemodel
4419f2
BuildRequires: istack-commons
4419f2
BuildRequires: relaxngcc
4419f2
BuildRequires: xml-commons-resolver
4419f2
BuildRequires: txw2
4419f2
BuildRequires: relaxngDatatype
4419f2
BuildRequires: glassfish-dtd-parser
4419f2
BuildRequires: glassfish-jaxb-api
4419f2
BuildRequires: glassfish-fastinfoset
4419f2
BuildRequires: jing
4419f2
BuildRequires: stax-ex
4419f2
BuildRequires: isorelax
4419f2
BuildRequires: xsom
4419f2
BuildRequires: rngom
4419f2
4419f2
Requires: glassfish-dtd-parser
4419f2
Requires: xml-commons-resolver
4419f2
Requires: xsom
4419f2
Requires: rngom
4419f2
Requires: isorelax
4419f2
Requires: jing
4419f2
Requires: stax-ex
4419f2
Requires: glassfish-fastinfoset
4419f2
Requires: glassfish-jaxb-api
4419f2
Requires: relaxngDatatype
4419f2
Requires: txw2
4419f2
Requires: istack-commons
4419f2
Requires: codemodel
4419f2
Requires: jpackage-utils
4419f2
Requires: java
4419f2
4419f2
4419f2
%description
4419f2
GlassFish JAXB Reference Implementation.
4419f2
4419f2
4419f2
%package javadoc
4419f2
Summary: Javadocs for %{name}
4419f2
Group: Documentation
4419f2
Requires: jpackage-utils
4419f2
4419f2
4419f2
%description javadoc
4419f2
This package contains the API documentation for %{name}.
4419f2
4419f2
4419f2
%prep
4419f2
4419f2
# Unpack the sources:
4419f2
%setup -q
4419f2
4419f2
# Put the POM files in place (we do this before patching because we need to
4419f2
# patch the POMs in order to add the dependencies for the artifacts that we are
4419f2
# not bundling):
4419f2
cp %{SOURCE1} jaxb-impl.pom
4419f2
cp %{SOURCE2} jaxb-xjc.pom
4419f2
4419f2
# Apply the patches:
4419f2
%patch0 -p1
4419f2
%patch1 -p1
4419f2
%patch2 -p1
4419f2
%patch3 -p1
4419f2
%patch4 -p1
4419f2
%patch5 -p1
4419f2
%patch6 -p1
4419f2
%patch7 -p1
4419f2
4419f2
# Link the libraries where the build script expects them:
4419f2
ln -s $(build-classpath codemodel) tools/lib/rebundle/compiler/codemodel.jar
4419f2
ln -s $(build-classpath glassfish-dtd-parser) tools/lib/rebundle/compiler/dtd-parser.jar
4419f2
ln -s $(build-classpath istack-commons-tools) tools/lib/rebundle/compiler/istack-commons-tools.jar
4419f2
ln -s $(build-classpath relaxngDatatype) tools/lib/rebundle/compiler/relaxngDatatype.jar
4419f2
ln -s $(build-classpath xml-commons-resolver) tools/lib/rebundle/compiler/resolver.jar
4419f2
ln -s $(build-classpath rngom) tools/lib/rebundle/compiler/rngom.jar
4419f2
ln -s $(build-classpath xsom) tools/lib/rebundle/compiler/xsom.jar
4419f2
ln -s $(build-classpath isorelax) tools/lib/rebundle/runtime/isorelax.jar
4419f2
ln -s $(build-classpath msv-msv) tools/lib/rebundle/runtime/msv.jar
4419f2
ln -s $(build-classpath relaxngDatatype) tools/lib/rebundle/runtime/relaxngDatatype.jar
4419f2
ln -s $(build-classpath istack-commons-runtime) tools/lib/rebundle/runtime2/istack-commons-runtime.jar
4419f2
ln -s $(build-classpath txw2) tools/lib/rebundle/runtime2/txw2.jar
4419f2
ln -s $(build-classpath jaxb-api) tools/lib/redist/jaxb-api.jar
4419f2
ln -s %{_javadir}/glassfish-fastinfoset/FastInfoset.jar tools/lib/util/FastInfoset.jar
4419f2
ln -s $(build-classpath args4j) tools/lib/util/args4j.jar
4419f2
ln -s $(build-classpath codemodel-annotation-compiler) tools/lib/util/codemodel-annotation-compiler.jar
4419f2
ln -s $(build-classpath dom4j) tools/lib/util/dom4j.jar
4419f2
ln -s $(build-classpath jing) tools/lib/util/jing.jar
4419f2
ln -s $(build-classpath relaxngcc) tools/lib/util/relaxngcc.jar
4419f2
ln -s $(build-classpath stax-ex) tools/lib/util/stax-ex.jar
4419f2
ln -s $(build-classpath txwc2) tools/lib/util/txwc2.jar
4419f2
4419f2
# Put the Javadoc build file in place (no patching needed here, as this is not
4419f2
# part of the original source):
4419f2
cp %{SOURCE3} build-javadoc.xml
4419f2
4419f2
4419f2
%build
4419f2
4419f2
# Build the binaries:
4419f2
ant \
4419f2
  -Dbuild.sysclasspath=last \
4419f2
  -Dbuild.number=1 \
4419f2
  dist
4419f2
4419f2
# Build the javadoc for the runtime and the compiler:
4419f2
ant \
4419f2
  -Dbuild.sysclasspath=last \
4419f2
  -f build-javadoc.xml
4419f2
4419f2
4419f2
%install
4419f2
4419f2
# Jar files:
4419f2
install -d -m 755 %{buildroot}%{_javadir}/%{name}
4419f2
install -m 644 dist/lib/jaxb-impl.jar %{buildroot}%{_javadir}/%{name}/jaxb-impl.jar
4419f2
install -m 644 dist/lib/jaxb-xjc.jar %{buildroot}%{_javadir}/%{name}/jaxb-xjc.jar
4419f2
install -m 644 tools/pretty-printer/build/pretty-printer.jar %{buildroot}%{_javadir}/%{name}/pretty-printer.jar
4419f2
install -m 644 tools/xmllint/build/xmllint.jar %{buildroot}%{_javadir}/%{name}/xmllint.jar
4419f2
4419f2
# POM files:
4419f2
install -d -m 755 %{buildroot}%{_mavenpomdir}
4419f2
install -m 644 jaxb-impl.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-jaxb-impl.pom
4419f2
install -m 644 jaxb-xjc.pom  %{buildroot}%{_mavenpomdir}/JPP.%{name}-jaxb-xjc.pom
4419f2
4419f2
# Javadoc files:
4419f2
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
4419f2
cp -rp apidocs/* %{buildroot}%{_javadocdir}/%{name}/.
4419f2
4419f2
# Dependencies map:
4419f2
%add_maven_depmap JPP.%{name}-jaxb-impl.pom %{name}/jaxb-impl.jar
4419f2
%add_maven_depmap JPP.%{name}-jaxb-xjc.pom %{name}/jaxb-xjc.jar
4419f2
4419f2
4419f2
%files
4419f2
%{_mavenpomdir}/*
4419f2
%{_mavendepmapfragdir}/*
4419f2
%{_javadir}/*
4419f2
%doc License.txt
4419f2
%doc License.html
4419f2
4419f2
4419f2
%files javadoc
4419f2
%{_javadocdir}/%{name}
4419f2
%doc License.txt
4419f2
%doc License.html
4419f2
4419f2
4419f2
%changelog
80003b
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.2.5-6
80003b
- Mass rebuild 2013-12-27
80003b
4419f2
* Fri Oct 25 2013 Ade Lee <alee@redhat.com> - 2.2.5-5
4419f2
- Resolves rhbz#1017802 - glassfish-jaxb: mock build failed on RHEL 7
4419f2
4419f2
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-4
4419f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
4419f2
4419f2
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-3
4419f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
4419f2
4419f2
* Tue Mar 13 2012 Juan Hernandez <juan.hernandez@redhat.com> 2.2.5-2
4419f2
- Add missing xsom and rngom dependencies to the POM files
4419f2
4419f2
* Sat Mar 10 2012 Juan Hernandez <juan.hernandez@redhat.com> 2.2.5-1
4419f2
- Updated to upstream version 2.2.5
4419f2
- Removed classpath from manifest files
4419f2
4419f2
* Wed Mar 7 2012 Juan Hernandez <juan.hernandez@redhat.com> 2.2.4u1-4
4419f2
- Updated to reflect the change from glassfish-fi to glassfish-fastinfoset
4419f2
4419f2
* Wed Feb 22 2012 Juan Hernandez <juan.hernandez@redhat.com> 2.2.4u1-3
4419f2
- Updated to reflect the changes of the jar names in txw2
4419f2
4419f2
* Wed Feb 22 2012 Juan Hernandez <juan.hernandez@redhat.com> 2.2.4u1-2
4419f2
- Cleanup of the spec file
4419f2
4419f2
* Sat Jan 21 2012 Marek Goldmann <mgoldman@redhat.com> 2.2.4u1-1
4419f2
- Initial packaging
4419f2