]>
Commit | Line | Data |
---|---|---|
1 | # TODO | |
2 | # - x32 not supported by upstream: http://www.freelists.org/post/luajit/Building-luajit202-on-x32,1 | |
3 | ||
4 | %define snap 20220429 | |
5 | Summary: Just-in-Time compiler for Lua | |
6 | Summary(pl.UTF-8): Kompilator JIT dla języka Lua | |
7 | Name: luajit | |
8 | Version: 2.1.0 | |
9 | Release: 0.%{snap}.1 | |
10 | License: MIT | |
11 | Group: Libraries | |
12 | # Source0Download: http://luajit.org/download.html | |
13 | Source0: %{name}-%{version}-%{snap}.tar.xz | |
14 | # Source0-md5: 201b01f0b6830a1a2bd70341587e868a | |
15 | Patch0: config.patch | |
16 | URL: http://luajit.org/ | |
17 | BuildRequires: sed >= 4.0 | |
18 | BuildRequires: tar >= 1:1.22 | |
19 | BuildRequires: xz | |
20 | ExclusiveArch: %{ix86} %{x8664} %{arm} aarch64 mips mips64 mipsel ppc | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %define lua_abi 5.1 | |
24 | ||
25 | %description | |
26 | LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming | |
27 | language. | |
28 | ||
29 | %description -l pl.UTF-8 | |
30 | LuaJIT to działający w locie (Just-In-Time) kompilator języka Lua. | |
31 | ||
32 | %package devel | |
33 | Summary: Header files for LuaJIT library | |
34 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LuaJIT | |
35 | Group: Development/Libraries | |
36 | Requires: %{name} = %{version}-%{release} | |
37 | ||
38 | %description devel | |
39 | Header files for LuaJIT library. | |
40 | ||
41 | %description devel -l pl.UTF-8 | |
42 | Pliki nagłówkowe biblioteki LuaJIT. | |
43 | ||
44 | %package static | |
45 | Summary: Static LuaJIT library | |
46 | Summary(pl.UTF-8): Statyczna biblioteka LuaJIT | |
47 | Group: Development/Libraries | |
48 | Requires: %{name}-devel = %{version}-%{release} | |
49 | ||
50 | %description static | |
51 | Static LuaJIT library. | |
52 | ||
53 | %description static -l pl.UTF-8 | |
54 | Statyczna biblioteka LuaJIT. | |
55 | ||
56 | %prep | |
57 | %setup -q -n LuaJIT | |
58 | %patch0 -p1 | |
59 | ||
60 | # preserve timestamps | |
61 | sed -i -e '/install -m/s/-m/-p -m/' Makefile | |
62 | ||
63 | %build | |
64 | # Q= - enable verbose output | |
65 | # E= @: - disable @echo messages | |
66 | # NOTE: we use amalgamated build as per documentation suggestion doc/install.html | |
67 | %{__make} \ | |
68 | VERSION="%{version}" \ | |
69 | PREFIX=%{_prefix} \ | |
70 | MULTILIB=%{_lib} \ | |
71 | CC="%{__cc}" \ | |
72 | CCOPT="%{rpmcflags} -fomit-frame-pointer" \ | |
73 | CCOPT_x86= \ | |
74 | LDFLAGS="%{rpmldflags}" \ | |
75 | MULTILIB=%{_lib} \ | |
76 | E="@:" \ | |
77 | Q= \ | |
78 | amalg | |
79 | ||
80 | %install | |
81 | rm -rf $RPM_BUILD_ROOT | |
82 | %{__make} install \ | |
83 | DESTDIR=$RPM_BUILD_ROOT \ | |
84 | VERSION="%{version}" \ | |
85 | PREFIX=%{_prefix} \ | |
86 | MULTILIB=%{_lib} \ | |
87 | INSTALL_BIN=$RPM_BUILD_ROOT%{_bindir} \ | |
88 | INSTALL_LIB=$RPM_BUILD_ROOT%{_libdir} \ | |
89 | INSTALL_SHARE=$RPM_BUILD_ROOT%{_datadir} \ | |
90 | INSTALL_MAN=$RPM_BUILD_ROOT%{_mandir}/man1 \ | |
91 | INSTALL_PKGCONFIG=$RPM_BUILD_ROOT%{_pkgconfigdir} \ | |
92 | LDCONFIG="/sbin/ldconfig -n" | |
93 | ||
94 | ln -s luajit-%{version} $RPM_BUILD_ROOT%{_bindir}/luajit | |
95 | ||
96 | %clean | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
99 | %post -p /sbin/ldconfig | |
100 | %postun -p /sbin/ldconfig | |
101 | ||
102 | %files | |
103 | %defattr(644,root,root,755) | |
104 | %doc COPYRIGHT README | |
105 | %attr(755,root,root) %{_bindir}/luajit | |
106 | %attr(755,root,root) %{_bindir}/luajit-%{version} | |
107 | %attr(755,root,root) %{_libdir}/libluajit-%{lua_abi}.so.*.*.* | |
108 | %attr(755,root,root) %ghost %{_libdir}/libluajit-%{lua_abi}.so.2 | |
109 | %{_datadir}/luajit-%{version} | |
110 | %{_mandir}/man1/luajit.1* | |
111 | # lua module dirs (shared with lua interpreters) | |
112 | %dir %{_libdir}/lua | |
113 | %dir %{_libdir}/lua/%{lua_abi} | |
114 | %dir %{_datadir}/lua | |
115 | %dir %{_datadir}/lua/%{lua_abi} | |
116 | ||
117 | %files devel | |
118 | %defattr(644,root,root,755) | |
119 | %doc doc/* | |
120 | %attr(755,root,root) %{_libdir}/libluajit-%{lua_abi}.so | |
121 | %{_includedir}/luajit-2.1 | |
122 | %{_pkgconfigdir}/luajit.pc | |
123 | ||
124 | %files static | |
125 | %defattr(644,root,root,755) | |
126 | %{_libdir}/libluajit-%{lua_abi}.a |