Remove alternatives, there is no other provider

- Specfile cleanup
This commit is contained in:
Michael Simacek 2017-02-23 14:44:56 +01:00
parent 5013f04727
commit 5b6e9b861b

View File

@ -4,9 +4,8 @@
Name: xerces-j2
Version: 2.11.0
Release: 26%{?dist}
Release: 27%{?dist}
Summary: Java XML parser
Group: Development/Libraries
License: ASL 2.0
URL: http://xerces.apache.org/xerces2-j/
@ -43,19 +42,16 @@ BuildRequires: apache-parent
BuildRequires: xalan-j2 >= 2.7.1
BuildRequires: xml-commons-apis >= 1.4.01
BuildRequires: xml-commons-resolver >= 1.2
BuildRequires: jaxp_parser_impl
BuildRequires: dejavu-sans-fonts
BuildRequires: xerces-j2
Requires: xalan-j2 >= 2.7.1
Requires: xml-commons-apis >= 1.4.01
Requires: xml-commons-resolver >= 1.2
Provides: jaxp_parser_impl = 1.4
Provides: %{name}-scripts = %{version}-%{release}
Obsoletes: %{name}-scripts < 2.11.0-6
Requires(post): chkconfig jaxp_parser_impl
Requires(preun): chkconfig jaxp_parser_impl
Obsoletes: %{name}-scripts < 2.11.0-6
# This documentation is provided by xml-commons-apis
Obsoletes: %{name}-javadoc-apis < %{version}-%{release}
@ -92,8 +88,6 @@ APIs are in use.
%package javadoc
Summary: Javadocs for %{name}
Group: Documentation
Requires: jpackage-utils
# Consolidating all javadocs into one package
Obsoletes: %{name}-javadoc-impl < %{version}-%{release}
@ -106,7 +100,6 @@ This package contains the API documentation for %{name}.
%package demo
Summary: Demonstrations and samples for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description demo
@ -131,7 +124,7 @@ sed -i 's/\r//' LICENSE README NOTICE
# legacy aliases for compatability
%mvn_alias : xerces:xerces xerces:xmlParserAPIs apache:xerces-j2
%mvn_file : %{name}
%mvn_file : %{name} jaxp_parser_impl
%build
pushd tools
@ -186,25 +179,14 @@ install -p -m 644 %{SOURCE12} %{buildroot}%{_mandir}/man1
install -pD -T build/xercesSamples.jar %{buildroot}%{_datadir}/%{name}/%{name}-samples.jar
cp -pr data %{buildroot}%{_datadir}/%{name}
# jaxp_parser_impl ghost symlink
ln -s %{_sysconfdir}/alternatives \
%{buildroot}%{_javadir}/jaxp_parser_impl.jar
%post
update-alternatives --install %{_javadir}/jaxp_parser_impl.jar \
jaxp_parser_impl %{_javadir}/%{name}.jar 40
%preun
{
[ $1 = 0 ] || exit 0
update-alternatives --remove jaxp_parser_impl %{_javadir}/%{name}.jar
} >/dev/null 2>&1 || :
# alternatives suppoort removed in f26
update-alternatives --remove jaxp_parser_impl %{_javadir}/%{name}.jar >/dev/null 2>&1 || :
%files -f .mfiles
%doc LICENSE NOTICE README
%{_bindir}/*
%{_mandir}/*/*
%ghost %{_javadir}/jaxp_parser_impl.jar
%files javadoc
%{_javadocdir}/%{name}
@ -213,6 +195,10 @@ update-alternatives --install %{_javadir}/jaxp_parser_impl.jar \
%{_datadir}/%{name}
%changelog
* Thu Feb 23 2017 Michael Simacek <msimacek@redhat.com> - 2.11.0-27
- Remove alternatives, there is no other provider
- Specfile cleanup
* Thu Feb 23 2017 Michael Simacek <msimacek@redhat.com> - 2.11.0-26
- Install with XMvn