%global project_name MicroTeX %global debug_package %{nil} %global commit0 0e3707f6dafebb121d98b53c64364d16fefe481d %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global bumpver 1 Name: microtex Version: 1.0%{?bumpver:^%{bumpver}.git%{shortcommit0}} Release: %autorelease Summary: A dynamic, cross-platform, and embeddable LaTeX rendering library License: MIT URL: https://github.com/NanoMichael/MicroTeX Source0: https://codeload.github.com/NanoMichael/MicroTeX/tar.gz/%{shortcommit0}#/%{project_name}-%{shortcommit0}.tar.gz BuildRequires: gcc-c++ cmake make BuildRequires: pkgconfig(tinyxml2) BuildRequires: gtkmm3.0-devel gtksourceviewmm3-devel cairomm-devel %description MicroTeX is a library for rendering LaTeX mathematical formulas, supporting multiple backends such as GTK+, Qt, and Skia. It provides both library components and demo applications for testing LaTeX rendering. %prep %setup -q -n %{project_name}-%{shortcommit0} %build mkdir -p build cd build cmake .. make -j${RPM_BUILD_NCPUS} %install install -d -m 0755 %{buildroot}/opt/MicroTeX install -Dpm 0644 build/LaTeX %{buildroot}/opt/MicroTeX/ cp -r build/res %{buildroot}/opt/MicroTeX/ install -Dpm 0644 LICENSE %{buildroot}%{_licensedir}/%{name}/LICENSE install -Dpm 0644 res/greek/LICENSE %{buildroot}%{_licensedir}/%{name}/LICENSE-greek install -Dpm 0644 res/cyrillic/LICENSE %{buildroot}%{_licensedir}/%{name}/LICENSE-cyrillic %files /opt/MicroTeX/ %license %{_licensedir}/%{name}/ %changelog %autochangelog