File ada-url.spec of Package ada-url
#
# spec file for package ada-url
#
# Copyright (c) 2024 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: ada-url
Version: 2.9.0
%global forgeurl https://github.com/%{name}/ada
%define so_name @ADA_LIB_SOVERSION@
Release: 0
Summary: WHATWG-compliant and fast URL parser written in modern C++
License: Apache-2.0 OR MIT
URL: https://www.ada-url.com/
Source0: ada-%{version}.tar
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: cmake(cxxopts)
BuildRequires: cmake(fmt)
BuildRequires: cmake(GTest)
BuildRequires: cmake(benchmark)
BuildRequires: cmake(simdjson)
BuildRequires: doxygen
%{?suse_version:%define dapnx -n lib%{name}-}
%{?suse_version:%define deps lib%{name}%{so_name}%{?_isa}}
%{!?suse_version:%define deps %{name}%{?_isa}}
%if 0%{?suse_version}
%package -n lib%{name}%{so_name}
Summary: Runtime library for %{name}
%description -n lib%{name}%{so_name}
This package contains runtime library for %{name}.
%endif
%description
Ada is a fast and spec-compliant URL parser written in C++.
Specification for URL parser can be found from the WHATWG website.
The Ada library passes the full range of tests from the specification,
across a wide range of platforms.
It fully supports the relevant Unicode Technical Standard.
%package tools
Summary: Tools for %{name}
Requires: %{deps} = %{version}-%{release}
%description tools
This package contains command line utility for parsing URL.
%package %{?dapnx}devel
Summary: Development files for %{name}
Requires: %{deps} = %{version}-%{release}
%description %{?dapnx}devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
#package doc
#Summary: Developer documentation for %{name}
#Recommends: lib%{name}-devel = %{version}-%{release}
#BuildArch: noarch
#description doc
#The %{name}-doc package contains developer documentation for the %{name} package.
%prep
%autosetup -n ada-%{version} -p1
doxygen ./doxygen
%build
%cmake \
%if 0%{?fedora} <= 39
-DBUILD_TESTING:BOOL=OFF
%endif
%cmake_build
%install
%cmake_install
%check
%ctest
%files %{?suse_version:-n lib%{name}%{so_name}}
#%license LICENSE-MIT LICENSE-APACHE
#%doc README.md docs/cli.md
%{_libdir}/libada.so.%{so_name}*
#files tools
#{_bindir}/
%files %{?dapnx}devel
%{_libdir}/libada.so
%{_libdir}/cmake/ada/
%{_includedir}/ada/
%{_includedir}/ada.h
%{_includedir}/ada_c.h
#files doc
#doc docs/html/
%changelog