forked from pool/svg-schema
Accepting request 415366 from Publishing
1 OBS-URL: https://build.opensuse.org/request/show/415366 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/svg-schema?expand=0&rev=16
This commit is contained in:
parent
c717a49bdf
commit
34f49a7413
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 25 09:20:02 UTC 2016 - fvogt@suse.com
|
||||
|
||||
- Use update-xml-catalog
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 24 13:18:24 UTC 2009 - aj@suse.de
|
||||
|
||||
|
@ -27,9 +27,14 @@ Group: Productivity/Graphics/Other
|
||||
BuildArch: noarch
|
||||
Provides: svg-dtd
|
||||
Obsoletes: svg-dtd
|
||||
Requires: sgml-skel libxml2
|
||||
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} /usr/bin/xmlcatalog /usr/bin/edit-xml-catalog
|
||||
PreReq: %{regcat}
|
||||
PreReq: sed grep awk
|
||||
#Provides:
|
||||
License: BSD-3-Clause
|
||||
@ -105,7 +110,8 @@ cp rng11/* $RPM_BUILD_ROOT%{xml_mod_rng_dir}/1.1
|
||||
$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}
|
||||
%{INSTALL_DATA} svg-1.[01].xml $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/
|
||||
pushd REC-SVG11-20030114
|
||||
cp -a * $RPM_BUILD_ROOT%{_docdir}/%{name}/1.1
|
||||
rm -fr $RPM_BUILD_ROOT%{_docdir}/%{name}/1.1/{DTD,zip}
|
||||
@ -123,39 +129,17 @@ pushd $RPM_BUILD_ROOT%{sgml_dir}
|
||||
ln -sf $c .
|
||||
done
|
||||
popd
|
||||
xmlcatbin=/usr/bin/xmlcatalog
|
||||
%define FOR_ROOT_CAT for-catalog-%{name}-%{version}.xml
|
||||
rm -f %{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --create %{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --add "delegatePublic" "-//W3C//DTD SVG 1.0//EN" \
|
||||
"file:///etc/xml/svg-1.0.xml" %{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --add "delegateSystem" \
|
||||
"http://www.w3.org/Graphics/SVG/1.0/DTD" \
|
||||
"file:///etc/xml/svg-1.0.xml" %{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --add "delegatePublic" "-//W3C//DTD SVG 1.1" \
|
||||
"file:///etc/xml/svg-1.1.xml" %{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --add "delegatePublic" "-//W3C//ENTITIES SVG 1.1" \
|
||||
"file:///etc/xml/svg-1.1.xml" %{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --add "delegatePublic" "-//W3C//ELEMENTS SVG 1.1" \
|
||||
"file:///etc/xml/svg-1.1.xml" %{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --add "delegateSystem" \
|
||||
"http://www.w3.org/Graphics/SVG/1.1/" \
|
||||
"file:///etc/xml/svg-1.1.xml" %{FOR_ROOT_CAT}.tmp
|
||||
|
||||
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
|
||||
$xmlcatbin --noout --add "uri" \
|
||||
xmlcatalog --noout --add "uri" \
|
||||
"http://www.w3.org/Graphics/SVG/1.1/rng/svg11.rng" \
|
||||
"file://%{xml_mod_rng_dir}/1.1/svg11.rng" %{FOR_ROOT_CAT}.tmp
|
||||
# Create tag
|
||||
sed '/<catalog/a\
|
||||
<group id="%{name}-%{version}">
|
||||
/<\/catalog/i\
|
||||
</group>' \
|
||||
%{FOR_ROOT_CAT}.tmp > %{FOR_ROOT_CAT}
|
||||
"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
|
||||
%{INSTALL_DATA} %{FOR_ROOT_CAT} $cat_dir
|
||||
%define all_cat svg-1.0 svg-1.1
|
||||
%fdupes $RPM_BUILD_ROOT
|
||||
|
||||
@ -166,8 +150,7 @@ if [ -x %{regcat} ]; then
|
||||
|| %{regcat} -a %{sgml_dir}/CATALOG.$c >/dev/null 2>&1 || :
|
||||
done
|
||||
fi
|
||||
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
||||
--add /etc/xml/%{FOR_ROOT_CAT}
|
||||
update-xml-catalog
|
||||
|
||||
%postun
|
||||
if [ "$1" = "0" -a -x %{regcat} ]; then
|
||||
@ -175,12 +158,7 @@ if [ "$1" = "0" -a -x %{regcat} ]; then
|
||||
%{regcat} -r %{sgml_dir}/CATALOG.$c >/dev/null 2>&1 || :
|
||||
done
|
||||
fi
|
||||
# remove entries only on removal of file
|
||||
if [ ! -f %{xml_sysconf_dir}/%{FOR_ROOT_CAT} -a -x /usr/bin/edit-xml-catalog ] ; then
|
||||
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
||||
--del %{name}-%{version}
|
||||
fi
|
||||
exit 0
|
||||
update-xml-catalog
|
||||
|
||||
%clean
|
||||
rm -fr $RPM_BUILD_ROOT
|
||||
@ -189,7 +167,7 @@ rm -fr $RPM_BUILD_ROOT
|
||||
%defattr(-, root, root)
|
||||
# %doc copyright-software.html
|
||||
%config %{sgml_var_dir}/CATALOG.*
|
||||
%config /etc/xml/*.xml
|
||||
%config /etc/xml/catalog.d/*.xml
|
||||
%doc %{_docdir}/%{name}
|
||||
%{sgml_dir}/CATALOG.*
|
||||
%{xml_mod_dir}
|
||||
|
Loading…
Reference in New Issue
Block a user