## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; 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 Name: nift Version: 3.0.3 Release: %autorelease Summary: Website generator License: MIT URL: https://nift.dev Source: https://github.com/nifty-site-manager/nsm/archive/v%{version}/nsm-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: lua-devel BuildRequires: luajit-devel BuildRequires: rapidjson-devel Requires: lua Requires: luajit # Not yet pacakged in Fedora # http://www.partow.net/programming/hashfunctions/index.html#Download Provides: bundled(hashtk) # http://www.partow.net/programming/exprtk/index.html Provides: bundled(exprtk) %description A fast framework for managing and generating websites. %prep %autosetup -n nsm-%{version} # Remove bundled libraries that are in Fedora rm -r LuaJIT rm -r Lua-5.3 rm -r rapidjson # Use path to Fedora Lua directories sed -i 's|-L/usr/local/lib -llua|-L/%{_libdir} -llua|g' Makefile sed -i 's|Lua-5.3/src/lua.hpp|%{_includedir}/lua.hpp|g' Makefile sed -i 's|LuaJIT/src/lua.hpp|%{_includedir}/luajit-2.1/lua.hpp|g' Makefile sed -i 's|Lua-5.3/src/lua.hpp|%{_includedir}/lua.hpp|g' Lua.h sed -i 's|LuaJIT/src/lua.hpp|%{_includedir}/luajit-2.1/lua.hpp|g' Lua.h sed -i 's|/usr/local/include/lua54/|%{_includedir}/|g' Lua.h # Do not remove debug information sed -i 's|+= -s|+= |g' Makefile # Use Fedora optimization level sed -i 's|-O3||g' Makefile # Remove spurious executable permissions chmod -x *.md chmod -x *.cpp chmod -x LICENSE # Softlink to packaged rapidjson dependency fles ln -s %{_includedir}/rapidjson rapidjson %build %make_build BUNDLED=0 \ CXX=g++ \ LUA_VERSION=5.4 \ LUAJIT_VERSION=5.1 \ PREFIX=%{_prefix} %install %make_install PREFIX=%{_prefix} # Replace copy of nift with a symbolic link pushd %{buildroot}%{_bindir} rm nift ln -s nsm nift popd %check # Smoke test %{buildroot}%{_bindir}/nift version %{buildroot}%{_bindir}/nift commands %files %license LICENSE %doc README.md %doc ReleaseNotes.md %doc TODO.md %{_bindir}/nift %{_bindir}/nsm %changelog ## START: Generated by rpmautospec * Sun Dec 15 2024 John Doe - 3.0.3-1 - Uncommitted changes ## END: Generated by rpmautospec