## START: Set by rpmautospec ## (rpmautospec version 0.6.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; 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 forgeurl https://github.com/termpaint/termpaint %global commit 20d324f4d1bab3665d8a36e9c6ee0062e22962f1 %forgemeta Name: termpaint Version: 0.3.0 Release: %autorelease Summary: Low level terminal access # BSD: valgrind support header, termpaint_image uses picojson License: Boost and BSD URL: %{forgeurl} Source0: %{forgesource} BuildRequires: meson BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: pkgconfig(fmt) BuildRequires: pkgconfig(catch2) BuildRequires: python3-sphinx Provides: bundled(valgrind) = 3.15 %if 0%{?rhel} Provides: bundled(picojson) = 1.3.0-0.20170306gita944d59 Provides: bundled(docopt-cpp) = 0.6.2-0.20200214gitc8a63d5 %global meson_use_system "disabled" %else BuildRequires: picojson-static BuildRequires: pkgconfig(docopt) %global meson_use_system "enabled" %endif %description Termpaint is a low level terminal interface library for character-cell terminals in the tradition of VT1xx (like xterm, etc). It is designed to be portable and flexible to integrate. It covers event handling and rendering. %package devel Summary: Header files for the termpaint library Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package contains the header files and symbolic links need for building software using termpaint, as well as the documentation. %prep %forgeautosetup rm -rf third-party/{catch.hpp,format.cc,format.h,linux_syscall_support.h} %if %{undefined rhel} rm -rf third-party/{picojson.h,docopt} %endif %build %meson -Dsystem-fmt=enabled -Dsystem-catch2=enabled \ -Dsystem-picojson=%{meson_use_system} -Dsystem-docopt=%{meson_use_system} \ -Dttyrescue-fexec-blob=false -Dttyrescue-path=%{_libdir}/termpaint/ \ -Dttyrescue-install=true -Dtools-path=%{_libdir}/termpaint/ %meson_build cd doc && python3 -m sphinx -b html . _build -a %install %meson_install mkdir -p %{buildroot}%{_pkgdocdir}/html cp -r doc/_build/. %{buildroot}%{_pkgdocdir}/html rm -rf %{buildroot}%{_pkgdocdir}/html/.doctrees rm -f %{buildroot}%{_pkgdocdir}/html/.buildinfo %check %meson_test %files %doc README.md %license COPYING %{_libdir}/libtermpaint.so.0a %{_libdir}/libtermpaint_image.so.0a %{_libdir}/termpaint/detect %{_libdir}/termpaint/inputevents %{_libdir}/termpaint/ttyrescue %files devel %{_libdir}/libtermpaint.so %{_libdir}/libtermpaint_image.so %{_libdir}/pkgconfig/termpaint.pc %{_libdir}/pkgconfig/termpaint_image.pc %{_includedir}/termpaint.h %{_includedir}/termpaint_event.h %{_includedir}/termpaint_image.h %{_includedir}/termpaint_input.h %{_includedir}/termpaintx.h %{_includedir}/termpaintx_ttyrescue.h %dir %{_pkgdocdir} %{_pkgdocdir}/html %changelog ## START: Generated by rpmautospec * Thu Apr 04 2024 Thomas Schneider - 0.3.0-3 - .copr/Makefile: Fix _sourcedir and rpmautospec * Thu Apr 04 2024 Thomas Schneider - 0.3.0-2 - Use bundled picojson and docopt-cpp on RHEL etc. * Wed Dec 06 2023 Thomas Schneider - 0.3.0-1 - Initial packaging ## END: Generated by rpmautospec