## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 9; 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 %global forgeurl0 %{url} Name: docopt-cpp Version: 0.6.3 Release: %autorelease Summary: C++11 Port of docopt License: MIT or Boost URL: https://github.com/docopt/docopt.cpp %forgemeta Source0: %{forgesource0} # https://github.com/docopt/docopt.cpp/pull/145 Patch1: %{url}/pull/145.patch#/docopt-0.6.3-run-tests.patch BuildRequires: cmake gcc-c++ BuildRequires: rpmautospec redhat-rpm-config # Needed for tests BuildRequires: python3-devel %global common_description %{expand:docopt creates beautiful command-line interfaces Isn't it awesome how getopt (and boost::program_options for you fancy folk!) generate help messages based on your code?! These timeless functions have been around for decades and have proven we don't need anything better, right? Hell no! You know what's awesome? It's when the option parser is generated based on the beautiful help message that you write yourself! This way you don't need to write this stupid repeatable parser-code, and instead can write only the help message-the way you want it. } %description %{common_description} This is a port of the docopt.py module (https://github.com/docopt/docopt), and we have tried to maintain full feature parity (and code structure) as the original. This port is written in C++11 and also requires a good C++11 standard library (in particular, one with regex support). %package devel Summary: Developer files for a docopt C++11 port Requires: cmake-filesystem Requires: %{name}%{?_isa} = %{version}-%{release} %description devel %{common_description} Contains developer headers and a library. Install if docopt.cpp is used in a code to be compiled. %prep %forgeautosetup -p1 %build %cmake -DWITH_TESTS=on %cmake_build %install %cmake_install rm -f ${RPM_BUILD_ROOT}%{_libdir}/libdocopt.a %check pushd "%{__cmake_builddir}" %python3 run_tests popd %files %license LICENSE-Boost-1.0 LICENSE-MIT %doc README.rst %{_libdir}/libdocopt.so.0* %files devel %{_includedir}/docopt %{_libdir}/cmake/docopt %{_libdir}/libdocopt.so %{_libdir}/pkgconfig/docopt.pc %changelog * Thu Jul 21 2022 Fedora Release Engineering 0.6.3-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Thu Jan 20 2022 Fedora Release Engineering 0.6.3-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Nov 19 2021 Petr Menšík 0.6.3-7 - Explain why upstream repository name is not used * Fri Nov 19 2021 Petr Menšík 0.6.3-6 - Add upstream links to README * Fri Nov 19 2021 Petr Menšík 0.6.3-5 - Upload sources, shorten patch URL * Fri Nov 19 2021 Petr Menšík 0.6.3-4 - More review changes * Fri Nov 19 2021 Petr Menšík 0.6.3-3 - Add check section with tests running * Fri Nov 19 2021 Petr Menšík 0.6.3-2 - Update descriptions according to review * Fri Nov 19 2021 Petr Menšík 0.6.3-1 - Initial commit with %%autorelease