%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} %global _gitsha f25c624 Summary: A single-file, ANSI C, command-line parsing library that parses GNU-style command-line options Name: argtable3 Version: 3.2.2 Release: 0%{?dist} License: BSD Url: https://github.com/argtable/argtable3 Source: https://github.com/argtable/%{name}/releases/download/v%{version}.%{_gitsha}/argtable-v%{version}.%{_gitsha}.tar.gz BuildRequires: gcc BuildRequires: pkgconfig BuildRequires: cmake %description Argtable3 is an open source ANSI C library that parses GNU-style command-line options with the getopt library. It simplifies command-line parsing by defining a declarative-style API that you can use to specify what your command-line syntax looks like. Argtable3 will automatically generate consistent error handling logic and textual descriptions of the command line syntax, which are essential but tedious to implement for a robust CLI program. %package devel Summary: Development package that includes the argtable header files Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Header and development files for using argtable %prep %autosetup -p1 -n %{name}-%{version}.%{_gitsha} %cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=ON %build %cmake_build %install %cmake_install %files %{_libdir}/libargtable3.so* %files devel %{_includedir}/argtable3.h %{_libdir}/cmake/argtable3/* %ldconfig_scriptlets %changelog * Fri Dec 30 2022 Neil Hanlon - 3.2.2-0 - Initial package