From f8cf1581872c091120a66d2aad7045e3be40866c3110304a73054a4b5bb99bc0 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Mon, 24 Sep 2018 07:31:38 +0000 Subject: [PATCH 1/4] Accepting request 637271 from home:thomas-schraitle:branches:Publishing Several spec improvements, but no version update: - Use spec-cleaner - Simplified unzip with -d option - Split into svg-schema and svg-schema-doc - Fix warnings - Add missing "popd" - General cleanup with structure & variables - Apply %fdupes macro only to %{buildroot}%{_docdir} OBS-URL: https://build.opensuse.org/request/show/637271 OBS-URL: https://build.opensuse.org/package/show/Publishing/svg-schema?expand=0&rev=7 --- svg-schema.changes | 12 +++ svg-schema.spec | 187 ++++++++++++++++++++++----------------------- 2 files changed, 102 insertions(+), 97 deletions(-) diff --git a/svg-schema.changes b/svg-schema.changes index 011dcf2..dd35360 100644 --- a/svg-schema.changes +++ b/svg-schema.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Sun Sep 23 14:32:52 UTC 2018 - thomas.schraitle@suse.com + +Several spec changes, but no version update: + - Use spec-cleaner + - Simplified unzip with -d option + - Split into svg-schema and svg-schema-doc + - Fix warnings + - Add missing "popd" + - General cleanup with structure & variables + - Apply %fdupes macro only to %{buildroot}%{_docdir} + ------------------------------------------------------------------- Mon Jul 25 09:20:02 UTC 2016 - fvogt@suse.com diff --git a/svg-schema.spec b/svg-schema.spec index 806a1df..8617e8d 100644 --- a/svg-schema.spec +++ b/svg-schema.spec @@ -1,7 +1,7 @@ # -# spec file for package svg-schema (Version 20030114) +# spec file for package svg-schema # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,30 +15,33 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild +%define regcat %{_bindir}/sgml-register-catalog +%define all_cat svg-1.0 svg-1.1 +# +%define INSTALL_DIR install -d -m755 +%define INSTALL_DATA install -m644 +# +%define sgml_dir %{_datadir}/sgml +%define sgml_var_dir %{_localstatedir}/lib/sgml +# +%define xml_dir %{_datadir}/xml +%define xml_mod_dir %{xml_dir}/svg +%define xml_mod_dtd_dir %{xml_mod_dir}/schema/dtd +%define xml_mod_rng_dir %{xml_mod_dir}/schema/rng +%define xml_mod_custom_dir %{xml_mod_dir}/custom +%define xml_mod_style_dir %{xml_mod_dir}/stylesheet +%define xml_mod_style_prod_dir %{xml_mod_style_dir} +%define xml_sysconf_dir %{_sysconfdir}/xml +# Name: svg-schema -BuildRequires: fdupes sgml-skel unzip -Summary: SVG DTDs and Documentation Version: 20030114 -Release: 101 -Group: Productivity/Graphics/Other -BuildArch: noarch -Provides: svg-dtd -Obsoletes: svg-dtd -PreReq: /usr/bin/xmlcatalog -BuildRequires: sgml-skel >= 0.7 -Requires(post): sgml-skel >= 0.7 -Requires(postun): sgml-skel >= 0.7 -Requires: sgml-skel >= 0.7 -Requires: libxml2 -%define regcat /usr/bin/sgml-register-catalog -PreReq: %{regcat} -PreReq: sed grep awk -#Provides: +Release: 0 +Summary: SVG DTD and RELAX NG Schema License: BSD-3-Clause -Url: http://www.w3.org/Graphics/SVG/ +Group: Productivity/Graphics/Other +URL: http://www.w3.org/Graphics/SVG/ Source0: http://www.w3.org/TR/2001/REC-SVG-20010904/REC-SVG-20010904.zip Source1: http://www.w3.org/TR/SVG11/REC-SVG11-20030114.zip Source2: CATALOG.svg-1.0 @@ -46,8 +49,19 @@ Source3: CATALOG.svg-1.1 Source4: svg-1.0.xml Source5: svg-1.1.xml Source10: http://www.w3.org/Graphics/SVG/1.1/rng/rng.zip -#Patch: -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: fdupes +BuildRequires: sgml-skel >= 0.7 +BuildRequires: unzip +Requires: sgml-skel >= 0.7 +# FIXME: use proper Requires(pre/post/preun/...) +PreReq: %{_bindir}/xmlcatalog +PreReq: %{regcat} +PreReq: awk +PreReq: grep +PreReq: sed +Requires(post): sgml-skel >= 0.7 +Requires(postun): sgml-skel >= 0.7 +BuildArch: noarch %description Contains the following DTDs: @@ -59,94 +73,74 @@ Contains the following DTDs: Recommendation 14 January 2003 +%package doc +Summary: Documentation of SVG Schemas +Group: Productivity/Graphics/Other -%define INSTALL install -m755 -s -%define INSTALL_DIR install -d -m755 -%define INSTALL_DATA install -m644 -%define INSTALL_SCRIPT install -m755 -o root -g root -%define sgml_dir %{_datadir}/sgml -%define sgml_var_dir /var/lib/sgml -%define sgml_mod_dir %{sgml_dir}/svg -%define sgml_mod_dtd_dir %{sgml_mod_dir}/dtd -%define sgml_mod_custom_dir %{sgml_mod_dir}/custom -%define sgml_mod_style_dir %{sgml_mod_dir}/stylesheet -%define xml_dir %{_datadir}/xml -%define xml_mod_dir %{xml_dir}/svg -%define xml_mod_dtd_dir %{xml_mod_dir}/schema/dtd -%define xml_mod_rng_dir %{xml_mod_dir}/schema/rng -%define xml_mod_custom_dir %{xml_mod_dir}/custom -%define xml_mod_style_dir %{xml_mod_dir}/stylesheet -%define xml_mod_style_prod_dir %{xml_mod_style_dir} -%define sgml_config_dir /var/lib/sgml -%define sgml_sysconf_dir %{_sysconfdir}/sgml -%define xml_config_dir /var/lib/xml -%define xml_sysconf_dir %{_sysconfdir}/xml +%description doc +%{summary} in HTML %prep -%setup -c -T -unzip -q -a %{S:1} -mkdir svg-dtd-20010904 -cd svg-dtd-20010904 -unzip -q -a %{S:0} -cd .. -mkdir rng11 -cd rng11 -unzip -q -a %{S:10} -cd .. -cp %{S:2} %{S:3} %{S:4} %{S:5} . +%setup -q -c -T +unzip -q -a %{SOURCE1} +unzip -q -a %{SOURCE0} -d svg-dtd-20010904 +unzip -q -a %{SOURCE10} -d rng11 + +cp %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} . find -type d | xargs chmod 755 find -type f | xargs chmod 644 %build +# nop %install -[ -d %{buildroot} -a "%{buildroot}" != "" ] && rm -rf %{buildroot} +# Catalogs: +%{INSTALL_DIR} %{buildroot}%{xml_sysconf_dir}/catalog.d #RNG -%{INSTALL_DIR} $RPM_BUILD_ROOT%{xml_mod_rng_dir}/1.1 -cp rng11/* $RPM_BUILD_ROOT%{xml_mod_rng_dir}/1.1 +%{INSTALL_DIR} %{buildroot}%{xml_mod_rng_dir}/1.1 +cp rng11/* %{buildroot}%{xml_mod_rng_dir}/1.1 #DTD -%{INSTALL_DIR} $RPM_BUILD_ROOT%{xml_mod_dtd_dir}/1.{0,1} \ - $RPM_BUILD_ROOT%{sgml_var_dir} $RPM_BUILD_ROOT%{sgml_dir} \ - $RPM_BUILD_ROOT%{_docdir}/%{name}/{1.0,1.1} -%{INSTALL_DATA} CATALOG.* $RPM_BUILD_ROOT%{sgml_var_dir} -%{INSTALL_DIR} $RPM_BUILD_ROOT%{xml_sysconf_dir} -mkdir -p $RPM_BUILD_ROOT%{xml_sysconf_dir}/catalog.d -%{INSTALL_DATA} svg-1.[01].xml $RPM_BUILD_ROOT%{xml_sysconf_dir}/catalog.d/ +%{INSTALL_DIR} %{buildroot}%{xml_mod_dtd_dir}/1.{0,1} \ + %{buildroot}%{sgml_var_dir} %{buildroot}%{sgml_dir} \ + %{buildroot}%{_docdir}/%{name}/{1.0,1.1} +# Data: +%{INSTALL_DATA} CATALOG.* %{buildroot}%{sgml_var_dir} +%{INSTALL_DATA} svg-1.[01].xml %{buildroot}%{xml_sysconf_dir}/catalog.d/ + pushd REC-SVG11-20030114 -cp -a * $RPM_BUILD_ROOT%{_docdir}/%{name}/1.1 -rm -fr $RPM_BUILD_ROOT%{_docdir}/%{name}/1.1/{DTD,zip} -ln -sf %{xml_mod_dtd_dir}/1.1 $RPM_BUILD_ROOT%{_docdir}/%{name}/1.1/DTD -cp -a DTD/[a-su-z][!C]* $RPM_BUILD_ROOT%{xml_mod_dtd_dir}/1.1 + cp -a * %{buildroot}%{_docdir}/%{name}/1.1 + rm -fr %{buildroot}%{_docdir}/%{name}/1.1/{DTD,zip} + ln -sf %{xml_mod_dtd_dir}/1.1 %{buildroot}%{_docdir}/%{name}/1.1/DTD + cp -a DTD/[a-su-z][!C]* %{buildroot}%{xml_mod_dtd_dir}/1.1 # popd pushd svg-dtd-20010904 -cp -a * $RPM_BUILD_ROOT%{_docdir}/%{name}/1.0 -rm -fr $RPM_BUILD_ROOT%{_docdir}/%{name}/1.0/{DTD,zip} -ln -sf %{xml_mod_dtd_dir}/1.0 $RPM_BUILD_ROOT%{_docdir}/%{name}/1.0/DTD -cp -a DTD/[a-su-z][!C]* $RPM_BUILD_ROOT%{xml_mod_dtd_dir}/1.0 -pushd $RPM_BUILD_ROOT%{sgml_dir} - for c in ../../../var/lib/sgml/CATALOG.*; do - ln -sf $c . - done + cp -a * %{buildroot}%{_docdir}/%{name}/1.0 + rm -fr %{buildroot}%{_docdir}/%{name}/1.0/{DTD,zip} + ln -sf %{xml_mod_dtd_dir}/1.0 %{buildroot}%{_docdir}/%{name}/1.0/DTD + cp -a DTD/[a-su-z][!C]* %{buildroot}%{xml_mod_dtd_dir}/1.0 + pushd %{buildroot}%{sgml_dir} + for c in ../../..%{_localstatedir}/lib/sgml/CATALOG.*; do + ln -sf $c . + done + popd + + xmlcatalog --noout --create %{buildroot}%{xml_sysconf_dir}/catalog.d/svg11-rng.xml + # PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" + # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd" + # RNG + xmlcatalog --noout --add "uri" \ + "http://www.w3.org/Graphics/SVG/1.1/rng/svg11.rng" \ + "file://%{xml_mod_rng_dir}/1.1/svg11.rng" %{buildroot}%{xml_sysconf_dir}/catalog.d/svg11-rng.xml popd -xmlcatalog --noout --create $RPM_BUILD_ROOT%{xml_sysconf_dir}/catalog.d/svg11-rng.xml -# PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" -# SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd" -# RNG -xmlcatalog --noout --add "uri" \ - "http://www.w3.org/Graphics/SVG/1.1/rng/svg11.rng" \ - "file://%{xml_mod_rng_dir}/1.1/svg11.rng" $RPM_BUILD_ROOT%{xml_sysconf_dir}/catalog.d/svg11-rng.xml - -cat_dir=%{buildroot}/etc/xml -%{INSTALL_DIR} $cat_dir -%define all_cat svg-1.0 svg-1.1 -%fdupes $RPM_BUILD_ROOT +%{INSTALL_DIR} %{buildroot}%{_sysconfdir}/xml +%fdupes %{buildroot}%{_docdir} %post if [ -x %{regcat} ]; then for c in %{all_cat}; do - grep -q -e "%{sgml_dir}/CATALOG.$c\\>" /etc/sgml/catalog \ + grep -q -e "%{sgml_dir}/CATALOG.$c\\>" %{_sysconfdir}/sgml/catalog \ || %{regcat} -a %{sgml_dir}/CATALOG.$c >/dev/null 2>&1 || : done fi @@ -160,16 +154,15 @@ if [ "$1" = "0" -a -x %{regcat} ]; then fi update-xml-catalog -%clean -rm -fr $RPM_BUILD_ROOT - %files -%defattr(-, root, root) -# %doc copyright-software.html %config %{sgml_var_dir}/CATALOG.* -%config /etc/xml/catalog.d/*.xml -%doc %{_docdir}/%{name} +%config %{_sysconfdir}/xml/catalog.d/*.xml %{sgml_dir}/CATALOG.* %{xml_mod_dir} +%files doc +%{_docdir}/%{name} +%exclude %{_docdir}/%{name}/1.0/DTD +%exclude %{_docdir}/%{name}/1.1/DTD + %changelog From 273a0d95965cbc78706af0a56348bb1ef9378c1f3b7e14076a5e0d7cd04fbf90 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Mon, 24 Sep 2018 08:40:46 +0000 Subject: [PATCH 2/4] Accepting request 637390 from home:pluskalm:branches:Publishing - Use correct form of requires(pre) OBS-URL: https://build.opensuse.org/request/show/637390 OBS-URL: https://build.opensuse.org/package/show/Publishing/svg-schema?expand=0&rev=8 --- svg-schema.changes | 5 +++++ svg-schema.spec | 15 ++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/svg-schema.changes b/svg-schema.changes index dd35360..691ae7a 100644 --- a/svg-schema.changes +++ b/svg-schema.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Sep 24 08:33:37 UTC 2018 - Martin Pluskal + +- Use correct form of requires(pre) + ------------------------------------------------------------------- Sun Sep 23 14:32:52 UTC 2018 - thomas.schraitle@suse.com diff --git a/svg-schema.spec b/svg-schema.spec index 8617e8d..be0cbe9 100644 --- a/svg-schema.spec +++ b/svg-schema.spec @@ -12,7 +12,7 @@ # 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/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -32,7 +32,6 @@ %define xml_mod_custom_dir %{xml_mod_dir}/custom %define xml_mod_style_dir %{xml_mod_dir}/stylesheet %define xml_mod_style_prod_dir %{xml_mod_style_dir} - %define xml_sysconf_dir %{_sysconfdir}/xml # Name: svg-schema @@ -53,14 +52,13 @@ BuildRequires: fdupes BuildRequires: sgml-skel >= 0.7 BuildRequires: unzip Requires: sgml-skel >= 0.7 -# FIXME: use proper Requires(pre/post/preun/...) -PreReq: %{_bindir}/xmlcatalog -PreReq: %{regcat} -PreReq: awk -PreReq: grep -PreReq: sed Requires(post): sgml-skel >= 0.7 Requires(postun): sgml-skel >= 0.7 +Requires(pre): %{_bindir}/xmlcatalog +Requires(pre): %{regcat} +Requires(pre): awk +Requires(pre): grep +Requires(pre): sed BuildArch: noarch %description @@ -72,7 +70,6 @@ Contains the following DTDs: * "Scalable Vector Graphics" (SVG) 1.1 Specification, W3C Recommendation 14 January 2003 - %package doc Summary: Documentation of SVG Schemas Group: Productivity/Graphics/Other From ddb9a7a7c148fbc41a16ab9be7f60454062e0ce7291eab2b6048cf476f38178a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 24 Sep 2018 10:40:04 +0000 Subject: [PATCH 3/4] Accepting request 637416 from home:namtrac:branches:Publishing Simplify futher OBS-URL: https://build.opensuse.org/request/show/637416 OBS-URL: https://build.opensuse.org/package/show/Publishing/svg-schema?expand=0&rev=9 --- svg-schema.spec | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/svg-schema.spec b/svg-schema.spec index be0cbe9..ded8d35 100644 --- a/svg-schema.spec +++ b/svg-schema.spec @@ -19,9 +19,6 @@ %define regcat %{_bindir}/sgml-register-catalog %define all_cat svg-1.0 svg-1.1 # -%define INSTALL_DIR install -d -m755 -%define INSTALL_DATA install -m644 -# %define sgml_dir %{_datadir}/sgml %define sgml_var_dir %{_localstatedir}/lib/sgml # @@ -75,7 +72,7 @@ Summary: Documentation of SVG Schemas Group: Productivity/Graphics/Other %description doc -%{summary} in HTML +SVG DTD and RELAX NG Schema Documentation in HTML %prep %setup -q -c -T @@ -92,17 +89,17 @@ find -type f | xargs chmod 644 %install # Catalogs: -%{INSTALL_DIR} %{buildroot}%{xml_sysconf_dir}/catalog.d +install -d -m755 %{buildroot}%{xml_sysconf_dir}/catalog.d #RNG -%{INSTALL_DIR} %{buildroot}%{xml_mod_rng_dir}/1.1 +install -d -m755 %{buildroot}%{xml_mod_rng_dir}/1.1 cp rng11/* %{buildroot}%{xml_mod_rng_dir}/1.1 #DTD -%{INSTALL_DIR} %{buildroot}%{xml_mod_dtd_dir}/1.{0,1} \ +install -d -m755 %{buildroot}%{xml_mod_dtd_dir}/1.{0,1} \ %{buildroot}%{sgml_var_dir} %{buildroot}%{sgml_dir} \ %{buildroot}%{_docdir}/%{name}/{1.0,1.1} # Data: -%{INSTALL_DATA} CATALOG.* %{buildroot}%{sgml_var_dir} -%{INSTALL_DATA} svg-1.[01].xml %{buildroot}%{xml_sysconf_dir}/catalog.d/ +install -m644 CATALOG.* %{buildroot}%{sgml_var_dir} +install -m644 svg-1.[01].xml %{buildroot}%{xml_sysconf_dir}/catalog.d/ pushd REC-SVG11-20030114 cp -a * %{buildroot}%{_docdir}/%{name}/1.1 @@ -131,7 +128,7 @@ pushd svg-dtd-20010904 "file://%{xml_mod_rng_dir}/1.1/svg11.rng" %{buildroot}%{xml_sysconf_dir}/catalog.d/svg11-rng.xml popd -%{INSTALL_DIR} %{buildroot}%{_sysconfdir}/xml +install -d -m755 %{buildroot}%{_sysconfdir}/xml %fdupes %{buildroot}%{_docdir} %post From 0dc7cc30d99719a56ee9f2ee78856c78df6f070d4b4562c70f0a7b97c3ae7061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 15 Nov 2018 09:42:21 +0000 Subject: [PATCH 4/4] - Provide still svg-dtd symbol to make sure things are still resolvable OBS-URL: https://build.opensuse.org/package/show/Publishing/svg-schema?expand=0&rev=10 --- svg-schema.changes | 5 +++++ svg-schema.spec | 7 ++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/svg-schema.changes b/svg-schema.changes index 691ae7a..7ce44d8 100644 --- a/svg-schema.changes +++ b/svg-schema.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Nov 15 09:41:42 UTC 2018 - Tomáš Chvátal + +- Provide still svg-dtd symbol to make sure things are still resolvable + ------------------------------------------------------------------- Mon Sep 24 08:33:37 UTC 2018 - Martin Pluskal diff --git a/svg-schema.spec b/svg-schema.spec index ded8d35..3f4ca2e 100644 --- a/svg-schema.spec +++ b/svg-schema.spec @@ -49,13 +49,10 @@ BuildRequires: fdupes BuildRequires: sgml-skel >= 0.7 BuildRequires: unzip Requires: sgml-skel >= 0.7 +Requires(post): libxml2-tools Requires(post): sgml-skel >= 0.7 Requires(postun): sgml-skel >= 0.7 -Requires(pre): %{_bindir}/xmlcatalog -Requires(pre): %{regcat} -Requires(pre): awk -Requires(pre): grep -Requires(pre): sed +Provides: svg-dtd = %{version} BuildArch: noarch %description