2023-06-18 16:11:59 +00:00
|
|
|
%bcond icu 1
|
|
|
|
|
2007-11-26 18:41:19 +00:00
|
|
|
Name: xalan-c
|
2020-12-01 00:06:33 +00:00
|
|
|
Version: 1.12.0
|
2021-07-21 15:00:58 +00:00
|
|
|
# The soversion is made from the major and minor version numbers, e.g. 112 for
|
|
|
|
# version 1.12.x. We could do this automatically…
|
|
|
|
# %%global so_version %%(echo %%{version} | cut -d . -f -2 | tr -d .)
|
|
|
|
# …but we do not do so because we want to make sure we detect any soversion
|
|
|
|
# update.
|
|
|
|
%global so_version 112
|
2021-07-21 14:19:58 +00:00
|
|
|
Release: %autorelease
|
2020-11-30 21:29:18 +00:00
|
|
|
Summary: Xalan XSLT processor for C/C++
|
2007-11-26 18:41:19 +00:00
|
|
|
|
2022-11-29 19:35:47 +00:00
|
|
|
# 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
|
2024-02-27 13:37:08 +00:00
|
|
|
URL: https://apache.github.io/xalan-c/
|
2024-02-27 13:39:21 +00:00
|
|
|
%global tag Xalan-C_%{gsub %{version} . _}
|
2020-12-01 00:06:33 +00:00
|
|
|
%global tar_name xalan_c-%(echo %{version} | cut -d . -f -2)
|
2024-02-27 13:35:47 +00:00
|
|
|
%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
|
2024-04-05 15:33:13 +00:00
|
|
|
# Man page hand-written for Fedora in groff_man(7) format based on Xalan -?
|
|
|
|
Source3: Xalan.1
|
2020-12-01 00:06:33 +00:00
|
|
|
|
|
|
|
BuildRequires: gnupg2
|
|
|
|
BuildRequires: cmake
|
|
|
|
# Either make or ninja is supported.
|
|
|
|
BuildRequires: ninja-build
|
2018-07-09 17:06:53 +00:00
|
|
|
BuildRequires: gcc-c++
|
2024-04-05 14:47:18 +00:00
|
|
|
|
|
|
|
BuildRequires: dos2unix
|
2024-04-05 14:38:06 +00:00
|
|
|
BuildRequires: hardlink
|
|
|
|
|
2007-11-26 18:41:19 +00:00
|
|
|
BuildRequires: xerces-c-devel
|
2020-12-01 00:06:33 +00:00
|
|
|
%if %{with icu}
|
|
|
|
BuildRequires: libicu-devel
|
|
|
|
%endif
|
|
|
|
|
2024-04-05 15:13:22 +00:00
|
|
|
Requires: xalan-c-libs%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
%global common_description %{expand:
|
2020-11-30 21:29:18 +00:00
|
|
|
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.
|
|
|
|
|
2024-04-05 15:13:22 +00:00
|
|
|
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.
|
2007-11-26 18:41:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
%package devel
|
2021-09-28 18:19:08 +00:00
|
|
|
Summary: Development files for xalan-c
|
2024-04-05 15:13:22 +00:00
|
|
|
Requires: xalan-c-libs%{?_isa} = %{version}-%{release}
|
2007-11-26 18:41:19 +00:00
|
|
|
|
|
|
|
%description devel
|
2021-09-28 18:19:08 +00:00
|
|
|
The xalan-c-devel package contains libraries and header files for developing
|
|
|
|
applications that use xalan-c.
|
2007-11-26 18:41:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
%package doc
|
2021-09-28 18:19:08 +00:00
|
|
|
Summary: Documentation for xalan-c
|
2021-09-28 18:33:02 +00:00
|
|
|
|
|
|
|
# Doxygen HTML help is not suitable for packaging due to a minified JavaScript
|
|
|
|
# bundle inserted by Doxygen itself. See discussion at
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2006555.
|
|
|
|
#
|
|
|
|
# Normally, we would enable the Doxygen PDF documentation as a lesser
|
|
|
|
# substitute, but building it fails with:
|
|
|
|
# ! TeX capacity exceeded, sorry [pool size=5905151].
|
2024-04-05 14:54:09 +00:00
|
|
|
BuildArch: noarch
|
2007-11-26 18:41:19 +00:00
|
|
|
|
|
|
|
%description doc
|
2021-09-28 18:33:02 +00:00
|
|
|
Documentation for xalan-c. See https://apache.github.io/xalan-c/ for full HTML
|
|
|
|
documentation.
|
2007-11-26 18:41:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2020-12-01 00:06:33 +00:00
|
|
|
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
|
|
|
|
|
|
|
%autosetup -n %{tar_name}
|
|
|
|
|
|
|
|
# https://github.com/apache/xalan-c/pull/35
|
2021-07-21 15:02:45 +00:00
|
|
|
chmod -v a-x NOTICE
|
2020-12-01 00:06:33 +00:00
|
|
|
|
2020-12-05 14:51:44 +00:00
|
|
|
# Remove the Autotools build system cruft from the samples; otherwise, it would
|
|
|
|
# be installed as documentation. We leave the CmakeLists.txt even though it
|
|
|
|
# cannot be used standalone; it is used in the build (even though the built
|
|
|
|
# samples are only tested and not installed), and is annoying to exclude.
|
2020-12-01 00:06:33 +00:00
|
|
|
rm -vf samples/configure samples/configure.in
|
2007-11-26 18:41:19 +00:00
|
|
|
|
2024-04-05 14:47:18 +00:00
|
|
|
# Convert line endings as needed:
|
|
|
|
find docs samples src -type f -exec file '{}' '+' |
|
|
|
|
grep -F 'CRLF' |
|
|
|
|
awk -F ':' '{ print $1 }' |
|
|
|
|
xargs dos2unix --keepdate
|
|
|
|
|
2007-11-26 18:41:19 +00:00
|
|
|
|
|
|
|
%build
|
2021-07-21 15:02:06 +00:00
|
|
|
%cmake %{?with_icu:-Dtranscoder=icu} -GNinja
|
2020-12-01 00:06:33 +00:00
|
|
|
%cmake_build
|
2007-11-26 18:41:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
%install
|
2020-12-01 00:06:33 +00:00
|
|
|
%cmake_install
|
|
|
|
# Remove CMake-installed docs in favor of using the doc macro. We refer to
|
|
|
|
# _prefix/share instead of _datadir to mirror how the install path is defined
|
2021-09-28 18:33:02 +00:00
|
|
|
# in the relevant CMakeLists.txt. Note also that we do *not* want to install
|
|
|
|
# the HTML version of the API documentation.
|
2020-12-01 00:06:33 +00:00
|
|
|
rm -rf %{buildroot}%{_prefix}/share/doc/xalan-c/api
|
2007-11-26 18:41:19 +00:00
|
|
|
|
2024-04-05 14:38:06 +00:00
|
|
|
install -t '%{buildroot}%{_docdir}/%{name}-doc' -D -p -m 0644 \
|
2024-04-05 14:39:01 +00:00
|
|
|
README.md docs/*.md
|
2024-04-05 14:38:06 +00:00
|
|
|
cp -rvp docs/images/ samples/ '%{buildroot}%{_docdir}/%{name}-doc'
|
|
|
|
hardlink -c -v '%{buildroot}%{_docdir}/%{name}-doc'
|
|
|
|
|
2024-04-05 15:33:13 +00:00
|
|
|
install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{SOURCE3}'
|
|
|
|
|
2007-11-26 18:41:19 +00:00
|
|
|
|
2020-12-01 00:06:33 +00:00
|
|
|
%check
|
|
|
|
%ctest
|
2007-11-26 18:41:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%{_bindir}/Xalan
|
2024-04-05 15:33:13 +00:00
|
|
|
%{_mandir}/man1/Xalan.1*
|
2022-12-22 18:06:35 +00:00
|
|
|
|
2024-04-05 15:13:22 +00:00
|
|
|
|
|
|
|
%files libs
|
|
|
|
%license CREDITS LICENSE NOTICE
|
|
|
|
|
2022-12-22 18:06:35 +00:00
|
|
|
%{_libdir}/libxalanMsg.so.%{so_version}{,.*}
|
|
|
|
%{_libdir}/libxalan-c.so.%{so_version}{,.*}
|
2007-11-26 18:41:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
%files devel
|
2020-12-01 00:06:33 +00:00
|
|
|
%{_libdir}/libxalanMsg.so
|
|
|
|
%{_libdir}/libxalan-c.so
|
2022-12-22 18:06:30 +00:00
|
|
|
|
2007-11-26 18:41:19 +00:00
|
|
|
%{_includedir}/xalanc/
|
2022-12-22 18:06:30 +00:00
|
|
|
|
2020-12-01 00:06:33 +00:00
|
|
|
%dir %{_libdir}/cmake/XalanC
|
|
|
|
%{_libdir}/cmake/XalanC/*.cmake
|
2022-12-22 18:06:30 +00:00
|
|
|
|
2020-12-01 00:06:33 +00:00
|
|
|
%dir %{_libdir}/pkgconfig
|
2021-09-28 18:19:08 +00:00
|
|
|
%{_libdir}/pkgconfig/xalan-c.pc
|
2007-11-26 18:41:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
%files doc
|
2024-04-05 14:38:47 +00:00
|
|
|
%license CREDITS LICENSE NOTICE
|
2022-12-22 18:06:30 +00:00
|
|
|
|
2024-04-05 14:38:06 +00:00
|
|
|
%{_docdir}/%{name}-doc/
|
2007-11-26 18:41:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2021-07-21 14:19:58 +00:00
|
|
|
%autochangelog
|