[1039] | 1 | %global major_version 5.3
|
---|
| 2 |
|
---|
| 3 | Name: lua
|
---|
| 4 | Version: %{major_version}.4
|
---|
[1084] | 5 | Release: 2%{?dist}
|
---|
[1039] | 6 | Summary: Powerful light-weight programming language
|
---|
| 7 | Group: Development/Languages
|
---|
| 8 | License: MIT
|
---|
| 9 | URL: http://www.lua.org/
|
---|
| 10 |
|
---|
| 11 | Vendor: bww bitwise works GmbH
|
---|
[1084] | 12 | %scm_source svn http://svn.netlabs.org/repos/ports/lua/trunk 2173
|
---|
[1039] | 13 |
|
---|
| 14 | BuildRequires: automake autoconf libtool readline-devel ncurses-devel
|
---|
| 15 | Provides: lua(abi) = %{major_version}
|
---|
| 16 | Requires: lua-libs = %{version}-%{release}
|
---|
| 17 |
|
---|
| 18 | %description
|
---|
| 19 | Lua is a powerful light-weight programming language designed for
|
---|
| 20 | extending applications. Lua is also frequently used as a
|
---|
| 21 | general-purpose, stand-alone language. Lua is free software.
|
---|
| 22 | Lua combines simple procedural syntax with powerful data description
|
---|
| 23 | constructs based on associative arrays and extensible semantics. Lua
|
---|
| 24 | is dynamically typed, interpreted from bytecodes, and has automatic
|
---|
| 25 | memory management with garbage collection, making it ideal for
|
---|
| 26 | configuration, scripting, and rapid prototyping.
|
---|
| 27 |
|
---|
| 28 | %package devel
|
---|
| 29 | Summary: Development files for %{name}
|
---|
| 30 | Group: System Environment/Libraries
|
---|
| 31 | Requires: %{name} = %{version}-%{release}
|
---|
| 32 | Requires: pkgconfig
|
---|
| 33 |
|
---|
| 34 | %description devel
|
---|
| 35 | This package contains development files for %{name}.
|
---|
| 36 |
|
---|
| 37 | %package libs
|
---|
| 38 | Summary: Libraries for %{name}
|
---|
| 39 |
|
---|
| 40 | %description libs
|
---|
| 41 | This package contains the shared libraries for %{name}.
|
---|
| 42 |
|
---|
| 43 | %package static
|
---|
| 44 | Summary: Static library for %{name}
|
---|
| 45 | Group: System Environment/Libraries
|
---|
| 46 | Requires: %{name} = %{version}-%{release}
|
---|
| 47 |
|
---|
| 48 | %description static
|
---|
| 49 | This package contains the static version of liblua for %{name}.
|
---|
| 50 |
|
---|
| 51 | %debug_package
|
---|
| 52 |
|
---|
| 53 | %prep
|
---|
| 54 | %scm_setup
|
---|
| 55 |
|
---|
| 56 | autoreconf -fvi
|
---|
| 57 |
|
---|
| 58 | %build
|
---|
| 59 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp -lcx"
|
---|
| 60 | export VENDOR="%{vendor}"
|
---|
| 61 |
|
---|
| 62 | %configure --with-readline --with-compat-module
|
---|
| 63 | # Autotools give me a headache sometimes.
|
---|
| 64 | sed -i 's|@pkgdatadir@|%{_datadir}|g' src/luaconf.h.template
|
---|
| 65 |
|
---|
| 66 | # hack so that only /usr/bin/lua gets linked with readline as it is the
|
---|
| 67 | # only one which needs this and otherwise we get License troubles
|
---|
| 68 | make %{?_smp_mflags} LIBS="-lm -ldl"
|
---|
| 69 | # only /usr/bin/lua links with readline now #luac_LDADD="liblua.la -lm -ldl"
|
---|
| 70 |
|
---|
| 71 |
|
---|
| 72 | %check
|
---|
| 73 | #cd ./lua-%{version}-tests/
|
---|
| 74 |
|
---|
| 75 | # Removing tests that fail under mock/koji
|
---|
| 76 | #sed -i.orig -e '
|
---|
| 77 | # /db.lua/d;
|
---|
| 78 | # /errors.lua/d;
|
---|
| 79 | # ' all.lua
|
---|
| 80 | #LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir} $RPM_BUILD_ROOT/%{_bindir}/lua -e"_U=true" all.lua
|
---|
| 81 |
|
---|
| 82 | %install
|
---|
| 83 | make install DESTDIR=$RPM_BUILD_ROOT
|
---|
| 84 | rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
---|
| 85 | mkdir -p $RPM_BUILD_ROOT%{_libdir}/lua/%{major_version}
|
---|
| 86 | mkdir -p $RPM_BUILD_ROOT%{_datadir}/lua/%{major_version}
|
---|
| 87 |
|
---|
| 88 |
|
---|
| 89 | %files
|
---|
| 90 | %{!?_licensedir:%global license %%doc}
|
---|
| 91 | %license mit.txt
|
---|
| 92 |
|
---|
| 93 | %doc README doc/*.html doc/*.css doc/*.gif doc/*.png
|
---|
| 94 | %{_bindir}/lua.exe
|
---|
| 95 | %{_bindir}/luac.exe
|
---|
| 96 | %{_mandir}/man1/lua*.1*
|
---|
| 97 | %dir %{_libdir}/lua
|
---|
| 98 | %dir %{_libdir}/lua/%{major_version}
|
---|
| 99 | %dir %{_datadir}/lua
|
---|
| 100 | %dir %{_datadir}/lua/%{major_version}
|
---|
| 101 |
|
---|
| 102 | %files libs
|
---|
| 103 | %{_libdir}/lua*.dll
|
---|
| 104 |
|
---|
| 105 | %files devel
|
---|
| 106 | %{_includedir}/l*.h
|
---|
| 107 | %{_includedir}/l*.hpp
|
---|
| 108 | %{_libdir}/*_dll.a
|
---|
| 109 | %{_libdir}/pkgconfig/*.pc
|
---|
| 110 |
|
---|
| 111 | %files static
|
---|
| 112 | %{_libdir}/lua.a
|
---|
| 113 |
|
---|
| 114 |
|
---|
| 115 | %changelog
|
---|
[1084] | 116 | * Thu Apr 6 2017 Dmitriy Kuminov <coding@dmik.org> 5.3.4-2
|
---|
| 117 | - Fix headers to atually enable LUA_COMPAT_MODULE.
|
---|
| 118 |
|
---|
[1039] | 119 | * Tue Feb 28 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> 5.3.4-1
|
---|
| 120 | - first rpm version
|
---|