## START: Set by rpmautospec ## (rpmautospec version 0.8.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 5; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: jsonnet Version: 0.22.0 Release: %autorelease Summary: A data templating language based on JSON # The entire source is Apache-2.0, except: # - doc/ (the HTML documentation) is doc/_layouts/base.html is CC-BY-2.5, # which is reflected in the License of the -doc subpackage # - The dependency “json” is a header-only library, so it must be treated as # a static library. Its license “MIT AND CC0-1.0” (the latter from a # bundled hedley) therefore contributes to the licenses of the binary RPMs # that include compiled programs and libraries. # Since the libs package is required under all conditions the %licence is there License: Apache-2.0 AND MIT AND CC0-1.0 URL: https://github.com/google/jsonnet Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz ExcludeArch: %{ix86} # Upstream wants to build single source wheels # these benefit from static linking, # but we want to link to libjsonnet here so we are sharing the lib Patch0001: 0001-python-Make-it-easy-to-link-to-external-libjsonnet.patch # Build fixes Patch0002: 0002-fix-system-rapidyaml-needs-include-for-c4core.patch Patch0003: 0003-chore-use-modern-cmake-version-detection.patch Patch0004: 0004-chore-fix-cast-conformance-in-C-23.patch Patch0005: 0005-core-Permit-use-of-rapidyaml-0.11.0.patch # Bundled MD5 C++ class in third_party/md5/ with very permissive license (RSA) # Per current guidance, we don’t need to record this as an additional license: # https://docs.fedoraproject.org/en-US/legal/misc/#_licensing_of_rsa_implementations_of_md5 # rpmlint must be notified of the unversioned provides Provides: bundled(md5-thilo) BuildRequires: python3-devel pyproject-rpm-macros BuildRequires: python3dist(wheel) python3dist(setuptools) BuildRequires: gcc gcc-c++ git BuildRequires: cmake gtest-devel gmock-devel BuildRequires: help2man # json is header only, so note the static lib for tracking BuildRequires: json-devel json-static # Not yet compatible with rapidyaml 0.11; see # https://github.com/google/jsonnet/pull/1313 for discussion. BuildRequires: rapidyaml-devel c4core-devel # Set our toplevel runtime requirements Requires: %{name}-libs%{?_isa} = %{version}-%{release} %global _description %{expand: A data templating language for app and tool developers based on JSON} %description %{_description} %package -n python3-%{name} Summary: %{name} Bindings for Python Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description -n python3-%{name} %{_description} %package libs Summary: Shared Libraries for %{name} %description libs %{_description} %package devel Summary: Development Headers for %{name} # This contains nothing derived from json-static, so the (MIT AND CC0-1.0) # portion can be omitted and the license is simply: License: Apache-2.0 Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description devel %{_description} %package doc Summary: Documentation for %{name} # This contains nothing derived from json-static, so the (MIT AND CC0-1.0) # portion can be omitted. HTML documentation from doc/ is CC-BY-2.5; examples/ # are Apache-2.0. License: Apache-2.0 AND CC-BY-2.5 BuildArch: noarch %description doc %{_description} %prep %autosetup -p1 # use system json lib instead rm -rfv third_party/json/* # don't bundel rapidyaml rm -rfv third_party/rapidyaml/* # don't bundle thirdparty doc resources # this leaves the doc "unbuilt" but still sorta useful rm -rf doc/third_party rm -rf doc/.gitignore # The documentation and examples include a few executable shell scripts. # Because this is an unusual location to install scripts, we need to fix their # shebangs manually. See: # https://docs.fedoraproject.org/en-US/packaging-guidelines/#_shebang_lines find doc examples -type f -perm /0111 -name '*.sh' -print0 | xargs -r -0 -t sed -r -i '1{s@^#!/usr/bin/env[[:blank:]]+bash@#!/bin/bash@}' %generate_buildrequires %pyproject_buildrequires %build # FIXME: # For reasons I'm not following, json-devel isn't added to include by cmake # # explicitly set -fPIC so python can pick it up later on export CXXFLAGS="%{optflags} -fPIC -I%{_includedir}/nlohmann" # setup our build environment %cmake \ -DBUILD_SHARED_BINARIES:BOOL=ON \ -DUSE_SYSTEM_JSON:BOOL=ON \ -DUSE_SYSTEM_GTEST:BOOL=ON \ -DUSE_SYSTEM_RAPIDYAML:BOOL=ON \ -DBUILD_STATIC_LIBS:BOOL=OFF # make tools and headers %cmake_build # make python binding JSONNET_DYNAMIC_LINK=1 export JSONNET_DYNAMIC_LINK %{__cp} %{__cmake_builddir}/lib%{name}*.s* . %pyproject_wheel %install %{cmake_install} # install python binding %pyproject_install %pyproject_save_files _jsonnet rm -f %{buildroot}%{python3_sitearch}/_jsonnet_test.py %check %ctest LD_LIBRARY_PATH='%{buildroot}%{_libdir}' \ PYTHONPATH='%{buildroot}%{python3_sitearch}' \ %{python3} python/_jsonnet_test.py %files %{_bindir}/jsonnet %{_bindir}/jsonnetfmt %{_mandir}/man1/jsonnet.1* %{_mandir}/man1/jsonnetfmt.1* %files libs %license LICENSE %doc README.md %{_libdir}/lib%{name}.so.* %{_libdir}/lib%{name}++.so.* %files devel %{_includedir}/lib%{name}* %{_libdir}/lib%{name}.so %{_libdir}/lib%{name}++.so %files -n python3-%{name} %{python3_sitearch}/* %files doc %license LICENSE %doc README.md %doc CONTRIBUTING %doc doc %doc examples %changelog ## START: Generated by rpmautospec * Mon Mar 30 2026 Pat Riehecky - 0.22.0-5 - Try to work with rapidyaml 0.11.0 * Sun Mar 29 2026 Benjamin A. Beasley - 0.22.0-4 - Use rapidyaml 0.10.0 / c4core 0.2.8 compat packages for now * Sun Mar 29 2026 Benjamin A. Beasley - 0.22.0-3 - Fix missing man pages (need help2man) * Sat Mar 28 2026 Pat Riehecky - 0.22.0-2 - Add missing compiler defs * Fri Mar 27 2026 Pat Riehecky - 0.22.0-1 - Update to 0.22.0 * Tue Mar 24 2026 Benjamin A. Beasley - 0.21.0-7 - Rebuilt for rapidyaml 0.11.0 * Fri Jan 16 2026 Fedora Release Engineering - 0.21.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild * Thu Oct 09 2025 Benjamin A. Beasley - 0.21.0-5 - Rebuilt for rapidyaml 0.10.0 * Thu Jul 24 2025 Fedora Release Engineering - 0.21.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Wed Jul 16 2025 Pat Riehecky - 0.21.0-3 - Set cmake4 support * Mon Jun 02 2025 Python Maint - 0.21.0-2 - Rebuilt for Python 3.14 * Fri May 09 2025 Pat Riehecky - 0.21.0-1 - Update to v0.21.0 * Fri Apr 18 2025 Benjamin A. Beasley - 0.21.0~rc2-2 - Rebuilt for rapidyaml 0.9.0 * Mon Mar 17 2025 Benjamin A. Beasley - 0.21.0~rc2-1 - Fix source URL etc. for 0.21.0-rc2 * Mon Mar 17 2025 Pat Riehecky - 0.21.0-4 - Permit older setuptools since we don't require newest * Mon Mar 17 2025 Pat Riehecky - 0.21.0-3 - Further fixes for building 0.21.0-rc2 * Mon Mar 17 2025 Pat Riehecky - 0.21.0-2 - Set buildrequires * Fri Mar 14 2025 Pat Riehecky - 0.21.0-1 - Setup for building 0.21.0 when it is released * Sat Feb 22 2025 Benjamin A. Beasley - 0.20.0-24 - Rebuilt for rapidyaml 0.8.0 * Fri Jan 17 2025 Fedora Release Engineering - 0.20.0-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Wed Jan 15 2025 Benjamin A. Beasley - 0.20.0-22 - Drop i686 support (in Fedora 42 and later) * Thu Sep 05 2024 Benjamin A. Beasley - 0.20.0-21 - Rebuilt for rapidyaml 0.7.2 * Fri Aug 23 2024 Benjamin A. Beasley - 0.20.0-20 - Backport support for rapidyaml 0.7 * Thu Jul 18 2024 Fedora Release Engineering - 0.20.0-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Thu Jun 20 2024 Pat Riehecky - 0.20.0-18 - Fix declarations * Thu Jun 20 2024 Pat Riehecky - 0.20.0-17 - Fix missing strip * Thu Jun 20 2024 Pat Riehecky - 0.20.0-16 - Try to fix depricated python calls * Fri Jun 07 2024 Python Maint - 0.20.0-15 - Rebuilt for Python 3.13 * Mon May 06 2024 Benjamin A. Beasley - 0.20.0-14 - Rebuilt for rapidyaml 0.6.0 * Wed Jan 24 2024 Fedora Release Engineering - 0.20.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sat Jan 20 2024 Fedora Release Engineering - 0.20.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Thu Jul 20 2023 Fedora Release Engineering - 0.20.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jun 13 2023 Python Maint - 0.20.0-10 - Rebuilt for Python 3.12 * Thu May 25 2023 Benjamin A. Beasley - 0.20.0-9 - Fix up shebangs in the docs and examples * Thu May 25 2023 Benjamin A. Beasley - 0.20.0-8 - Do not glob over the shared library SONAME version * Thu May 25 2023 Benjamin A. Beasley - 0.20.0-7 - Run the Python tests * Thu May 25 2023 Benjamin A. Beasley - 0.20.0-6 - Build Python bindings with pyproject-rpm-macros (“new guidelines”) * Thu May 25 2023 Benjamin A. Beasley - 0.20.0-5 - Update License to SPDX * Thu May 25 2023 Benjamin A. Beasley - 0.20.0-4 - Drop EPEL8 conditionals from spec file * Thu May 25 2023 Benjamin A. Beasley - 0.20.0-3 - Do not number patches; it is unnecessary * Thu May 25 2023 Benjamin A. Beasley - 0.20.0-2 - Drop “RSA” license per current guidance on RSA MD5 implementations * Mon Apr 17 2023 Pat Riehecky - 0.20.0-1 - Update to 0.20.0 * Thu Jan 19 2023 Fedora Release Engineering - 0.19.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Wed Nov 02 2022 Pat Riehecky - 0.19.1-1 - Update to 0.19.1 * Thu Jul 21 2022 Fedora Release Engineering - 0.17.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 0.17.0-6 - Rebuilt for Python 3.11 * Thu Jan 20 2022 Fedora Release Engineering - 0.17.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Jul 22 2021 Fedora Release Engineering - 0.17.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 25 2021 Benjamin A. Beasley - 0.17.0-3 - Fix Summary that was copy-pasted from python-jsondiff * Fri Jun 25 2021 Benjamin A. Beasley - 0.17.0-2 - Add downstream man pages * Thu Jun 24 2021 Pat Riehecky - 0.17.0-1 - Initial build ## END: Generated by rpmautospec