blob: 96c36c9c661477828d73faf03670f0949bb4c795 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
%define keepstatic 1
Name: lua
Summary: Powerful light-weight programming language
Version: 5.1.4
Release: 6
Group: Development/Languages
License: MIT
URL: http://www.lua.org/
Source0: http://www.lua.org/ftp/lua-%{version}.tar.gz
Source1001: packaging/lua.manifest
Patch0: patch-lua-5.1.4-2
Patch1: lua-5.1.4-autotoolize.patch
Patch2: buildfix.patch
BuildRequires: pkgconfig(ncurses)
%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 -n liblua
Summary: The Lua library
Group: System/Libraries
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%description -n liblua
This package contains the shared version of liblua for %{name}.
%package -n liblua-static
Summary: Static library for %{name}
Group: Development/Libraries
Requires: liblua-devel = %{version}-%{release}
%description -n liblua-static
This package contains the static version of liblua for %{name}.
%package -n liblua-devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: liblua = %{version}-%{release}
%description -n liblua-devel
This package contains development files for %{name}.
%prep
%setup -q
# patch-lua-5.1.4-2
%patch0 -p1
# lua-5.1.4-autotoolize.patch
%patch1 -p1
# buildfix.patch
%patch2 -p1
%build
cp %{SOURCE1001} .
# fix perms on auto files
chmod u+x autogen.sh config.guess config.sub configure depcomp install-sh missing
%configure \
--without-readline
make %{?jobs:-j%jobs}
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 %{buildroot}
%make_install
%remove_docs
%post -n liblua -p /sbin/ldconfig
%postun -n liblua -p /sbin/ldconfig
%files
%manifest lua.manifest
%{_bindir}/lua*
%files -n liblua
%manifest lua.manifest
%{_libdir}/liblua-*.so
%files -n liblua-static
%manifest lua.manifest
%{_libdir}/*.a
%files -n liblua-devel
%manifest lua.manifest
%{_includedir}/l*.h
%{_includedir}/l*.hpp
%{_libdir}/liblua.so
%{_libdir}/pkgconfig/*.pc
|