%global commit ace8a58736364710fd161f2c22e44577e9ab5f74 %global snapdate 20230911 Name: parsertl14 Summary: The Modular Parser Generator # Upstream has never versioned the library. Version: 0^%{snapdate}git%(c='%{commit}'; echo "${c:0:7}") Release: %autorelease License: BSL-1.0 URL: https://github.com/BenHanson/parsertl14 Source: %{url}/archive/%{commit}/parsertl14-%{commit}.tar.gz BuildRequires: gcc-c++ BuildRequires: dos2unix BuildRequires: lexertl14-devel # Header-only library: # (Technically, dependent packages should have this BuildRequires too.) BuildRequires: lexertl14-static # No compiled binaries are installed, so this would be empty. %global debug_package %{nil} %global common_description %{expand: %{summary}.} %description %{common_description} %package devel Summary: %{summary} BuildArch: noarch # Header-only library: Provides: parsertl14-static = %{version}-%{release} Requires: lexertl14-devel %description devel %{common_description} %prep %autosetup -n parsertl14-%{commit} -p1 # Fix line terminations (particularly for files that may be installed) find . -type f -exec file '{}' '+' | grep -E '\bCRLF\b' | cut -d ':' -f 1 | xargs -r dos2unix # Nothing to build %install install -d '%{buildroot}%{_includedir}' cp -rvp include/parsertl '%{buildroot}%{_includedir}/' %check ${CXX} -I"${PWD}/include" ${CPPFLAGS} ${CXXFLAGS} -o include_test ${LDFLAGS} \ tests/include_test/*.cpp %files devel %license include/parsertl/licence_1_0.txt %doc README.md %{_includedir}/parsertl/ %changelog %autochangelog