xalan-c/xalan-c.spec
2021-09-28 17:12:16 -04:00

119 lines
2.9 KiB
RPMSpec

Name: xalan-c
Version: 1.11.0
Release: %autorelease
Summary: Xalan XSLT processor for C/C++
License: ASL 2.0
URL: https://xalan.apache.org/%{name}/
%global tag Xalan-C_%(echo '%{version}' | tr . _)
%global tar_name %{tag}
%global release_url https://github.com/apache/%{name}/archive/
Source0: %{release_url}/%{tar_name}.tar.gz
Patch0: xalan-c-1.10.0-escaping.patch
BuildRequires: make
BuildRequires: gnulib-devel
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: xerces-c-devel
%global so_version %(echo %{version} | cut -d . -f -2 | tr -d .)
# For EPEL
%global _hardened_build 1
%description
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.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for developing
applications that use %{name}.
%package doc
Summary: Documentation for %{name}
# 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].
%description doc
Documentation for xalan-c. See https://apache.github.io/xalan-c/ for full HTML
documentation.
%prep
%autosetup -n %{name}-%{tar_name} -p2
# https://github.com/apache/xalan-c/pull/35
chmod a-x NOTICE
# Update config.guess/config.sub for new architectures (aarch64)
cp -vp \
%{_datadir}/gnulib/build-aux/config.guess \
%{_datadir}/gnulib/build-aux/config.sub \
./
%build
export XALANCROOT="${PWD}"
export XERCESROOT=%{_includedir}/xercesc/
COMMONARGS="-plinux -cgcc -xg++ -minmem"
./runConfigure ${COMMONARGS} -b%{__isa_bits} -P %{_prefix} -C --libdir="%{_libdir}" -z '%{optflags}'
# Parallel build does not work
%global _smp_mflags %{nil}
%make_build all tests
%install
export XALANCROOT="${PWD}"
export XERCESROOT=%{_includedir}/xercesc/
%make_install
# Required for EPEL:
%ldconfig_scriptlets
%check
env LD_LIBRARY_PATH=$PWD/lib ./bin/testXPath
# env LD_LIBRARY_PATH=$PWD/lib ./bin/ThreadTest crashes; how inauspicious!
%files
%license LICENSE
%{_bindir}/Xalan
%{_libdir}/libxalanMsg.so.%{so_version}
%{_libdir}/libxalanMsg.so.%{so_version}.*
%{_libdir}/libxalan-c.so.%{so_version}
%{_libdir}/libxalan-c.so.%{so_version}.*
%files devel
%{_libdir}/libxalanMsg.so
%{_libdir}/libxalan-c.so
%{_includedir}/xalanc/
%files doc
%license LICENSE
%doc KEYS
%doc NOTICE
%doc README
%doc readme.html
%doc samples
%changelog
%autochangelog