File luajit.spec of Package luajit
%global rctag beta3
Name: luajit
Version: 2.1.0
%global apiver %(v=%{version}; echo ${v%.${v#[0-9].[0-9].}})
%global srcver %{version}%{?rctag:-%{rctag}}
Release: 0.20.0%{?dist}
Summary: Just-In-Time Compiler for Lua
License: MIT
URL: http://luajit.org/
Source0: LuaJIT-%{srcver}.tar.gz
# Patches from https://github.com/siddhesh/LuaJIT.git
# Generated from v2.1 branch against the 2.1.0-beta3 tag.
# Some patches, as indicated below, have been modified to account for merge
# commits, so care needs to be taken when auto-generating patches so that
# existing patches are not replaced.
ExclusiveArch: %{arm} %{ix86} x86_64 %{mips} aarch64 s390x ppc64le
BuildRequires: gcc
BuildRequires: make
%description
LuaJIT implements the full set of language features defined by Lua 5.1.
The virtual machine (VM) is API- and ABI-compatible to the standard
Lua interpreter and can be deployed as a drop-in replacement.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
This package contains development files for %{name}.
%prep
%autosetup -n LuaJIT-%{srcver} -p1
# Enable Lua 5.2 features
#sed -i -e '/-DLUAJIT_ENABLE_LUA52COMPAT/s/^#//' src/Makefile
# preserve timestamps (cicku)
sed -i -e '/install -m/s/-m/-p -m/' Makefile
%build
# Q= - enable verbose output
# E= @: - disable @echo messages
# NOTE: we use amalgamated build as per documentation suggestion doc/install.html
%if 0%{?fedora_version} > 32
make amalg Q= E=@: PREFIX=%{_prefix} TARGET_STRIP=: \
CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" \
MULTILIB=%{_lib}
%else
make amalg Q= E=@: PREFIX=%{_prefix} TARGET_STRIP=: \
MULTILIB=%{_lib}
%endif
%install
# PREREL= - disable -betaX suffix
# INSTALL_TNAME - executable name
%make_install PREFIX=%{_prefix} \
MULTILIB=%{_lib}
#rm -rf _tmp_html ; mkdir _tmp_html
#cp -a doc _tmp_html/html
# Remove static .a
find %{buildroot} -type f -name *.a -delete -print
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%check
# Don't fail the build on a check failure.
make check || true
%files
%license COPYRIGHT
%doc README
%{_bindir}/%{name}*
%{_libdir}/lib%{name}-*.so.*
%{_mandir}/man1/%{name}.1*
%{_datadir}/%{name}-%{srcver}/
%files devel
#%doc _tmp_html/html/
%{_includedir}/%{name}-%{apiver}/
%{_libdir}/lib%{name}-*.so
%{_libdir}/pkgconfig/%{name}.pc
%changelog
* Tue Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-0.20beta3
- Up to date with git 20210112 superset stupid feladora shit
- do not build docs. this is only for complain happy minenux minetst 5 depends
- do not enalbe 5.2 compat .. we dont have xpertise and mient4st only needs 5.1