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 LDFLAGS+=" -Wl,-E -ldl -lreadline -lhistory -lncurses"
83 sed -i 's:LUA_ROOT2 "LIBDIR/lua/%{major_version}/":LUA_ROOT2 \"%{_lib}/lua/%{major_version}/":' src/luaconf.h
84 make %{?_smp_mflags} -C src CC="%{__cc}" MYCFLAGS="%{optflags} -fPIC -DLUA_USE_LINUX" MYLIBS="$LDFLAGS" V=%{major_version} all
87 make install INSTALL_TOP="%{buildroot}%{_prefix}" INSTALL_LIB="%{buildroot}%{_libdir}" INSTALL_CMOD=%{buildroot}%{_libdir}/lua/%{major_version} INSTALL_MAN="%{buildroot}%{_mandir}/man1"
88 install -D -m644 etc/lua.pc %{buildroot}%{_libdir}/pkgconfig/lua.pc
89 for file in lua luac ; do
90 mv "%{buildroot}%{_bindir}/${file}" "%{buildroot}%{_bindir}/${file}%{major_version}"
91 mv "%{buildroot}%{_mandir}/man1/${file}.1" "%{buildroot}%{_mandir}/man1/${file}%{major_version}.1"
93 install -d -m 0755 %{buildroot}%{_libdir}/lua/%{major_version}
94 install -d -m 0755 %{buildroot}%{_datadir}/lua/%{major_version}
95 install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.lua
97 chmod +x %{buildroot}/%{_libdir}/liblua.so.%{major_version}
99 ln -s lua%{major_version} %{buildroot}%{_bindir}/lua
101 %post -n liblua -p /sbin/ldconfig
103 %postun -n liblua -p /sbin/ldconfig
106 %manifest %{name}.manifest
107 %defattr(-,root,root)
108 %{_mandir}/man1/lua%{major_version}.1*
109 %{_mandir}/man1/luac%{major_version}.1*
111 %{_bindir}/lua%{major_version}
112 %{_bindir}/luac%{major_version}
114 %dir %{_libdir}/lua/%{major_version}
116 %dir %{_datadir}/lua/%{major_version}
117 %{_sysconfdir}/rpm/macros.lua
120 %manifest %{name}.manifest
121 %defattr(-,root,root)
123 %{_libdir}/liblua.so.%{major_version}
126 %manifest %{name}.manifest
127 %defattr(-,root,root)
128 %{_includedir}/lauxlib.h
130 %{_includedir}/lua.hpp
131 %{_includedir}/luaconf.h
132 %{_includedir}/lualib.h
133 %{_libdir}/pkgconfig/lua.pc
138 %manifest %{name}.manifest
139 %defattr(-,root,root)