############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = lua major_version = 5.3 version = %{major_version}.5 release = 1 groups = Development/Languages url = http://www.lua.org/ license = MIT summary = Powerful light-weight programming language. description Lua is a powerful light-weight programming language designed for \ extending applications. Lua is also frequently used as a \ general-purpose, stand-alone language. Lua is free software. \ Lua combines simple procedural syntax with powerful data description \ constructs based on associative arrays and extensible semantics. Lua \ is dynamically typed, interpreted from bytecodes, and has automatic \ memory management with garbage collection, making it ideal for \ configuration, scripting, and rapid prototyping. end source_dl = http://www.lua.org/ftp/ build requires readline-devel end prepare_cmds # Lua 5.3.4 has wrong release version in its Makefile sed "s/^R= \$V.4/R= \$V.5/" -i Makefile end make_build_targets += \ MYCFLAGS="%{CFLAGS} -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" \ MYLDFLAGS="%{LDFLAGS}" \ linux test make test end make_install_targets += \ TO_LIB="liblua.so.%{version}" \ INSTALL_TOP="%{BUILDROOT}%{prefix}" \ INSTALL_LIB="%{BUILDROOT}%{libdir}" \ INSTALL_MAN="%{BUILDROOT}%{mandir}/man1" install_cmds # Install library links ln -svf liblua.so.%{version} %{BUILDROOT}%{libdir}/liblua.so.%{major_version} ln -svf liblua.so.%{major_version} %{BUILDROOT}%{libdir}/liblua.so # Install pkgconfig file mkdir -pv %{BUILDROOT}%{libdir}/pkgconfig sed "s/%VER%/%{major_version}/g;s/%REL%/%{version}/g" \ < %{DIR_SOURCE}/lua.pc > %{BUILDROOT}%{libdir}/pkgconfig/lua.pc end end packages package %{name} package %{name}-devel template DEVEL end package %{name}-libs template LIBS end package %{name}-debuginfo template DEBUGINFO end end