From 24acd886b3fe57e30b84adb1d1fdc1a40af13ae5 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 29 Nov 2022 14:35:47 -0500 Subject: [PATCH 01/15] Update License to SPDX --- xalan-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xalan-c.spec b/xalan-c.spec index 82e6bd0..07c5137 100644 --- a/xalan-c.spec +++ b/xalan-c.spec @@ -10,7 +10,10 @@ Version: 1.12.0 Release: %autorelease Summary: Xalan XSLT processor for C/C++ -License: ASL 2.0 +# The entire source is Apache-2.0, except cmake/RunTest.cmake, which is +# libtiff, but is a build-system file that does not contribute to the licenses +# of the binary RPMs. +License: Apache-2.0 URL: http://xalan.apache.org/xalan-c/ %global tag Xalan-C_%(echo '%{version}' | tr . _) %global tar_name xalan_c-%(echo %{version} | cut -d . -f -2) From 1a0a944d7f821bcff1df84b2f3258979669fb917 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 22 Dec 2022 13:06:30 -0500 Subject: [PATCH 02/15] Indicate dirs. in files list with trailing slashes --- xalan-c.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xalan-c.spec b/xalan-c.spec index 07c5137..8c26aab 100644 --- a/xalan-c.spec +++ b/xalan-c.spec @@ -113,21 +113,26 @@ rm -rf %{buildroot}%{_prefix}/share/doc/xalan-c/api %files devel %{_libdir}/libxalanMsg.so %{_libdir}/libxalan-c.so + %{_includedir}/xalanc/ + %dir %{_libdir}/cmake/XalanC %{_libdir}/cmake/XalanC/*.cmake + %dir %{_libdir}/pkgconfig %{_libdir}/pkgconfig/xalan-c.pc %files doc %license LICENSE + %doc CREDITS %doc KEYS %doc NOTICE %doc README.md -%doc docs/*.md docs/images -%doc samples +%doc docs/*.md +%doc docs/images/ +%doc samples/ %changelog From a4f5818966baee207cfc4e836afcf3ecc9664721 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 22 Dec 2022 13:06:35 -0500 Subject: [PATCH 03/15] Trivially simplify one files list --- xalan-c.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xalan-c.spec b/xalan-c.spec index 8c26aab..daab6b5 100644 --- a/xalan-c.spec +++ b/xalan-c.spec @@ -103,11 +103,11 @@ rm -rf %{buildroot}%{_prefix}/share/doc/xalan-c/api %doc KEYS %doc NOTICE %doc README.md + %{_bindir}/Xalan -%{_libdir}/libxalanMsg.so.%{so_version} -%{_libdir}/libxalanMsg.so.%{so_version}.* -%{_libdir}/libxalan-c.so.%{so_version} -%{_libdir}/libxalan-c.so.%{so_version}.* + +%{_libdir}/libxalanMsg.so.%{so_version}{,.*} +%{_libdir}/libxalan-c.so.%{so_version}{,.*} %files devel From f4e32bbb92da60ebd465d0e1a8775d93e26dc0b3 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 27 Feb 2024 08:35:47 -0500 Subject: [PATCH 04/15] Put the GitHub URL in its own macro [skip changelog] --- xalan-c.spec | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/xalan-c.spec b/xalan-c.spec index daab6b5..cd9cdee 100644 --- a/xalan-c.spec +++ b/xalan-c.spec @@ -14,13 +14,14 @@ Summary: Xalan XSLT processor for C/C++ # libtiff, but is a build-system file that does not contribute to the licenses # of the binary RPMs. License: Apache-2.0 -URL: http://xalan.apache.org/xalan-c/ +URL: http://apache.github.io/xalan-c/ %global tag Xalan-C_%(echo '%{version}' | tr . _) %global tar_name xalan_c-%(echo %{version} | cut -d . -f -2) -%global release_url https://github.com/apache/xalan-c/releases/download/%{tag} -Source0: %{release_url}/%{tar_name}.tar.gz -Source1: %{release_url}/%{tar_name}.tar.gz.asc -Source2: %{release_url}/KEYS +%global forgeurl https://github.com/apache/xalan-c/ +%global releaseurl %{forgeurl}/releases/download/%{tag} +Source0: %{releaseurl}/%{tar_name}.tar.gz +Source1: %{releaseurl}/%{tar_name}.tar.gz.asc +Source2: %{releaseurl}/KEYS BuildRequires: gnupg2 BuildRequires: cmake From c1ab286eefe46b15b41e68c7e52c36fd1a05c0e0 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 27 Feb 2024 08:37:08 -0500 Subject: [PATCH 05/15] Switch URL from HTTP to HTTPS --- xalan-c.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xalan-c.spec b/xalan-c.spec index cd9cdee..ae8799c 100644 --- a/xalan-c.spec +++ b/xalan-c.spec @@ -14,7 +14,7 @@ Summary: Xalan XSLT processor for C/C++ # libtiff, but is a build-system file that does not contribute to the licenses # of the binary RPMs. License: Apache-2.0 -URL: http://apache.github.io/xalan-c/ +URL: https://apache.github.io/xalan-c/ %global tag Xalan-C_%(echo '%{version}' | tr . _) %global tar_name xalan_c-%(echo %{version} | cut -d . -f -2) %global forgeurl https://github.com/apache/xalan-c/ From b23aae75d5d3461e67358b03570b576a84c3cdda Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 5 Apr 2024 10:38:06 -0400 Subject: [PATCH 06/15] Save some space in the -doc subpackage by hardlinking duplicate files --- xalan-c.spec | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/xalan-c.spec b/xalan-c.spec index ae8799c..a8eaa96 100644 --- a/xalan-c.spec +++ b/xalan-c.spec @@ -28,6 +28,8 @@ BuildRequires: cmake # Either make or ninja is supported. BuildRequires: ninja-build BuildRequires: gcc-c++ +BuildRequires: hardlink + BuildRequires: xerces-c-devel %if %{with icu} BuildRequires: libicu-devel @@ -93,6 +95,11 @@ rm -vf samples/configure samples/configure.in # the HTML version of the API documentation. rm -rf %{buildroot}%{_prefix}/share/doc/xalan-c/api +install -t '%{buildroot}%{_docdir}/%{name}-doc' -D -p -m 0644 \ + CREDITS KEYS NOTICE README.md docs/*.md +cp -rvp docs/images/ samples/ '%{buildroot}%{_docdir}/%{name}-doc' +hardlink -c -v '%{buildroot}%{_docdir}/%{name}-doc' + %check %ctest @@ -127,13 +134,7 @@ rm -rf %{buildroot}%{_prefix}/share/doc/xalan-c/api %files doc %license LICENSE -%doc CREDITS -%doc KEYS -%doc NOTICE -%doc README.md -%doc docs/*.md -%doc docs/images/ -%doc samples/ +%{_docdir}/%{name}-doc/ %changelog From 369c548037d18a4fb9a9c70533b787f03d2d2180 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 5 Apr 2024 10:38:47 -0400 Subject: [PATCH 07/15] Treat CREDITS and NOTICE as additional license files --- xalan-c.spec | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/xalan-c.spec b/xalan-c.spec index a8eaa96..4585a3d 100644 --- a/xalan-c.spec +++ b/xalan-c.spec @@ -96,7 +96,7 @@ rm -vf samples/configure samples/configure.in rm -rf %{buildroot}%{_prefix}/share/doc/xalan-c/api install -t '%{buildroot}%{_docdir}/%{name}-doc' -D -p -m 0644 \ - CREDITS KEYS NOTICE README.md docs/*.md + KEYS README.md docs/*.md cp -rvp docs/images/ samples/ '%{buildroot}%{_docdir}/%{name}-doc' hardlink -c -v '%{buildroot}%{_docdir}/%{name}-doc' @@ -106,10 +106,8 @@ hardlink -c -v '%{buildroot}%{_docdir}/%{name}-doc' %files -%license LICENSE -%doc CREDITS +%license CREDITS LICENSE NOTICE %doc KEYS -%doc NOTICE %doc README.md %{_bindir}/Xalan @@ -132,7 +130,7 @@ hardlink -c -v '%{buildroot}%{_docdir}/%{name}-doc' %files doc -%license LICENSE +%license CREDITS LICENSE NOTICE %{_docdir}/%{name}-doc/ From 27ef2e4037977f72ac31f016fd4d0b6ff8f61088 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 5 Apr 2024 10:39:01 -0400 Subject: [PATCH 08/15] Do not install KEYS --- xalan-c.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xalan-c.spec b/xalan-c.spec index 4585a3d..8072fa0 100644 --- a/xalan-c.spec +++ b/xalan-c.spec @@ -96,7 +96,7 @@ rm -vf samples/configure samples/configure.in rm -rf %{buildroot}%{_prefix}/share/doc/xalan-c/api install -t '%{buildroot}%{_docdir}/%{name}-doc' -D -p -m 0644 \ - KEYS README.md docs/*.md + README.md docs/*.md cp -rvp docs/images/ samples/ '%{buildroot}%{_docdir}/%{name}-doc' hardlink -c -v '%{buildroot}%{_docdir}/%{name}-doc' @@ -107,7 +107,6 @@ hardlink -c -v '%{buildroot}%{_docdir}/%{name}-doc' %files %license CREDITS LICENSE NOTICE -%doc KEYS %doc README.md %{_bindir}/Xalan From 86cd3616f12b55b70c70ac7789d2fa34bc374caf Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 5 Apr 2024 10:39:21 -0400 Subject: [PATCH 09/15] Do not install README.md in the base package, only in -doc --- xalan-c.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/xalan-c.spec b/xalan-c.spec index 8072fa0..55bbf40 100644 --- a/xalan-c.spec +++ b/xalan-c.spec @@ -107,7 +107,6 @@ hardlink -c -v '%{buildroot}%{_docdir}/%{name}-doc' %files %license CREDITS LICENSE NOTICE -%doc README.md %{_bindir}/Xalan From 3cb349ac5fb2ebdc56886e9c96722a1a39ddbc76 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 5 Apr 2024 10:47:18 -0400 Subject: [PATCH 10/15] Convert some stray CRNL line endings --- xalan-c.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xalan-c.spec b/xalan-c.spec index 55bbf40..87d7f62 100644 --- a/xalan-c.spec +++ b/xalan-c.spec @@ -28,6 +28,8 @@ BuildRequires: cmake # Either make or ninja is supported. BuildRequires: ninja-build BuildRequires: gcc-c++ + +BuildRequires: dos2unix BuildRequires: hardlink BuildRequires: xerces-c-devel @@ -81,6 +83,12 @@ chmod -v a-x NOTICE # samples are only tested and not installed), and is annoying to exclude. rm -vf samples/configure samples/configure.in +# Convert line endings as needed: +find docs samples src -type f -exec file '{}' '+' | + grep -F 'CRLF' | + awk -F ':' '{ print $1 }' | + xargs dos2unix --keepdate + %build %cmake %{?with_icu:-Dtranscoder=icu} -GNinja From f2d51a940437bf07e8b8d4d6abc4b4af00f16a1c Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 5 Apr 2024 10:53:36 -0400 Subject: [PATCH 11/15] Add an rpmlintrc file [skip changelog] --- xalan-c.rpmlintrc | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 xalan-c.rpmlintrc diff --git a/xalan-c.rpmlintrc b/xalan-c.rpmlintrc new file mode 100644 index 0000000..19f46cf --- /dev/null +++ b/xalan-c.rpmlintrc @@ -0,0 +1,10 @@ +# Not a real spelling error: +addFilter(r" spelling-error \('([Ss]tylesheet)s?',") +# Hardlinks within directories owned by a single package are safe. +addFilter(r" cross-directory-hard-link /\S+/xalan-c-doc/\S+ /\S+/xalan-c-doc/") +# All documentation is in the -doc subpackage. +addFilter(r" no-documentation$") +#xalan-c.x86_64: W: no-manual-page-for-binary Xalan +#xalan-c.x86_64: W: no-documentation +#xalan-c-devel.x86_64: W: no-documentation +#xalan-c-doc.x86_64: E: no-binary From c5b5aa7250b5c996b48f9ee482ab7b06297a58a5 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 5 Apr 2024 10:54:09 -0400 Subject: [PATCH 12/15] Make the -doc subpackage noarch --- xalan-c.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xalan-c.spec b/xalan-c.spec index 87d7f62..d0cdbc8 100644 --- a/xalan-c.spec +++ b/xalan-c.spec @@ -63,6 +63,7 @@ Summary: Documentation for xalan-c # Normally, we would enable the Doxygen PDF documentation as a lesser # substitute, but building it fails with: # ! TeX capacity exceeded, sorry [pool size=5905151]. +BuildArch: noarch %description doc Documentation for xalan-c. See https://apache.github.io/xalan-c/ for full HTML From d56023279704710e49de5cc9765e39e9083747e2 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 5 Apr 2024 11:13:22 -0400 Subject: [PATCH 13/15] Split libraries into a -libs subpackage separate from the command-line tool --- xalan-c.spec | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/xalan-c.spec b/xalan-c.spec index d0cdbc8..5cf3811 100644 --- a/xalan-c.spec +++ b/xalan-c.spec @@ -37,16 +37,30 @@ BuildRequires: xerces-c-devel BuildRequires: libicu-devel %endif -%description +Requires: xalan-c-libs%{?_isa} = %{version}-%{release} + +%global common_description %{expand: The Apache Xalan-C++ Project provides a library and a command line program to transform XML documents using a stylesheet that conforms to XSLT 1.0 standards. -Xalan is a project of the Apache Software Foundation. +Xalan is a project of the Apache Software Foundation.} + +%description %{common_description} + +This package contains the command-line tool. + + +%package libs +Summary: Shared libraries for xalan-c + +%description libs +The xalan-c-libs package contains libraries needed by the command-line tool and +by applications that use xalan-c. %package devel Summary: Development files for xalan-c -Requires: xalan-c%{?_isa} = %{version}-%{release} +Requires: xalan-c-libs%{?_isa} = %{version}-%{release} %description devel The xalan-c-devel package contains libraries and header files for developing @@ -115,10 +129,12 @@ hardlink -c -v '%{buildroot}%{_docdir}/%{name}-doc' %files -%license CREDITS LICENSE NOTICE - %{_bindir}/Xalan + +%files libs +%license CREDITS LICENSE NOTICE + %{_libdir}/libxalanMsg.so.%{so_version}{,.*} %{_libdir}/libxalan-c.so.%{so_version}{,.*} From 9f124b497f6c73d65c753b0751233f4f45720df5 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 5 Apr 2024 11:33:13 -0400 Subject: [PATCH 14/15] Add a man page for the Xalan command-line tool --- Xalan.1 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ xalan-c.spec | 5 +++++ 2 files changed, 57 insertions(+) create mode 100644 Xalan.1 diff --git a/Xalan.1 b/Xalan.1 new file mode 100644 index 0000000..28d0605 --- /dev/null +++ b/Xalan.1 @@ -0,0 +1,52 @@ +.TH XALAN "1" "April 2024" "" "User Commands" +.SH NAME +.B Xalan +\(en Transform XML documents using a stylesheet +.SH SYNOPSIS +.B Xalan +.RI [ OPTIONS ] +.I source +.I stylesheet +.SH DESCRIPTION +Transform XML documents using a stylesheet +that conforms to XSLT 1.0 standards. +.SH OPTIONS +A dash as the +.I source +argument reads from stdin. +.RB ( \- +cannot be used for both arguments.) +.TP +.B \-a +Use xml-stylesheet PI, not the +.I stylesheet +argument. +.TP +.B \-e\ \fIencoding +Force the specified encoding for the output. +.TP +.B \-i\ \fIinteger +Indent the specified amount. +.TP +.B \-m +Omit the +.B META +tag in HTML output. +.TP +.B \-o\ \fIfilename +Write output to the specified file. +.TP +.B \-p\ \fIname\ expression +Sets a stylesheet parameter. +.TP +.B \-t +Display timing information. +.TP +.B \-u +Disable escaping of URLs in HTML output. +.TP +.B \-? +Display a help message. +.TP +.B \-v +Validates source documents. diff --git a/xalan-c.spec b/xalan-c.spec index 5cf3811..94de846 100644 --- a/xalan-c.spec +++ b/xalan-c.spec @@ -22,6 +22,8 @@ URL: https://apache.github.io/xalan-c/ Source0: %{releaseurl}/%{tar_name}.tar.gz Source1: %{releaseurl}/%{tar_name}.tar.gz.asc Source2: %{releaseurl}/KEYS +# Man page hand-written for Fedora in groff_man(7) format based on Xalan -? +Source3: Xalan.1 BuildRequires: gnupg2 BuildRequires: cmake @@ -123,6 +125,8 @@ install -t '%{buildroot}%{_docdir}/%{name}-doc' -D -p -m 0644 \ cp -rvp docs/images/ samples/ '%{buildroot}%{_docdir}/%{name}-doc' hardlink -c -v '%{buildroot}%{_docdir}/%{name}-doc' +install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{SOURCE3}' + %check %ctest @@ -130,6 +134,7 @@ hardlink -c -v '%{buildroot}%{_docdir}/%{name}-doc' %files %{_bindir}/Xalan +%{_mandir}/man1/Xalan.1* %files libs From f21d05ef49a38cd5c522e06c20592f35ad2e07f0 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 13 Dec 2024 14:14:24 -0500 Subject: [PATCH 15/15] Add a SourceLicense field --- xalan-c.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xalan-c.spec b/xalan-c.spec index 94de846..dfee185 100644 --- a/xalan-c.spec +++ b/xalan-c.spec @@ -14,6 +14,7 @@ Summary: Xalan XSLT processor for C/C++ # libtiff, but is a build-system file that does not contribute to the licenses # of the binary RPMs. License: Apache-2.0 +SourceLicense: %{license} AND libtiff URL: https://apache.github.io/xalan-c/ %global tag Xalan-C_%(echo '%{version}' | tr . _) %global tar_name xalan_c-%(echo %{version} | cut -d . -f -2)