xalan-c/xalan-c.spec

126 lines
3.2 KiB
RPMSpec
Raw Normal View History

%bcond_without icu
2007-11-26 18:41:19 +00:00
Name: xalan-c
Version: 1.12.0
# 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
Summary: Xalan XSLT processor for C/C++
2007-11-26 18:41:19 +00:00
License: ASL 2.0
URL: http://xalan.apache.org/%{name}/
%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/%{name}/releases/download/%{tag}
Source0: %{release_url}/%{tar_name}.tar.gz
Source1: %{release_url}/%{tar_name}.tar.gz.asc
Source2: %{release_url}/KEYS
BuildRequires: gnupg2
BuildRequires: cmake
# Either make or ninja is supported.
BuildRequires: ninja-build
BuildRequires: gcc-c++
2007-11-26 18:41:19 +00:00
BuildRequires: xerces-c-devel
%if %{with icu}
BuildRequires: libicu-devel
%endif
2007-11-26 18:41:19 +00:00
%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.
2007-11-26 18:41:19 +00:00
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: cmake-filesystem
2007-11-26 18:41:19 +00:00
%description devel
The %{name}-devel package contains libraries and header files for developing
applications that use %{name}.
2007-11-26 18:41:19 +00:00
%package doc
Summary: Documentation for %{name}
BuildRequires: doxygen
2007-11-26 18:41:19 +00:00
%description doc
Documentation for %{name}.
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -n %{tar_name}
# https://github.com/apache/xalan-c/pull/35
chmod a-x NOTICE
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.
rm -vf samples/configure samples/configure.in
2007-11-26 18:41:19 +00:00
%build
2021-07-21 15:02:06 +00:00
%cmake %{?with_icu:-Dtranscoder=icu} -GNinja
%cmake_build
2007-11-26 18:41:19 +00:00
%install
%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
# in the relevant CMakeLists.txt.
rm -rf %{buildroot}%{_prefix}/share/doc/xalan-c/api
2007-11-26 18:41:19 +00:00
%check
%ctest
2007-11-26 18:41:19 +00:00
%files
%license LICENSE
%doc CREDITS
%doc KEYS
%doc NOTICE
%doc README.md
2007-11-26 18:41:19 +00:00
%{_bindir}/Xalan
%{_libdir}/libxalanMsg.so.%{so_version}
%{_libdir}/libxalanMsg.so.%{so_version}.*
%{_libdir}/libxalan-c.so.%{so_version}
%{_libdir}/libxalan-c.so.%{so_version}.*
2007-11-26 18:41:19 +00:00
%files devel
%{_libdir}/libxalanMsg.so
%{_libdir}/libxalan-c.so
2007-11-26 18:41:19 +00:00
%{_includedir}/xalanc/
%dir %{_libdir}/cmake/XalanC
%{_libdir}/cmake/XalanC/*.cmake
%dir %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/%{name}.pc
2007-11-26 18:41:19 +00:00
%files doc
%license LICENSE
%doc CREDITS
%doc KEYS
%doc NOTICE
%doc README.md
%doc docs/*.md docs/images
%doc %{_vpath_builddir}/docs/doxygen/api
%doc samples
2007-11-26 18:41:19 +00:00
%changelog
2021-07-21 14:19:58 +00:00
%autochangelog