Last active
December 29, 2015 14:49
-
-
Save tkuchiki/7686688 to your computer and use it in GitHub Desktop.
luajit rpmbuild
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VERSION=2.0.2 | |
MAJOR_VERSION=`echo $VERSION | cut -d . -f 1` | |
MINOR_VERSION=`echo $VERSION | cut -d . -f 2` | |
LIBVERSION=5.1 | |
LUAJIT_DIR=LuaJIT-$VERSION | |
LUAJIT_SRC=$LUAJIT_DIR.tar.gz | |
RPM_BUILD_DIR=$HOME/rpmbuild | |
LUAJIT_SOURCES=$RPM_BUILD_DIR/SOURCES | |
LUAJIT_SPEC=$RPM_BUILD_DIR/SPECS/luajit.spec | |
curl https://gist.github.com/tkuchiki/7686688/raw/c78c75c1f498a8ab198a8eaa5031be4142e1b44f/template_luajit.spec -o $LUAJIT_SPEC | |
sed -i -e "s/__VERSION__/$VERSION/" $LUAJIT_SPEC | |
sed -i -e "s/__MAJOR__/$MAJOR_VERSION/" $LUAJIT_SPEC | |
sed -i -e "s/__MINOR__/$MINOR_VERSION/" $LUAJIT_SPEC | |
sed -i -e "s/__LIBVERSION__/$LIBVERSION/" $LUAJIT_SPEC | |
cd $LUAJIT_SOURCES | |
curl http://luajit.org/download/$LUAJIT_SRC -O | |
rpmbuild -ba $LUAJIT_SPEC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name: LuaJIT | |
Version: __VERSION__ | |
Release: 1%{?dist} | |
Summary: Just-In-Time Compiler (JIT) for the Lua programming language. | |
Group: Development/Languages | |
License: BSD | |
URL: http://luajit.org | |
Source0: http://luajit.org/download/%{name}-%{version}.tar.gz | |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | |
BuildRequires: gcc >= 4.0 | |
ExcludeArch: ppc64 | |
%define major __MAJOR__ | |
%define minor __MINOR__ | |
%define libversion __LIBVERSION__ | |
%description | |
LuaJIT is a Just-In-Time Compiler (JIT) for the Lua programming language. | |
Lua is a powerful, dynamic and light-weight programming language. | |
It may be embedded or used as a general-purpose, stand-alone language. | |
%prep | |
%setup -q | |
%build | |
make %{?_smp_mflags} \ | |
DEBUG='' \ | |
CFLAGS='%{optflags}' \ | |
V=1 \ | |
all | |
%install | |
rm -fr %{buildroot} | |
make | |
make install PREFIX=%{buildroot}%{_prefix} | |
%clean | |
rm -fr %{buildroot} | |
%pre | |
exit 0 | |
%files | |
/usr/bin/luajit | |
/usr/bin/luajit-%{version} | |
/usr/include/luajit-%{major}.%{minor}/lauxlib.h | |
/usr/include/luajit-%{major}.%{minor}/lua.h | |
/usr/include/luajit-%{major}.%{minor}/lua.hpp | |
/usr/include/luajit-%{major}.%{minor}/luaconf.h | |
/usr/include/luajit-%{major}.%{minor}/luajit.h | |
/usr/include/luajit-%{major}.%{minor}/lualib.h | |
/usr/lib/libluajit-%{libversion}.a | |
/usr/lib/libluajit-%{libversion}.so | |
/usr/lib/libluajit-%{libversion}.so.2 | |
/usr/lib/libluajit-%{libversion}.so.%{version} | |
/usr/lib/pkgconfig/luajit.pc | |
/usr/share/luajit-%{version}/jit/bc.lua | |
/usr/share/luajit-%{version}/jit/bcsave.lua | |
/usr/share/luajit-%{version}/jit/dis_arm.lua | |
/usr/share/luajit-%{version}/jit/dis_mips.lua | |
/usr/share/luajit-%{version}/jit/dis_mipsel.lua | |
/usr/share/luajit-%{version}/jit/dis_ppc.lua | |
/usr/share/luajit-%{version}/jit/dis_x64.lua | |
/usr/share/luajit-%{version}/jit/dis_x86.lua | |
/usr/share/luajit-%{version}/jit/dump.lua | |
/usr/share/luajit-%{version}/jit/v.lua | |
/usr/share/luajit-%{version}/jit/vmdef.lua | |
/usr/share/man/man1/luajit.1.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment