317 lines
11 KiB
RPMSpec
317 lines
11 KiB
RPMSpec
#
|
|
# spec file for package xml-commons (Version 1.3.02)
|
|
#
|
|
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
|
|
Name: xml-commons
|
|
BuildRequires: ant
|
|
BuildRequires: java-1_5_0-gcj-compat-devel
|
|
#!BuildIgnore: xml-commons-resolver
|
|
%define section free
|
|
%define whichver 1.0
|
|
Summary: Common code for XML projects
|
|
Version: 1.3.02
|
|
Release: 265
|
|
License: The Apache Software License
|
|
Url: http://xml.apache.org/commons/
|
|
#Source0: http://xml.apache.org/dist/commons/xml-commons-1.0.b2.tar.gz
|
|
Source0: xml-commons-1.0.b2.tar.bz2
|
|
Source1: xml-commons.which.script
|
|
Source2: xml-commons-externals.tar.bz2
|
|
# svn export http://svn.apache.org/repos/asf/xml/commons/tags/xml-commons-external-1_3_02/java/external/
|
|
Patch0: xml-commons.build.patch
|
|
Patch1: xml-commons.manifest.patch
|
|
Patch2: xml-commons-jdk5-build.patch
|
|
Requires: jpackage-utils >= 1.5
|
|
Group: Development/Libraries/Java
|
|
BuildArch: noarch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
PreReq: update-alternatives
|
|
|
|
%description
|
|
xml-commons is focused on common code and guidelines for xml projects.
|
|
It's first focus will be to organize and have common packaging for the
|
|
various externally-defined standards code relating to XML - things like
|
|
the DOM, SAX, and JAXP interfaces. As the xml-commons community forms,
|
|
we also hope to serve as a holding area for other common xml-related
|
|
utilities and code, and to help promulgate common packaging, testing,
|
|
documentation, and other guidelines across all xml.apache.org
|
|
subprojects.
|
|
|
|
|
|
|
|
%package apis
|
|
License: The Apache Software License
|
|
Summary: APIs subproject of xml-commons
|
|
Group: Development/Libraries/Java
|
|
Requires: %{name} = %{version}-%{release}
|
|
PreReq: update-alternatives
|
|
|
|
%description apis
|
|
xml-commons is focused on common code and guidelines for xml projects.
|
|
It's first focus will be to organize and have common packaging for the
|
|
various externally-defined standards code relating to XML - things like
|
|
the DOM, SAX, and JAXP interfaces. As the xml-commons community forms,
|
|
we also hope to serve as a holding area for other common xml-related
|
|
utilities and code, and to help promulgate common packaging, testing,
|
|
documentation, and other guidelines across all xml.apache.org
|
|
subprojects.
|
|
|
|
This package contains the APIs subproject of xml-commons.
|
|
|
|
|
|
|
|
%package which
|
|
License: The Apache Software License
|
|
Summary: which subproject of xml-commons
|
|
Group: Development/Libraries/Java
|
|
Requires: %{name} = %{version}-%{release}
|
|
Requires: jpackage-utils >= 1.5
|
|
PreReq: update-alternatives
|
|
|
|
%description which
|
|
xml-commons is focused on common code and guidelines for xml projects.
|
|
It's first focus will be to organize and have common packaging for the
|
|
various externally-defined standards code relating to XML - things like
|
|
the DOM, SAX, and JAXP interfaces. As the xml-commons community forms,
|
|
we also hope to serve as a holding area for other common xml-related
|
|
utilities and code, and to help promulgate common packaging, testing,
|
|
documentation, and other guidelines across all xml.apache.org
|
|
subprojects.
|
|
|
|
This package contains the which subproject of xml-commons.
|
|
|
|
|
|
|
|
%package apis-manual
|
|
License: The Apache Software License
|
|
Summary: Manual for xml-commons-apis
|
|
Group: Development/Libraries/Java
|
|
|
|
%description apis-manual
|
|
xml-commons is focused on common code and guidelines for xml projects.
|
|
It's first focus will be to organize and have common packaging for the
|
|
various externally-defined standards code relating to XML - things like
|
|
the DOM, SAX, and JAXP interfaces. As the xml-commons community forms,
|
|
we also hope to serve as a holding area for other common xml-related
|
|
utilities and code, and to help promulgate common packaging, testing,
|
|
documentation, and other guidelines across all xml.apache.org
|
|
subprojects.
|
|
|
|
This package contains the manual for the APIs subproject of
|
|
xml-commons.
|
|
|
|
|
|
|
|
%package apis-javadoc
|
|
License: The Apache Software License
|
|
PreReq: coreutils
|
|
Summary: Javadoc for xml-commons-apis
|
|
Group: Development/Libraries/Java
|
|
|
|
%description apis-javadoc
|
|
xml-commons is focused on common code and guidelines for xml projects.
|
|
It's first focus will be to organize and have common packaging for the
|
|
various externally-defined standards code relating to XML - things like
|
|
the DOM, SAX, and JAXP interfaces. As the xml-commons community forms,
|
|
we also hope to serve as a holding area for other common xml-related
|
|
utilities and code, and to help promulgate common packaging, testing,
|
|
documentation, and other guidelines across all xml.apache.org
|
|
subprojects.
|
|
|
|
This package contains the javadoc documentation for the APIs subproject
|
|
of xml-commons.
|
|
|
|
|
|
|
|
%package which-javadoc
|
|
License: The Apache Software License
|
|
PreReq: coreutils
|
|
Summary: Javadoc for xml-commons-which
|
|
Group: Development/Libraries/Java
|
|
|
|
%description which-javadoc
|
|
xml-commons is focused on common code and guidelines for xml projects.
|
|
It's first focus will be to organize and have common packaging for the
|
|
various externally-defined standards code relating to XML - things like
|
|
the DOM, SAX, and JAXP interfaces. As the xml-commons community forms,
|
|
we also hope to serve as a holding area for other common xml-related
|
|
utilities and code, and to help promulgate common packaging, testing,
|
|
documentation, and other guidelines across all xml.apache.org
|
|
subprojects.
|
|
|
|
This package contains the javadoc documentation for the which
|
|
subproject of xml-commons.
|
|
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{whichver}.b2
|
|
%patch0 -p1
|
|
%patch1 -p1
|
|
%patch2 -b .sav
|
|
# replace external
|
|
pushd java
|
|
rm -rf external
|
|
tar -jxf %{SOURCE2}
|
|
popd
|
|
# remove all binary libs and prebuilt javadocs
|
|
rm -rf `find . -name "*.jar" -o -name "*.gz"`
|
|
rm -rf java/build java/external/build/docs/javadoc
|
|
# -----------------------------------------------------------------------------
|
|
|
|
%build
|
|
for file in `find -name "*.xml"` ; do
|
|
grep -q "<javac " $file || continue
|
|
if ! grep -q "javac.*source=" $file ; then
|
|
perl -p -i -e 's|<javac |<javac source=\"1.4\" |' $file
|
|
perl -p -i -e 's|<javadoc |<javadoc source=\"1.4\" |' $file
|
|
fi
|
|
done
|
|
ant jars
|
|
# -----------------------------------------------------------------------------
|
|
|
|
%install
|
|
# Jars
|
|
mkdir -p $RPM_BUILD_ROOT%{_javadir}
|
|
cp -p java/external/build/xml-apis.jar \
|
|
$RPM_BUILD_ROOT%{_javadir}/apache-%{name}-apis-%{version}.jar
|
|
cp -p java/build/which.jar \
|
|
$RPM_BUILD_ROOT%{_javadir}/apache-%{name}-which-%{version}.jar
|
|
# Jar versioning
|
|
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in apache-%{name}-apis*.jar; do ln -sf ${jar} dom3-${jar}; done)
|
|
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
|
|
# Javadocs
|
|
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-apis-%{version}
|
|
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-which-%{version}
|
|
cp -pr java/external/build/docs/javadoc/* \
|
|
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-apis-%{version}
|
|
cp -pr java/build/docs/javadocs/* \
|
|
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-which-%{version}
|
|
ln -s %{name}-apis-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-apis # ghost symlink
|
|
ln -s %{name}-which-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-which # ghost symlink
|
|
# xml-apis ghost symlink
|
|
ln -s %{_sysconfdir}/alternatives \
|
|
$RPM_BUILD_ROOT%{_javadir}/xml-commons-apis.jar
|
|
# Scripts
|
|
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
|
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/xml-which
|
|
# prevent apis javadoc from being included in doc
|
|
rm -rf java/external/build/docs/javadoc
|
|
# -----------------------------------------------------------------------------
|
|
|
|
%post apis
|
|
/usr/sbin/update-alternatives --install %{_javadir}/xml-commons-apis.jar xml-commons-apis %{_javadir}/apache-%{name}-apis.jar 42
|
|
/usr/sbin/update-alternatives --auto xml-commons-apis
|
|
|
|
%preun apis
|
|
{
|
|
[ $1 = 0 ] || exit 0
|
|
/usr/sbin/update-alternatives --remove xml-commons-apis %{_javadir}/%{name}-xml-apis.jar
|
|
} >/dev/null 2>&1 || :
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
# -----------------------------------------------------------------------------
|
|
|
|
%files
|
|
%defattr(0644,root,root,0755)
|
|
%doc KEYS README.html
|
|
|
|
%files apis
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/apache-%{name}-apis*
|
|
%{_javadir}/dom3-apache-%{name}-apis*
|
|
%ghost %{_javadir}/xml-commons-apis.jar
|
|
|
|
%files which
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/apache-%{name}-which*
|
|
%attr(0755,root,root) %{_bindir}/*
|
|
|
|
%files apis-manual
|
|
%defattr(0644,root,root,0755)
|
|
%doc java/external/build/docs/*
|
|
|
|
%files apis-javadoc
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadocdir}/%{name}-apis-%{version}
|
|
%ghost %{_javadocdir}/%{name}-apis
|
|
|
|
%files which-javadoc
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadocdir}/%{name}-which-%{version}
|
|
%ghost %{_javadocdir}/%{name}-which
|
|
# -----------------------------------------------------------------------------
|
|
|
|
%post apis-javadoc
|
|
rm -f %{_javadocdir}/%{name}-apis
|
|
ln -s %{name}-apis-%{version} %{_javadocdir}/%{name}-apis
|
|
|
|
%postun apis-javadoc
|
|
if [ "$1" = "0" ]; then
|
|
rm -f %{_javadocdir}/%{name}-apis
|
|
fi
|
|
|
|
%post which-javadoc
|
|
rm -f %{_javadocdir}/%{name}-which
|
|
ln -s %{name}-which-%{version} %{_javadocdir}/%{name}-which
|
|
|
|
%postun which-javadoc
|
|
if [ "$1" = "0" ]; then
|
|
rm -f %{_javadocdir}/%{name}-which
|
|
fi
|
|
# -----------------------------------------------------------------------------
|
|
|
|
%changelog
|
|
* Thu Sep 11 2008 mvyskocil@suse.cz
|
|
- Use a gcc-java for build
|
|
- Fixed a minor rpm lint error in which subpackage summary
|
|
* Tue Jan 22 2008 mvyskocil@suse.cz
|
|
- fixed beta build
|
|
* Sun Jul 22 2007 coolo@suse.de
|
|
- avoid autobuild loops
|
|
* Wed May 02 2007 dbornkessel@suse.de
|
|
- added unzip to BuildRequires
|
|
* Thu Sep 21 2006 dbornkessel@suse.de
|
|
- added xml-commons-apis-bootstrap spec file
|
|
* Mon Sep 18 2006 ro@suse.de
|
|
- use source=1.4 for java
|
|
* Wed Feb 08 2006 dbornkessel@suse.de
|
|
- added missing PreReq: update-alternatives
|
|
* Mon Jan 30 2006 dbornkessel@suse.de
|
|
- added update alternatives for xml-commons-apis with appropiate prio
|
|
* Fri Jan 27 2006 mls@suse.de
|
|
- converted neededforbuild to BuildRequires
|
|
* Wed Jan 25 2006 dbornkessel@suse.de
|
|
- deleted dependency on itself
|
|
* Mon Jan 16 2006 jsmeix@suse.de
|
|
- Current version 1.3.02 from JPackage.org
|
|
* Tue Oct 11 2005 jsmeix@suse.de
|
|
- Added xerces-j2 which is needed for build on ppc64 and ia64.
|
|
* Fri Jul 29 2005 jsmeix@suse.de
|
|
- Adjustments in the spec file.
|
|
* Wed Jul 20 2005 jsmeix@suse.de
|
|
- Current version 1.0 from JPackage.org
|
|
* Mon Jul 18 2005 jsmeix@suse.de
|
|
- Current version 1.0 from JPackage.org
|
|
* Thu Sep 16 2004 skh@suse.de
|
|
- Fix prerequires of javadoc subpackages
|
|
* Thu Sep 02 2004 skh@suse.de
|
|
- Initial package created with version 1.0 (JPackage 1.5)
|