Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
windows:mingw:win64
mingw64-xmlcharent
mingw64-xmlcharent.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File mingw64-xmlcharent.spec of Package mingw64-xmlcharent
# # spec file for package mingw64-xmlcharent # # Copyright (c) 2015 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 # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # 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/ # %define _name xmlcharent Name: mingw64-%{_name} BuildRequires: mingw64-filesystem BuildRequires: mingw64-sgml-skel BuildRequires: sgml-skel BuildRequires: unzip BuildArch: noarch Requires: mingw64-sgml-skel %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: 0 Summary: XML Character Entities License: BSD-3-Clause Group: Productivity/Publishing/XML 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 %{_mingw64_datadir}/sgml %define sgml_var_dir %{_mingw64_localstatedir}/lib/sgml %define sgml_mod_dir %{sgml_dir}/xmlcharent %define sgml_config_dir %{_mingw64_localstatedir}/lib/sgml %define sgml_sysconf_dir %{_mingw64_sysconfdir}/sgml %define xml_dir %{_mingw64_datadir}/xml %define xml_mod_dir %{xml_dir}/entities/%{_name}/%{version} %define xml_config_dir %{_mingw64_localstatedir}/lib/xml %define xml_sysconf_dir %{_mingw64_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} %build # 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 rel_CATALOG=$(echo $CATALOG | sed 's,%{_mingw64_datadir},../../share,g') $xmlcatbin --noout --add "delegatePublic" "ISO 8879:1986//ENTITIES" \ "$rel_CATALOG" %{FOR_ROOT_CAT}.tmp # Create tag sed '/<catalog/a\ <group id="%{_name}-%{version}"> /<\/catalog/i\ </group>' \ %{FOR_ROOT_CAT}.tmp > %{FOR_ROOT_CAT} %install %{INSTALL_DIR} %{buildroot}{%{xml_mod_dir},%{sgml_dir},%{sgml_config_dir}} %{INSTALL_DATA} catalog.xml *.ent %{buildroot}%{xml_mod_dir} %{INSTALL_DATA} CATALOG.xmlcharent %{buildroot}%{sgml_config_dir} pushd %{buildroot}%{sgml_dir} ln -sf ../../var/lib/sgml/CATALOG.xmlcharent . 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}%{xml_sysconf_dir} install -m644 %{FOR_ROOT_CAT} ${RPM_BUILD_ROOT}%{xml_sysconf_dir} # %define all_cat xmlcharent %post if [ -x %{regcat} ]; then for c in %{all_cat}; do grep -q -e "%{sgml_dir}/CATALOG.$c\\>" %{sgml_sysconf_dir}/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 %{xml_sysconf_dir}/suse-catalog.xml \ --add %{xml_sysconf_dir}/%{FOR_ROOT_CAT} fi %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 %{xml_sysconf_dir}/suse-catalog.xml \ --del %{_name}-%{version} fi %clean rm -fr $RPM_BUILD_ROOT %files %defattr(-, root, root) # %doc entities-*.html %{xml_mod_dir} %config %{xml_sysconf_dir}/%{FOR_ROOT_CAT} %config %{sgml_config_dir}/CATALOG.* # %{sgml_dir}/ISO* %{sgml_dir}/CATALOG.* %dir %{sgml_dir} %dir %{xml_dir} %dir %{xml_dir}/entities %dir %{xml_dir}/entities/xmlcharent %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor