%global commit 653e353a03acfadf6fffd96a39ca187527a5e2ac %global snapdate 20240216 Name: lexertl17 Summary: The Modular Lexical Analyser Generator # The version number in CMakeLists.txt is not very meaningful; upstream does # not have a history of tagging releases for similar libraries. Version: 0.1.0^%{snapdate}git%(c='%{commit}'; echo "${c:0:7}") Release: %autorelease License: BSL-1.0 URL: https://github.com/BenHanson/lexertl17 Source: %{url}/archive/%{commit}/lexertl17-%{commit}.tar.gz BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: dos2unix # No compiled binaries are installed, so this would be empty. %global debug_package %{nil} %global common_description %{expand: lexertl is a header-only library for writing lexical analyzers. With lexertl you can: - Build lexical analyzers at runtime - Scan Unicode and ASCII input - Scan from files or memory - Generate C++ code or even write your own code generator} %description %{common_description} %package devel Summary: %{summary} # Header-only library: Provides: lexertl17-static = %{version}-%{release} # https://docs.fedoraproject.org/en-US/packaging-guidelines/Conflicts/#_compat_package_conflicts Conflicts: lexertl14-devel %description devel %{common_description} %prep %autosetup -n lexertl17-%{commit} # 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 --keepdate %build %cmake -DBUILD_TESTING:BOOL=on %cmake_build %install %cmake_install %check %ctest %files devel %license include/lexertl/licence_1_0.txt %doc README.md %{_includedir}/lexertl/ %{_libdir}/cmake/lexertl/ %changelog %autochangelog