- Fix escaping of commented out patch: with RPM 4.20, %patch

becomes a standard, expandable macro, that can span more than one
  line. Commenting out with #%patch can thus lead to invalid
  results.

OBS-URL: https://build.opensuse.org/package/show/Publishing/dita?expand=0&rev=9
This commit is contained in:
Martin Pluskal 2025-01-16 13:34:24 +00:00 committed by Git OBS Bridge
commit 6ac0a3c1a5
6 changed files with 252 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:517547db9de8d4ec81c6a529ccd51a998446fd5c8e45c36f231be96e61da894e
size 109480

61
dita.changes Normal file
View File

@ -0,0 +1,61 @@
-------------------------------------------------------------------
Tue Jan 14 13:34:54 UTC 2025 - Dominique Leuenberger <dimstar@opensuse.org>
- Fix escaping of commented out patch: with RPM 4.20, %patch
becomes a standard, expandable macro, that can span more than one
line. Commenting out with #%patch can thus lead to invalid
results.
-------------------------------------------------------------------
Tue Feb 7 10:04:26 UTC 2012 - cfarrell@suse.com
- license update: SUSE-Oasis-Specification-Notice
Use this SUSE- spdx proprietary prefix until the oasis spec license
notice is pushed upstream
-------------------------------------------------------------------
Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de
- Remove redundant tags/sections from specfile
(cf. packaging guidelines)
-------------------------------------------------------------------
Thu Dec 24 13:03:11 UTC 2009 - aj@suse.de
- Only remove file from catalog if it disappeared.
- Do not use release numbers, they're not needed anymore.
-------------------------------------------------------------------
Thu Nov 29 12:54:17 CET 2007 - ke@suse.de
- Update to version 1.1.
- Fix Requires and PreReq.
-------------------------------------------------------------------
Thu Mar 29 11:47:16 CEST 2007 - coolo@suse.de
- fix BuildRequires
-------------------------------------------------------------------
Thu Jan 11 15:27:16 CET 2007 - ke@suse.de
- Remove /usr/share/xml from the files list.
-------------------------------------------------------------------
Wed Jan 25 21:46:07 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Mon Nov 21 16:40:27 CET 2005 - ke@suse.de
- Update to version 1.0.1.
- Add XML catalog.
-------------------------------------------------------------------
Fri Nov 18 15:26:57 CET 2005 - ke@suse.de
- New package: version 1.0.

161
dita.spec Normal file
View File

@ -0,0 +1,161 @@
#
# spec file for package dita
#
# Copyright (c) 2025 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: dita
BuildRequires: sgml-skel
BuildRequires: unzip
URL: http://www.oasis-open.org/committees/dita/
License: SUSE-Oasis-Specification-Notice
Group: Productivity/Publishing/XML
Requires: sgml-skel
%define regcat /usr/bin/sgml-register-catalog
PreReq: %{regcat} /usr/bin/xmlcatalog /usr/bin/edit-xml-catalog
PreReq: awk
PreReq: coreutils
PreReq: grep
PreReq: sed
Summary: OASIS Darwin Information Typing Architecture (DITA)
Version: 1.1
Release: 0
Source0: http://www.oasis-open.org/committees/download.php/24944/dita1.1.zip
Source1: http://www.oasis-open.org/committees/download.php/15396/dita-document-definitions-1.0.1.zip
# Patch: dita-catalog.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
This package contains the DITA specifications, DTDs, and schemas.
%define INSTALL install -m755 -s
%define INSTALL_DIR install -d -m755
%define INSTALL_DATA install -m644
%define INSTALL_SCRIPT install -m755
%define sgml_dir %{_datadir}/sgml
%define sgml_pack_dir %{sgml_dir}/%{name}
%define sgml_pack_dtd_dir %{sgml_pack_dir}/dtd
%define sgml_pack_custom_dir %{sgml_pack_dir}/custom
%define sgml_pack_style_dir %{sgml_pack_dir}/stylesheet
%define xml_dir %{_datadir}/xml
%define xml_pack_dir %{xml_dir}/dita
%define xml_pack_dtd_dir %{xml_pack_dir}/schema/dtd
%define xml_pack_rng_dir %{xml_pack_dir}/schema/rng
%define xml_pack_xsd_dir %{xml_pack_dir}/schema/xsd
%define xml_pack_custom_dir %{xml_pack_dir}/custom
%define xml_pack_style_dir %{xml_pack_dir}/stylesheet
%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 -c -n %{name}1.1
source="archspec-source.zip langspec-source.zip"
zip="archspec-html.zip langspec-html.zip ditadtd.zip ditaschema.zip"
for z in $zip; do
unzip -a $z
done
unzip -a -o %{S:1}
# %%patch -p 1
chmod -R a+rX,g-w,o-w .
find . -type f | xargs chmod a-x
%build
xmlcatbin=/usr/bin/xmlcatalog
$xmlcatbin --create --noout $CATALOG
%define FOR_ROOT_CAT for-catalog-%{name}-%{version}.xml
CATALOG=etc/xml/$CATALOG
cat42=%{xml_pack_dtd_dir}/1.1/catalog-dita.xml
rm -f %{FOR_ROOT_CAT}.tmp
$xmlcatbin --noout --create %{FOR_ROOT_CAT}.tmp
for s in \
"-//OASIS//DTD DITA" \
"-//OASIS//ELEMENTS DITA Concept//EN" \
"-//OASIS//ENTITIES DITA Topic Class//EN" \
"-//OASIS//ELEMENTS DITA" \
"-//OASIS//ENTITIES DITA"
do
$xmlcatbin --noout --add "delegatePublic" "$s" \
"file://$cat42" %{FOR_ROOT_CAT}.tmp
done
# Create tag
sed '/<catalog/a\
<group id="%{name}-%{version}">
/<\/catalog/i\
</group>' \
%{FOR_ROOT_CAT}.tmp > %{FOR_ROOT_CAT}
%install
#%{INSTALL_DIR} $RPM_BUILD_ROOT%{sgml_config_dir}
#%{INSTALL_DIR} $RPM_BUILD_ROOT%{xml_config_dir}
%{INSTALL_DIR} $RPM_BUILD_ROOT{%{xml_pack_xsd_dir},%{xml_pack_dtd_dir}}/1.1
# catalog-dita.txt
# catalog-dita.xml
cp dtd/* $RPM_BUILD_ROOT%{xml_pack_dtd_dir}/1.1
# DTDDECL "-//OASIS//DTD DocBook XML V4.1.2//EN" /usr/share/sgml/opensp/xml.dcl
{
echo OVERRIDE YES
grep '\.dtd\"' dtd/catalog-dita.txt \
| awk -F\" '{printf "DTDDECL \"%s\" /usr/share/sgml/opensp/xml.dcl\n", $2}'
cat dtd/catalog-dita.txt
} > $RPM_BUILD_ROOT%{xml_pack_dtd_dir}/1.1/%{name}.cat
ln -s %{xml_pack_dtd_dir}/1.1/catalog-dita.xml \
$RPM_BUILD_ROOT%{xml_pack_dtd_dir}/1.1/catalog.xml
cp schema/* $RPM_BUILD_ROOT%{xml_pack_xsd_dir}/1.1
%{INSTALL_DIR} $RPM_BUILD_ROOT%{sgml_pack_dtd_dir}
ln -s %{xml_pack_dtd_dir}/1.1 \
$RPM_BUILD_ROOT%{sgml_pack_dtd_dir}/1.1
cat_dir=%{buildroot}/etc/xml
%{INSTALL_DIR} $cat_dir
%{INSTALL_DATA} %{FOR_ROOT_CAT} $cat_dir
%post
if [ -x %{regcat} ]; then
%{regcat} -a %{xml_pack_dtd_dir}/1.1/%{name}.cat \
>/dev/null 2>&1 || true
fi
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
--add /etc/xml/%{FOR_ROOT_CAT}
exit 0
%postun
if [ "$1" = "0" -a -x %{regcat} ]; then
for c in %{xml_pack_dtd_dir}/1.1/%{name}.cat; do
%{regcat} -r $c \
>/dev/null 2>&1 || true
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
%files
%defattr(-, root, root)
%doc archspec langspec
# %config %{sgml_config_dir}/CATALOG.*
# %doc README.SuSE
# %{sgml_dir}/CATALOG.*
%{xml_pack_dir}
%{sgml_pack_dir}
%config %{xml_sysconf_dir}/%{FOR_ROOT_CAT}
%changelog

3
dita1.1.zip Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2c1c4ef94d6a4ba4d3ef5d1fd06373d827ee565a21a5bbc768e67bffac1af4ff
size 7728454