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