From 55166060d57e8f449cfa5b1b9b0732b731f28dfa382b8ef204bc8e118a8cd4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 11 Jul 2014 14:47:31 +0000 Subject: [PATCH 1/4] - Fix update-alternatives code. OBS-URL: https://build.opensuse.org/package/show/Java:packages/saxon6?expand=0&rev=15 --- saxon6.changes | 5 +++++ saxon6.spec | 49 +++++++++++++++---------------------------------- 2 files changed, 20 insertions(+), 34 deletions(-) diff --git a/saxon6.changes b/saxon6.changes index 3d67d15..80be2dd 100644 --- a/saxon6.changes +++ b/saxon6.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jul 11 14:47:21 UTC 2014 - tchvatal@suse.com + +- Fix update-alternatives code. + ------------------------------------------------------------------- Fri Jun 27 11:51:43 UTC 2014 - tchvatal@suse.com diff --git a/saxon6.spec b/saxon6.spec index be0e494..3e745db 100644 --- a/saxon6.spec +++ b/saxon6.spec @@ -16,9 +16,7 @@ # -%define section free %define resolverdir %{_sysconfdir}/java/resolver - Name: saxon6 Version: 6.5.5 Release: 0 @@ -41,26 +39,19 @@ Patch3: saxon-javac-encoding.patch Patch4: saxon-add-fixes-from-com-isl-saxon-aelfred.patch #PATCH-FIX-OPENSUSE: implements batch mode in which saxon is capable to proceed more files per one JVM launch Patch5: saxon6-batch.patch +BuildRequires: ant BuildRequires: fop >= 0.20.1 +BuildRequires: java-devel BuildRequires: javapackages-tools BuildRequires: jdom >= 1.0 -BuildRequires: xml-commons-apis -%if ! %defined suse_version -BuildRequires: fop-javadoc -BuildRequires: java-javadoc -BuildRequires: jdom-javadoc >= 1.0 -%else -BuildRequires: ant -BuildRequires: java-devel BuildRequires: unzip -%endif -Requires: /usr/sbin/update-alternatives +BuildRequires: xml-commons-apis +Requires: %{_sbindir}/update-alternatives Requires: jaxp_parser_impl Provides: jaxp_transform_impl = %{name}-%{version} -# bnc#780666 Provides: saxon -BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch %description The SAXON package is a collection of tools for processing XML @@ -87,12 +78,9 @@ documents. The main components are: So you can use SAXON by writing XSLT stylesheets, by writing Java applications, or by any combination of the two. - %package aelfred Summary: Java XML parser Group: Productivity/Publishing/XML -#Provides: jaxp_parser_impl -#Requires: /usr/sbin/update-alternatives Requires: xml-commons-apis Provides: saxon-aelfred @@ -100,7 +88,6 @@ Provides: saxon-aelfred A slightly improved version of the AElfred Java XML parser from Microstar. - %package manual Summary: Manual for %{name} Group: Productivity/Publishing/XML @@ -158,9 +145,9 @@ Utility scripts for %{name}. unzip -q source.zip cp -p %{SOURCE2} ./build.xml cp -p %{SOURCE4} XmlParser.java -%patch2 -p0 +%patch2 %patch3 -p1 -%patch4 -p0 +%patch4 %patch5 -p1 cp XmlParser.java com/icl/saxon/aelfred/XmlParser.java # cleanup unnecessary stuff we'll build ourselves @@ -177,7 +164,6 @@ ant \ -Djdom.javadoc=%{_javadocdir}/jdom %install - # jars mkdir -p %{buildroot}%{_javadir} cp -p build/lib/saxon.jar %{buildroot}%{_javadir}/%{name}.jar @@ -203,36 +189,31 @@ sed 's,__RESOLVERDIR__,%{resolverdir},' < %{SOURCE5} \ mkdir -p %{buildroot}%{_mandir}/man1 sed 's,__RESOLVERDIR__,%{resolverdir},' < %{SOURCE3} \ > %{buildroot}%{_mandir}/man1/%{name}.1 -# jaxp_transform_impl ghost symlink -ln -s %{_sysconfdir}/alternatives \ - %{buildroot}%{_javadir}/jaxp_transform_impl.jar -# jaxp_parser_impl ghost symlink -#ln -s %{_sysconfdir}/alternatives \ -# %{buildroot}%{_javadir}/jaxp_parser_impl.jar -%clean -rm -rf %{buildroot} +# jaxp_transform_impl ghost symlink +mkdir -p %{buildroot}%{_sysconfdir}/alternatives/ +ln -s %{_javadir}/%{name}.jar %{buildroot}%{_sysconfdir}/alternatives/jaxp_transform_impl.jar +ln -s %{_javadir}/%{name}.jar %{buildroot}%{_javadir}/jaxp_transform_impl.jar %post update-alternatives --install %{_javadir}/jaxp_transform_impl.jar \ jaxp_transform_impl %{_javadir}/%{name}.jar 25 -%preun -{ - [ $1 -eq 0 ] || exit 0 +%postun +if [ $1 -eq 0 ] ; then update-alternatives --remove jaxp_transform_impl %{_javadir}/%{name}.jar -} >/dev/null 2>&1 || : +fi %files %defattr(0644,root,root,0755) %{_javadir}/%{name}.jar %{_javadir}/%{name}.jar %ghost %{_javadir}/jaxp_transform_impl.jar +%ghost %{_sysconfdir}/alternatives/jaxp_transform_impl.jar %files aelfred %defattr(0644,root,root,0755) %{_javadir}/%{name}-aelfred* -#%ghost %{_javadir}/jaxp_parser_impl.jar %files fop %defattr(0644,root,root,0755) From 5eead33f2bc54fb2ed96e6f66a41358b8f287b2ef79267215bb15f13ccfde8a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 21 Jul 2014 07:46:49 +0000 Subject: [PATCH 2/4] OBS-URL: https://build.opensuse.org/package/show/Java:packages/saxon6?expand=0&rev=16 --- saxon6.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/saxon6.spec b/saxon6.spec index 3e745db..48f7f02 100644 --- a/saxon6.spec +++ b/saxon6.spec @@ -193,7 +193,7 @@ sed 's,__RESOLVERDIR__,%{resolverdir},' < %{SOURCE3} \ # jaxp_transform_impl ghost symlink mkdir -p %{buildroot}%{_sysconfdir}/alternatives/ ln -s %{_javadir}/%{name}.jar %{buildroot}%{_sysconfdir}/alternatives/jaxp_transform_impl.jar -ln -s %{_javadir}/%{name}.jar %{buildroot}%{_javadir}/jaxp_transform_impl.jar +ln -s %{_sysconfdir}/alternatives/jaxp_transform_impl.jar %{buildroot}%{_javadir}/jaxp_transform_impl.jar %post update-alternatives --install %{_javadir}/jaxp_transform_impl.jar \ From f28f3eb0e4343852937444006cef77b86c66fca8a714ef64e70b26ac2eff8e58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 21 Jul 2014 09:45:30 +0000 Subject: [PATCH 3/4] OBS-URL: https://build.opensuse.org/package/show/Java:packages/saxon6?expand=0&rev=17 --- saxon6.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/saxon6.spec b/saxon6.spec index 48f7f02..528a7c7 100644 --- a/saxon6.spec +++ b/saxon6.spec @@ -208,7 +208,7 @@ fi %defattr(0644,root,root,0755) %{_javadir}/%{name}.jar %{_javadir}/%{name}.jar -%ghost %{_javadir}/jaxp_transform_impl.jar +%{_javadir}/jaxp_transform_impl.jar %ghost %{_sysconfdir}/alternatives/jaxp_transform_impl.jar %files aelfred From ace3cd3ed79cd2ecbf1080d66113b12f265e7a8dcc22a3ee737d9e20dc9f6bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 28 Jul 2014 06:52:30 +0000 Subject: [PATCH 4/4] OBS-URL: https://build.opensuse.org/package/show/Java:packages/saxon6?expand=0&rev=18 --- saxon6.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/saxon6.spec b/saxon6.spec index 528a7c7..2df5594 100644 --- a/saxon6.spec +++ b/saxon6.spec @@ -192,8 +192,7 @@ sed 's,__RESOLVERDIR__,%{resolverdir},' < %{SOURCE3} \ # jaxp_transform_impl ghost symlink mkdir -p %{buildroot}%{_sysconfdir}/alternatives/ -ln -s %{_javadir}/%{name}.jar %{buildroot}%{_sysconfdir}/alternatives/jaxp_transform_impl.jar -ln -s %{_sysconfdir}/alternatives/jaxp_transform_impl.jar %{buildroot}%{_javadir}/jaxp_transform_impl.jar +ln -sf %{_sysconfdir}/alternatives/jaxp_transform_impl.jar %{buildroot}%{_javadir}/jaxp_transform_impl.jar %post update-alternatives --install %{_javadir}/jaxp_transform_impl.jar \