diff --git a/CATALOG.xmlcharent b/CATALOG.xmlcharent
deleted file mode 100644
index 79213e5..0000000
--- a/CATALOG.xmlcharent
+++ /dev/null
@@ -1,19 +0,0 @@
-PUBLIC "-//ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML" "@DIR@/iso-amsa.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML" "@DIR@/iso-amsb.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML" "@DIR@/iso-amsc.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML" "@DIR@/iso-amsn.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML" "@DIR@/iso-amso.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML" "@DIR@/iso-amsr.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML" "@DIR@/iso-box.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML" "@DIR@/iso-cyr1.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML" "@DIR@/iso-cyr2.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML" "@DIR@/iso-dia.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES Greek Letters//EN//XML" "@DIR@/iso-grk1.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML" "@DIR@/iso-grk2.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES Greek Symbols//EN//XML" "@DIR@/iso-grk3.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML" "@DIR@/iso-grk4.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES Added Latin 1//EN//XML" "@DIR@/iso-lat1.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES Added Latin 2//EN//XML" "@DIR@/iso-lat2.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML" "@DIR@/iso-num.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES Publishing//EN//XML" "@DIR@/iso-pub.ent"
-PUBLIC "-//ISO 8879:1986//ENTITIES General Technical//EN//XML" "@DIR@/iso-tech.ent"
diff --git a/catalog.xml b/catalog.xml
deleted file mode 100644
index 064dc17..0000000
--- a/catalog.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/xmlcharent-0.3.tar.bz2 b/xmlcharent-0.3.tar.bz2
new file mode 100644
index 0000000..969a42d
--- /dev/null
+++ b/xmlcharent-0.3.tar.bz2
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:62da8a838eae3904bee36ab9abb4083a799e94bfd766500b509bd3b54e62ac83
+size 11515
diff --git a/xmlcharent-0.3.zip b/xmlcharent-0.3.zip
deleted file mode 100644
index 6340ac8..0000000
--- a/xmlcharent-0.3.zip
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d73b6bee025a031fd641679652b852c8add72d834e4085f5c9351c2c5d4b51be
-size 29705
diff --git a/xmlcharent.changes b/xmlcharent.changes
index ab57580..62abfdd 100644
--- a/xmlcharent.changes
+++ b/xmlcharent.changes
@@ -1,3 +1,13 @@
+-------------------------------------------------------------------
+Tue Aug 5 10:48:58 UTC 2014 - rsalevsky@suse.com
+
+- fix I/O error on installation
+
+-------------------------------------------------------------------
+Wed May 28 11:26:49 UTC 2014 - rsalevsky@suse.com
+
+- using the xml-group-manager to manage the catalog entrys
+
-------------------------------------------------------------------
Thu Dec 24 12:34:30 UTC 2009 - aj@suse.de
@@ -8,7 +18,7 @@ Thu Dec 24 12:34:30 UTC 2009 - aj@suse.de
-------------------------------------------------------------------
Tue Jan 27 00:29:12 CET 2009 - crrodriguez@suse.de
-- test if /usr/bin/edit-xml-catalog is executable before using it.
+- test if /usr/bin/edit-xml-catalog is executable before using it.
-------------------------------------------------------------------
Thu Mar 29 11:09:59 CEST 2007 - ke@suse.de
diff --git a/xmlcharent.sgml b/xmlcharent.sgml
new file mode 100644
index 0000000..eb1affa
--- /dev/null
+++ b/xmlcharent.sgml
@@ -0,0 +1,19 @@
+PUBLIC "-//ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML" "__DIR__/entities/iso-amsa.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML" "__DIR__/entities/iso-amsb.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML" "__DIR__/entities/iso-amsc.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML" "__DIR__/entities/iso-amsn.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML" "__DIR__/entities/iso-amso.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML" "__DIR__/entities/iso-amsr.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML" "__DIR__/entities/iso-box.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML" "__DIR__/entities/iso-cyr1.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML" "__DIR__/entities/iso-cyr2.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML" "__DIR__/entities/iso-dia.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES Greek Letters//EN//XML" "__DIR__/entities/iso-grk1.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML" "__DIR__/entities/iso-grk2.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES Greek Symbols//EN//XML" "__DIR__/entities/iso-grk3.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML" "__DIR__/entities/iso-grk4.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES Added Latin 1//EN//XML" "__DIR__/entities/iso-lat1.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES Added Latin 2//EN//XML" "__DIR__/entities/iso-lat2.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML" "__DIR__/entities/iso-num.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES Publishing//EN//XML" "__DIR__/entities/iso-pub.ent"
+PUBLIC "-//ISO 8879:1986//ENTITIES General Technical//EN//XML" "__DIR__/entities/iso-tech.ent"
diff --git a/xmlcharent.spec b/xmlcharent.spec
index f1a4fb2..3732e3d 100644
--- a/xmlcharent.spec
+++ b/xmlcharent.spec
@@ -1,7 +1,7 @@
#
-# spec file for package xmlcharent (Version 0.3)
+# spec file for package xmlcharent
#
-# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products 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,156 +15,51 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# norootforbuild
-
Name: xmlcharent
-BuildRequires: sgml-skel unzip
+Version: 0.3
+Release: 0
+Summary: XML Character Entities
License: BSD-3-Clause
Group: Productivity/Publishing/XML
+Url: http://www.oasis-open.org/docbook/xmlcharent/
+Source0: xmlcharent-0.3.tar.bz2
+Source1: xmlcharent.xml
+Source2: xmlcharent.sgml
+Requires: sgml-skel
+Requires: xml-group-manager
+BuildRequires: sgml-skel
+BuildRequires: xml-group-manager
BuildArch: noarch
-AutoReqProv: on
-Requires: sgml-skel libxml2
-%define regcat /usr/bin/sgml-register-catalog
-PreReq: %{regcat} /usr/bin/xmlcatalog /usr/bin/edit-xml-catalog
-PreReq: sed grep awk
-Version: 0.3
-Release: 405
-Summary: XML Character Entities
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: http://www.oasis-open.org/committees/docbook/%{name}/%{version}/%{name}-%{version}.zip
-Source1: catalog.xml
-Source2: CATALOG.xmlcharent
-Url: http://www.oasis-open.org/committees/docbook/xmlcharent/
%description
XML encodings for the 19 standard character entity sets defined in
non-normative Annex D of [ISO 8879:1986].
-
-
-%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}/xmlcharent
-%define xml_dir %{_datadir}/xml
-%define xml_mod_dir %{xml_dir}/entities/%{name}/%{version}
-%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
-
%prep
-%setup -n %{name} -c -T
-unzip -aq %{S:0}
-sed 's|@VERSION@|%{version}|
-s|@DIR@|%{xml_mod_dir}|' %{S:1} >catalog.xml
-sed 's|@VERSION@|%{version}|
-s|@DIR@|%{xml_mod_dir}|' %{S:2} >CATALOG.%{name}
-#%setup -q -n %{name}
+%setup -q -n %{name}-%{version}
+sed 's|__DIR__|%{_datadir}/%{name}|' %{SOURCE1} > xmlcharent.xml
+sed 's|__DIR__|%{_datadir}/%{name}|' %{SOURCE2} > xmlcharent.sgml
%build
-# # lynx -width=300 -dump entities-2002-03-19.html \
-# # | grep '\(Public\|System\) identifier' \
-# # | awk -F 'entifier: ' '
-# # / System i/ {printf "\"%s\"\n", gensub(/.*\//,"%{sgml_dir_iso}/", g, $2)}
-# # / Public i/ {printf "PUBLIC \"-//%s\" ", $2}' > CATALOG.xmlcharent
-# {
-# for f in iso-*.ent; do
-# {
-# grep ' *ISO 8879:1986' $f | sed 's:^ \+::' \
-# | awk '{printf "PUBLIC \"-//%s\"", $0}';
-# echo " \"%{sgml_dir_iso}/$f\"";
-# }
-# done
-# } > CATALOG.xmlcharent
-# sed 's:%{xml_mod_dir}/::' CATALOG.xmlcharent > sgml.catalog
-# Prep XML catalog fragment
-%define FOR_ROOT_CAT for-catalog-%{name}-%{version}.xml
-xmlcatbin=/usr/bin/xmlcatalog
-# build root catalog fragment
-rm -f %{FOR_ROOT_CAT}.tmp
-$xmlcatbin --noout --create %{FOR_ROOT_CAT}.tmp
-CATALOG=%{xml_mod_dir}/catalog.xml
-$xmlcatbin --noout --add "delegatePublic" "ISO 8879:1986//ENTITIES" \
- "file://$CATALOG" %{FOR_ROOT_CAT}.tmp
-# Create tag
-sed '/
-/<\/catalog/i\
- ' \
- %{FOR_ROOT_CAT}.tmp > %{FOR_ROOT_CAT}
%install
-%{INSTALL_DIR} %{buildroot}{%{xml_mod_dir},%{sgml_dir},%{sgml_var_dir}}
-%{INSTALL_DATA} catalog.xml *.ent %{buildroot}%{xml_mod_dir}
-%{INSTALL_DATA} CATALOG.xmlcharent %{buildroot}%{sgml_var_dir}
-pushd %{buildroot}%{sgml_dir}
-ln -sf ../../../var/lib/sgml/CATALOG.* .
-popd
-pushd %{buildroot}%{xml_mod_dir}
-for f in *.ent; do
- ln -sf "$f" "${f/-}"
-done
-popd
-# parse-sgml-catalog.sh CATALOG.xmlcharent > CATALOG.norm
-# sgml2xmlcat.sh -i CATALOG.norm \
-# -l -s '%{buildroot}/usr/share/sgml' -p xmlcharent
-#
-mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/xml
-install -m644 %{FOR_ROOT_CAT} ${RPM_BUILD_ROOT}%{_sysconfdir}/xml
-#
-%define all_cat xmlcharent
+%{__mkdir} -p %{buildroot}%{_datadir}/%{name}/entities/
+%{__install} -m 0664 -D *.ent %{buildroot}%{_datadir}/%{name}/entities/
+%{__install} -m 0644 -D xmlcharent.xml %{buildroot}%{_datadir}/%{name}/%{name}.xml
+%{__install} -m 0644 -D xmlcharent.sgml %{buildroot}%{_datadir}/%{name}/%{name}.sgml
%post
-if [ -x %{regcat} ]; then
- for c in %{all_cat}; do
- grep -q -e "%{sgml_dir}/CATALOG.$c\\>" /etc/sgml/catalog \
- || %{regcat} -a %{sgml_dir}/CATALOG.$c >/dev/null 2>&1 || :
- done
-fi
-xmlcatbin=usr/bin/xmlcatalog
-%if %suse_version < 810
- # autobuild on 8.0 does not install it early enough
- [ -x $xmlcatbin ] || {
- echo "warning: $xmlcatbin does not exist"
- echo "create etc/xml/catalog etc. manually"
- exit 0
- }
-%endif
-if [ -x /usr/bin/edit-xml-catalog ]; then
-/usr/bin/edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
- --add /etc/xml/%{FOR_ROOT_CAT}
-fi
+xml-group-manager -i %{name} -p "ISO 8879:1986//ENTITIES" -s "http://www.oasis-open.org/docbook/xmlcharent/0.3/" %{_datadir}/%{name}/%{name}.xml
+sgml-register-catalog -a %{_datadir}/%{name}/%{name}.sgml
%postun
-if [ "$1" = "0" -a -x %{regcat} ]; then
- for c in %{all_cat}; do
- %{regcat} -r %{sgml_dir}/CATALOG.$c >/dev/null 2>&1 || :
- done
-fi
-xmlcatbin=/usr/bin/xmlcatalog
-# remove entries only on removal of file
-if [ ! -f %{xml_sysconf_dir}/%{FOR_ROOT_CAT} -a -x /usr/bin/edit-xml-catalog ] ; then
- /usr/bin/edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
- --del %{name}-%{version}
-fi
-
-%clean
-rm -fr $RPM_BUILD_ROOT
+xml-group-manager -d %{name}
+sgml-register-catalog -r %{_datadir}/%{name}/%{name}.sgml
%files
%defattr(-, root, root)
-# %doc entities-*.html
-%{xml_mod_dir}
-%config %{_sysconfdir}/xml/%{FOR_ROOT_CAT}
-%config %{sgml_var_dir}/CATALOG.*
-# %{sgml_dir}/ISO*
-%{sgml_dir}/CATALOG.*
-%dir %{xml_dir}/entities
-%dir %{xml_dir}/entities/xmlcharent
+%{_datadir}/%{name}
%changelog
diff --git a/xmlcharent.xml b/xmlcharent.xml
new file mode 100644
index 0000000..3b8d7d7
--- /dev/null
+++ b/xmlcharent.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+