# Make sure we don't get an LZMA payload in the rpm package -- people using # rpm 4.x need to be able to read it so they can upgrade. %define _source_payload w9.bzdio %define _binary_payload w9.bzdio Name: lua Version: 5.1.4 Release: 2ark Summary: Powerful light-weight scripting language Group: Development/Languages License: MIT URL: http://www.lua.org/ Source0: http://www.lua.org/ftp/lua-%{version}.tar.lz Patch0: lua-5.1.4-autotoolize.patch Patch1: http://www.lua.org/ftp/patch-lua-5.1.4-2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: readline-devel ncurses-devel # Compatibility with distros that use bogus versioning schemes: %define majorversion %(echo %version |cut -d. -f1-2) %if "%_lib" == "lib64" Provides: liblua-%majorversion.so()(64bit) %else Provides: liblua-%majorversion.so %endif %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. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkgconfig %description devel This package contains development files for %{name}. %package static Summary: Static development files for %{name}. Group: Development/Libraries/Static Requires: %name = %version-%release Requires: ncurses-devel pkgconfig %description static This package contains static development files for %{name}. %prep %setup -q %patch0 -p1 -E -z .autoxxx cd src %patch1 -p0 -b .p2~ cd .. sh ./autogen.sh %build %configure --with-readline sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool # hack so that only /usr/bin/lua gets linked with readline as it is the # only one which needs this and otherwise we get License troubles make %{?_smp_mflags} LIBS="-ldl" luac_LDADD="liblua.la -lm -ldl" # also remove readline from lua.pc sed -i 's/-lreadline -lncurses //g' etc/lua.pc %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT rm $RPM_BUILD_ROOT%{_libdir}/*.la # Compatibility with distros that use bogus versioning schemes: ln -s liblua.so.5 $RPM_BUILD_ROOT%_libdir/liblua-%majorversion.so cd $RPM_BUILD_ROOT%_libdir/pkgconfig # Make ipe happy ln -s lua.pc lua5.1.pc %clean rm -rf $RPM_BUILD_ROOT %files %doc COPYRIGHT HISTORY README doc/*.html doc/*.css doc/*.gif doc/*.png %_bindir/lua* %_libdir/liblua*.so* %_mandir/man1/lua*.1* %files devel %_includedir/l*.h %_includedir/l*.hpp %_libdir/pkgconfig/*.pc %files static %_libdir/*.a %changelog * Wed Jan 19 2011 Bernhard Rosenkraenzer <bero@arklinux.org> 5.1.4-2ark - Add 5.1.4-2 patch from upstream . Add lua5.1.pc pkgconfig symlink for Ipe * Tue Sep 23 2008 Bernhard Rosenkraenzer <bero@arklinux.org> 5.1.4-1ark - 5.1.4 - Make sure the package doesn't get built with an LZMA payload -- rpm5 requires it, and we need rpm4->rpm5 upgrades to work * Sun Jun 15 2008 Bernhard Rosenkraenzer <bero@arklinux.org> 5.1.3-2ark - Fix versioning scheme, we want liblua.so.5, not liblua-5.1.so * Sat Jun 14 2008 Bernhard Rosenkraenzer <bero@arklinux.org> 5.1.3-1ark - 5.1.3 * Tue Jun 5 2007 Bernhard Rosenkraenzer <bero@arklinux.org> 5.1.2-1ark - 5.1.2 * Fri Oct 20 2006 Bernhard Rosenkraenzer <bero@arklinux.org> 5.1.1-1ark - 5.1.1 - Split out static package * Thu Jun 24 2004 Bernhard Rosenkraenzer <bero@arklinux.org> 5.0.2-2ark - Force use of -fPIC to make x86_64 happy - Put libraries in the correct place even where it isn't /usr/lib * Sun Apr 11 2004 Bernhard Rosenkraenzer <bero@arklinux.org> 5.0.2-1ark - 5.0.2 * Fri Dec 05 2003 Bernhard Rosenkraenzer <bero@arklinux.org> 5.0-2ark - Don't depend on -devel files in main package * Thu Nov 27 2003 Bernhard Rosenkraenzer <bero@arklinux.org> 5.0-1ark - 5.0 * Fri Aug 16 2002 Bernhard Rosenkraenzer <bero@arklinux.org> 4.0.1-1ark - initial RPM