## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; 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: jo Summary: Small utility to create JSON objects Version: 1.9 Release: %autorelease URL: https://github.com/jpmens/jo Source0: %{url}/archive/%{version}/jo-%{version}.tar.gz # The entire source is GPL-2.0-or-later, except: # # - json.c and json.h are MIT # - base64.c and base64.h are LicenseRef-Fedora-Public-Domain: from base64.c, # “This code is public domain software.” # # See: # https://docs.fedoraproject.org/en-US/legal/license-field/#_public_domain # https://docs.fedoraproject.org/en-US/legal/update-existing-packages/#_public_domain License: GPL-2.0-or-later AND MIT AND LicenseRef-Fedora-Public-Domain # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: gcc BuildRequires: meson # Rebuild jo.1 and jo.md; we can omit this if it ever breaks. BuildRequires: pandoc # For automatic installation of completions support via meson BuildRequires: pkgconfig(bash-completion) # Upstream URL: http://ccodearchive.net/info/json.html # Upstream VCS: https://github.com/rustyrussell/ccan/tree/master/ccan/json # # This is a copylib and not designed to be built as a separate library. See # https://fedoraproject.org/wiki/Bundled_Libraries_Virtual_Provides; even under # the old guidelines, in which bundled libraries required FPC exemptions, a # variety of similar CCAN modules had exemptions as copylibs. # # Inspection of https://github.com/rustyrussell/ccan/tree/master/ccan/json # shows the bundled code is consistent with version 0.1 (as declared in a # comment in https://github.com/rustyrussell/ccan/blob/master/ccan/json/_info), # but has been forked with various small modifications in json.c. Provides: bundled(ccan-json) = 0.1 # The public-domain base64 implementation looks like a copylib, but I could not # find the upstream from which it was copied, so I am not treating it as a # bundled dependency. %description This is jo, a small utility to create JSON objects $ jo -p name=jo n=17 parser=false { "name": "jo", "n": 17, "parser": false } or arrays $ seq 1 10 | jo -a [1,2,3,4,5,6,7,8,9,10] %prep %autosetup %build %meson %meson_build %install %meson_install # Upstream’s Autotools build system installs the zsh completions, but the meson # version does not; we can handle it manually. install -D -p -m 0644 jo.zsh '%{buildroot}%{zsh_completions_dir}/_jo' %check ln -s '%{buildroot}%{_bindir}/jo' . bash -e ./tests/jo.test %files %license COPYING %doc AUTHORS %doc ChangeLog # NEWS not included because it is empty %doc press.md %doc README.md %doc jo.md %{_bindir}/jo %{_mandir}/man1/jo.1* # It is historically standard for packages providing shell completions to # co-own the completions directory in lieu of having a runtime dependency on # the relevant shell completions package. However, for bash (but not for other # shells), this directory and its parent are now owned by the “filesystem” # package in all current Fedora releases plus EPEL8 and newer. %{bash_completions_dir}/jo.bash %{zsh_completions_dir}/_jo %changelog * Tue Dec 20 2022 Benjamin A. Beasley 1.9-2 - Leaf package: remove i686 support * Mon Nov 14 2022 Benjamin A. Beasley 1.9-1 - Update to 1.9 (close RHBZ#2140231) * Mon Nov 14 2022 Benjamin A. Beasley 1.7-2 - Simplified packaging of completions - Requires filesystem-3.18-1 or later, which owns zsh completions dirs - Requires redhat-rpm-config-228-1 or later for shell completion macros * Sun Oct 30 2022 Benjamin A. Beasley 1.7-1 - Update to 1.7 (close RHBZ#2138606) * Sun Oct 30 2022 Benjamin A. Beasley 1.6-6 - Enable rebuilding jo.1 and jo.md from jo.pandoc * Sun Oct 30 2022 Benjamin A. Beasley 1.6-5 - Build with meson instead of Autotools * Fri Aug 05 2022 Benjamin A. Beasley 1.6-4 - Update License to SPDX * Thu Jul 21 2022 Fedora Release Engineering 1.6-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Thu Jan 20 2022 Fedora Release Engineering 1.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Wed Jan 05 2022 Benjamin A. Beasley 1.6-1 - Update to 1.6 (close RHBZ#2037114) * Thu Nov 11 2021 Benjamin A. Beasley 1.4-7 - Change License to effective license of “GPLv2+” * Thu Nov 11 2021 Benjamin A. Beasley 1.4-6 - Drop EPEL7 support in the currrent spec file * Thu Nov 11 2021 Benjamin A. Beasley 1.4-5 - Reduce macro indirection in the spec file * Thu Jul 22 2021 Fedora Release Engineering 1.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Thu Mar 25 2021 Benjamin A. Beasley - 1.4-2 - Improved source URL (better tarball name) * Fri Feb 05 2021 Benjamin A. Beasley - 1.4-1 - Initial package