- Update to current guidelines.

This commit is contained in:
Alexander Kurtakov 2010-12-16 21:54:16 +02:00
parent d83263fb08
commit 96c532d4be

View File

@ -28,12 +28,11 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
%define section free
%define cvs_version 2_7_1
%global cvs_version 2_7_1
Name: xalan-j2
Version: 2.7.1
Release: 1%{?dist}
Release: 2%{?dist}
Epoch: 0
Summary: Java XSLT processor
# samples/servlet/ApplyXSLTException.java is ASL 1.1
@ -52,9 +51,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildArch: noarch
Provides: jaxp_transform_impl
Requires: jaxp_parser_impl
Requires(post): /usr/sbin/update-alternatives
Requires(preun): /usr/sbin/update-alternatives
Requires: xerces-j2
Requires(post): chkconfig
Requires(preun): chkconfig
BuildRequires: jpackage-utils >= 0:1.6
BuildRequires: java-devel
BuildRequires: ant
@ -82,7 +81,7 @@ Requires: java_cup
Requires: bcel
Requires: jlex
Requires: regexp
Requires: jaxp_parser_impl
Requires: xerces-j2
%description xsltc
The XSLT Compiler is a Java-based tool for compiling XSLT stylesheets into
@ -98,10 +97,8 @@ Documentation for %{name}.
%package javadoc
Summary: Javadoc for %{name}
Group: Development/Documentation
Requires: jpackage-utils
BuildRequires: java-javadoc
# for /bin/rm and /bin/ln
Requires(post): coreutils
Requires(postun): coreutils
%description javadoc
Javadoc for %{name}.
@ -169,17 +166,15 @@ zip -u build/serializer.jar META-INF/MANIFEST.MF
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -p -m 644 build/xalan-interpretive.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
$RPM_BUILD_ROOT%{_javadir}/%{name}.jar
install -p -m 644 build/xsltc.jar \
$RPM_BUILD_ROOT%{_javadir}/xsltc-%{version}.jar
$RPM_BUILD_ROOT%{_javadir}/xsltc.jar
install -p -m 644 build/serializer.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}-serializer-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
$RPM_BUILD_ROOT%{_javadir}/%{name}-serializer.jar
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr build/docs/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr build/docs/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
rm -rf build/docs/apidocs
# demo
@ -191,7 +186,7 @@ install -p -m 644 build/xalanservlet.war \
cp -pr samples $RPM_BUILD_ROOT%{_datadir}/%{name}
# fix link between manual and javadoc
(cd build/docs; ln -sf %{_javadocdir}/%{name}-%{version} apidocs)
(cd build/docs; ln -sf %{_javadocdir}/%{name} apidocs)
# jaxp_transform_impl ghost symlink
ln -s %{_sysconfdir}/alternatives \
@ -222,44 +217,33 @@ update-alternatives --install %{_javadir}/jaxp_transform_impl.jar \
# update-alternatives --remove jaxp_transform_impl %{_javadir}/xsltc.jar
#} >/dev/null 2>&1 || :
%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}
%postun javadoc
if [ "$1" = "0" ]; then
rm -f %{_javadocdir}/%{name}
fi
%files
%defattr(0644,root,root,0755)
%defattr(-,root,root,-)
%doc KEYS LICENSE.txt NOTICE.txt readme.html
%{_javadir}/%{name}-%{version}.jar
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-serializer-%{version}.jar
%{_javadir}/%{name}-serializer.jar
%ghost %{_javadir}/jaxp_transform_impl.jar
%files xsltc
%defattr(0644,root,root,0755)
%{_javadir}/xsltc-%{version}.jar
%defattr(-,root,root,-)
%{_javadir}/xsltc.jar
#%ghost %{_javadir}/jaxp_transform_impl.jar
%files manual
%defattr(0644,root,root,0755)
%defattr(-,root,root,-)
%doc build/docs/*
%files javadoc
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-%{version}
%ghost %doc %{_javadocdir}/%{name}
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{name}
%files demo
%defattr(0644,root,root,0755)
%defattr(-,root,root,-)
%{_datadir}/%{name}
%changelog
* Thu Dec 16 2010 Alexander Kurtakov <akurtako@redhat.com> 0:2.7.1-2
- Update to current guidelines.
* Wed Apr 7 2010 Alexander Kurtakov <akurtako@redhat.com> 0:2.7.1-1
- Update to 2.7.1.
- Drop gcj_support.