5 Summary: Small Embeddable Language with Simple Procedural Syntax
6 Url: http://www.lua.org
8 Source: %{name}-%{version}.tar.gz
10 Source2: baselibs.conf
11 Source1001: lua.manifest
12 %define major_version 5.1
13 BuildRequires: pkg-config
14 BuildRequires: readline-devel
17 Lua is a programming language originally designed for extending
18 applications, but also frequently used as a general-purpose,
21 Lua combines simple procedural syntax (similar to Pascal) with powerful
22 data description constructs based on associative arrays and extensible
23 semantics. Lua is dynamically typed, interpreted from byte codes, and
24 has automatic memory management, making it ideal for configuration,
25 scripting, and rapid prototyping. Lua is implemented as a small library
26 of C functions, written in ANSI C, and the implementation goals are
27 simplicity, efficiency, portability, and low embedding cost.
30 Summary: Development files for lua
31 Group: Development/Libraries
32 Requires: %{name} = %{version}
35 Lua is a programming language originally designed for extending
36 applications, but also frequently used as a general-purpose,
39 This package contains files needed for embedding lua into your
43 Summary: Small Embeddable Language with Simple Procedural Syntax
46 %description -n liblua
47 Lua is a programming language originally designed for extending
48 applications, but also frequently used as a general-purpose,
51 Lua combines simple procedural syntax (similar to Pascal) with powerful
52 data description constructs based on associative arrays and extensible
53 semantics. Lua is dynamically typed, interpreted from byte codes, and
54 has automatic memory management, making it ideal for configuration,
55 scripting, and rapid prototyping. Lua is implemented as a small library
56 of C functions, written in ANSI C, and the implementation goals are
57 simplicity, efficiency, portability, and low embedding cost.
60 Summary: Small Embeddable Language with Simple Procedural Syntax
65 Lua is a programming language originally designed for extending
66 applications, but also frequently used as a general-purpose,
69 Lua combines simple procedural syntax (similar to Pascal) with powerful
70 data description constructs based on associative arrays and extensible
71 semantics. Lua is dynamically typed, interpreted from byte codes, and
72 has automatic memory management, making it ideal for configuration,
73 scripting, and rapid prototyping. Lua is implemented as a small library
74 of C functions, written in ANSI C, and the implementation goals are
75 simplicity, efficiency, portability, and low embedding cost.
78 %setup -q -n lua-%{version}
82 export CFLAGS+=" -fPIC -DLUA_USE_LINUX"
83 export LDFLAGS+=" -Wl,-z,relro -Wl,-E -ldl -lreadline -lhistory -lncurses"
84 sed -i -e "s@/usr/local/@/usr/@g" src/luaconf.h
86 %ifarch x86_64 aarch64
87 sed -i -e "s/lib\//lib64\//g" src/luaconf.h
90 %{__make} %{?_smp_mflags} -C src CC="%{__cc}" MYCFLAGS="$CFLAGS" MYLIBS="$LDFLAGS" V=%{major_version} all
93 %{__make} test || exit 0
96 make install INSTALL_TOP="%{buildroot}%{_prefix}" INSTALL_LIB="%{buildroot}%{_libdir}" INSTALL_CMOD=%{buildroot}%{_libdir}/lua/%{major_version} INSTALL_MAN="%{buildroot}%{_mandir}/man1"
97 install -D -m644 etc/lua.pc %{buildroot}%{_libdir}/pkgconfig/lua.pc
98 for file in lua luac ; do
99 mv "%{buildroot}%{_bindir}/${file}" "%{buildroot}%{_bindir}/${file}%{major_version}"
100 mv "%{buildroot}%{_mandir}/man1/${file}.1" "%{buildroot}%{_mandir}/man1/${file}%{major_version}.1"
102 install -d -m 0755 %{buildroot}%{_libdir}/lua/%{major_version}
103 install -d -m 0755 %{buildroot}%{_datadir}/lua/%{major_version}
104 install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.lua
106 chmod +x %{buildroot}/%{_libdir}/liblua.so.%{major_version}
108 ln -s lua%{major_version} %{buildroot}%{_bindir}/lua
112 %post -n liblua -p /sbin/ldconfig
114 %postun -n liblua -p /sbin/ldconfig
117 %manifest %{name}.manifest
118 %defattr(-,root,root)
121 %{_bindir}/lua%{major_version}
122 %{_bindir}/luac%{major_version}
124 %dir %{_libdir}/lua/%{major_version}
126 %dir %{_datadir}/lua/%{major_version}
127 %{_sysconfdir}/rpm/macros.lua
130 %manifest %{name}.manifest
131 %defattr(-,root,root)
133 %{_libdir}/liblua.so.%{major_version}
136 %manifest %{name}.manifest
137 %defattr(-,root,root)
138 %{_includedir}/lauxlib.h
140 %{_includedir}/lua.hpp
141 %{_includedir}/luaconf.h
142 %{_includedir}/lualib.h
143 %{_libdir}/pkgconfig/lua.pc