source: projects/specs/trunk/l/lua/lua-vl.spec @ 12494

Revision 12494, 11.0 KB checked in by tomop, 3 years ago (diff)

updated 4 packages

apt-0.5.15lorg3.95-30.git522

lua-rex-2.9.1-1

lua-5.4.0-1

rpm-4.12.0.1-4

Line 
1# No tests yet for 5.3.5
2%global test_version 5.4.0
3# If you are incrementing major_version, enable bootstrapping and adjust accordingly.
4# Version should be the latest prior build. If you don't do this, RPM will break and
5# everything will grind to a halt.
6%global bootstrap 1
7%global bootstrap_major_version 5.3
8%global bootstrap_version %{bootstrap_major_version}.5
9
10# Place rpm-macros into proper location.
11%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
12
13Summary:        Lua is a powerful, light-weight programming language designed for extending applications.
14Summary(ja):    アプリケーション拡張向けに設計された強力かつ軽量なプログラミング言語
15Name:           lua
16Version:        5.4.0
17Release:        1%{?_dist_release}
18Group:          programming
19Vendor:         Project Vine
20Distribution:   Vine Linux
21
22License:        MIT
23URL:            https://www.lua.org/
24Source0:        https://www.lua.org/ftp/%{name}-%{version}.tar.gz
25# copied from doc/readme.html on 2014-07-18
26Source1:        mit.txt
27%if 0%{?bootstrap}
28Source2:        http://www.lua.org/ftp/lua-%{bootstrap_version}.tar.gz
29%endif
30Source3:        http://www.lua.org/tests/lua-%{test_version}-tests.tar.gz
31# multilib
32Source4:        luaconf.h
33# rpm-macro
34Source1000:     macros.lua
35# rpm-generator
36Source1001:     lua.attr
37Patch0:         %{name}-5.4.0-beta-autotoolize.patch
38Patch1:         %{name}-5.3.0-idsize.patch
39#Patch2:         %%{name}-5.3.0-luac-shared-link-fix.patch
40Patch3:         %{name}-5.2.2-configure-linux.patch
41Patch4:         %{name}-5.3.0-configure-compat-module.patch
42%if 0%{?bootstrap}
43Patch5:         %{name}-5.3.0-autotoolize.patch
44Patch6:         %{name}-5.3.5-luac-shared-link-fix.patch
45%endif
46Patch7:         %{name}-5.4.0-CVE-2020-15889.patch
47Patch8:         %{name}-5.4.0-CVE-2020-15945.patch
48# https://www.lua.org/bugs.html
49# Bug 1 is CVE-2020-15889
50Patch9:         %{name}-5.4.0-bug2.patch
51Patch10:        %{name}-5.4.0-bug3.patch
52Patch11:        %{name}-5.4.0-bug4.patch
53Patch12:        %{name}-5.4.0-bug5.patch
54Patch13:        %{name}-5.4.0-bug6.patch
55Patch14:        %{name}-5.4.0-bug7.patch
56Patch15:        %{name}-5.4.0-bug8.patch
57
58Patch1000:      CVE-2020-24342.patch
59
60BuildRoot:      %{_tmppath}/%{name}-%{version}-root
61BuildRequires:  readline-devel
62BuildRequires:  ncurses-devel
63
64Requires:       lua-libs = %{version}-%{release}
65# Normally, this is the same as version, but... not always.
66%global         major_version %(echo %{version} | cut -d . -f1,2)
67
68%description
69Lua is an extension programming language designed to support
70general procedural programming with data description facilities.
71It also offers good support for object-oriented programming,
72functional programming, and data-driven programming.
73Lua is intended to be used as a powerful, light-weight configuration language
74for any program that needs one.
75Lua is implemented as a library, written in clean C
76(that is, in the common subset of ANSI C and C++).
77
78%description -l ja
79Lua は、データ記述機能を備え、汎用の手続き型プログラミングをサポート
80するようデザインされた拡張プログラミング言語です。
81オブジェクト指向プログラミング、関数型プログラミング、データ駆動型
82プログラミングもサポートしています。
83Lua は、コンフィギュレーションが必要なあらゆるプログラムのための、
84パワフルかつ軽いコンフィギュレーション言語としての使用を意図しています。
85Lua は、クリーンな C (つまり、ANSI C と C++ の共通のサブセット) で
86書かれたライブラリとして実装されています。
87
88
89%package libs
90Summary:        Libraries for %{name}
91Summary(ja):    Lua の共有ライブラリ
92Provides:       lua(abi) = %{major_version}
93
94%description libs
95This package contains the shared libraries for %{name}.
96
97
98%package        devel
99Summary:        Libraries and include files for Lua.
100Summary(ja):    Lua の開発用ファイル
101Group:          programming
102Requires:       %{name} = %{version}-%{release}
103Requires:       ncurses-devel
104Requires:       pkgconfig
105
106%description devel
107Libraries and include files for Lua.
108
109
110%package        static
111Summary:        Static library for Lua
112Summary(ja):    Lua の静的ライブラリ
113Group:          programming
114Requires:       %{name}-devel = %{version}-%{release}
115
116%description static
117This package contains the static version of liblua for %{name}.
118
119
120%prep
121%if 0%{?bootstrap}
122%setup -q -a 2 -a 3 -n %{name}-%{version}
123%else
124%setup -q -a 3
125%endif
126cp %{SOURCE1} .
127mv src/luaconf.h src/luaconf.h.template.in
128%patch0 -p1 -E -z .autoxxx
129%patch1 -p1 -z .idsize
130#%% patch2 -p1 -z .luac-shared
131%patch3 -p1 -z .configure-linux
132%patch4 -p1 -z .configure-compat-all
133%patch7 -p1 -b .CVE-2020-15889
134%patch8 -p1 -b .CVE-2020-15945
135%patch9 -p1 -b .bug2
136%patch10 -p1 -b .bug3
137%patch11 -p1 -b .bug4
138%patch12 -p1 -b .bug5
139%patch13 -p1 -b .bug6
140%patch14 -p1 -b .bug7
141%patch15 -p1 -b .bug8
142pushd src
143%patch1000 -p1 -b .CVE-2020-24342
144popd
145
146# Put proper version in configure.ac, patch0 hardcodes 5.3.0
147sed -i 's|5.3.0|%{version}|g' configure.ac
148autoreconf -ifv
149
150%if 0%{?bootstrap}
151cd lua-%{bootstrap_version}/
152mv src/luaconf.h src/luaconf.h.template.in
153%patch5 -p1 -b .autoxxx
154%patch1 -p1 -b .idsize
155%patch3 -p1 -z .configure-linux
156%patch4 -p1 -z .configure-compat-all
157%patch6 -p1 -b .luac-shared-link-fix
158autoreconf -i
159cd ..
160%endif
161
162
163%build
164%configure --with-readline --with-compat-module
165sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
166sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
167# Autotools give me a headache sometimes.
168sed -i 's|@pkgdatadir@|%{_datadir}|g' src/luaconf.h.template
169
170# hack so that only /usr/bin/lua gets linked with readline as it is the
171# only one which needs this and otherwise we get License troubles
172make %{?_smp_mflags} LIBS="-lm -ldl"
173# only /usr/bin/lua links with readline now #luac_LDADD="liblua.la -lm -ldl"
174
175%if 0%{?bootstrap}
176pushd lua-%{bootstrap_version}
177%configure --with-readline --with-compat-module
178sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
179sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
180# Autotools give me a headache sometimes.
181sed -i 's|@pkgdatadir@|%{_datadir}|g' src/luaconf.h.template
182
183# hack so that only /usr/bin/lua gets linked with readline as it is the
184# only one which needs this and otherwise we get License troubles
185make %{?_smp_mflags} LIBS="-lm -ldl" luac_LDADD="liblua.la -lm -ldl"
186popd
187%endif
188
189
190%install
191rm -rf $RPM_BUILD_ROOT
192make install DESTDIR=$RPM_BUILD_ROOT
193rm $RPM_BUILD_ROOT%{_libdir}/*.la
194mkdir -p $RPM_BUILD_ROOT%{_libdir}/lua/%{major_version}
195mkdir -p $RPM_BUILD_ROOT%{_datadir}/lua/%{major_version}
196
197# Rename luaconf.h to luaconf-<arch>.h to avoid file conflicts on
198# multilib systems and install luaconf.h wrapper
199mv %{buildroot}%{_includedir}/luaconf.h %{buildroot}%{_includedir}/luaconf-%{_arch}.h
200install -p -m 644 %{SOURCE4} %{buildroot}%{_includedir}/luaconf.h
201
202%if 0%{?bootstrap}
203pushd lua-%{bootstrap_version}
204mkdir $RPM_BUILD_ROOT/installdir
205make install DESTDIR=$RPM_BUILD_ROOT/installdir
206cp -a $RPM_BUILD_ROOT/installdir/%{_libdir}/liblua-%{bootstrap_major_version}.so $RPM_BUILD_ROOT%{_libdir}/
207mkdir -p $RPM_BUILD_ROOT%{_libdir}/lua/%{bootstrap_major_version}
208mkdir -p $RPM_BUILD_ROOT%{_datadir}/lua/%{bootstrap_major_version}
209rm -rf $RPM_BUILD_ROOT/installdir
210popd
211%endif
212
213# Install rpm-macro and requires generator
214install -Dpm 0644 %{SOURCE1000} $RPM_BUILD_ROOT/%{macrosdir}/macros.lua
215install -Dpm 0644 %{SOURCE1001} $RPM_BUILD_ROOT/%{_fileattrsdir}/lua.attr
216
217
218%check
219cd ./lua-%{test_version}-tests/
220
221# Dont skip the fully portable or ram-hungry tests:
222# sed -i.orig -e '
223#     /attrib.lua/d;
224#     /files.lua/d;
225#     /db.lua/d;
226#     /errors.lua/d;
227#     ' all.lua
228# LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir} $RPM_BUILD_ROOT/%{_bindir}/lua all.lua
229# Removing tests that fail under mock/koji
230sed -i.orig -e '
231    /db.lua/d;
232    /errors.lua/d;
233    ' all.lua
234LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir} $RPM_BUILD_ROOT/%{_bindir}/lua -e"_U=true" all.lua
235
236
237%clean
238rm -rf $RPM_BUILD_ROOT
239
240
241%post -p /sbin/ldconfig
242%postun -p /sbin/ldconfig
243
244
245%files
246%defattr(-,root,root,-)
247%{!?_licensedir:%global license %%doc}
248%license mit.txt
249%doc README doc/*.html doc/*.css doc/*.gif doc/*.png
250%{_bindir}/lua
251%{_bindir}/luac
252%{_mandir}/man1/lua*.1*
253
254%files libs
255%dir %{_libdir}/lua
256%dir %{_libdir}/lua/%{major_version}
257%{_libdir}/liblua-%{major_version}.so
258%dir %{_datadir}/lua
259%dir %{_datadir}/lua/%{major_version}
260
261%if 0%{?bootstrap}
262%dir %{_libdir}/lua/%{bootstrap_major_version}
263%{_libdir}/liblua-%{bootstrap_major_version}.so
264%dir %{_datadir}/lua/%{bootstrap_major_version}
265%endif
266
267%files devel
268%defattr(-,root,root,-)
269%{_includedir}/l*.h
270%{_includedir}/l*.hpp
271%{_libdir}/liblua.so
272%{_libdir}/pkgconfig/*.pc
273%dir %{macrosdir}
274%{macrosdir}/macros.lua
275%{_fileattrsdir}/lua.attr
276
277%files static
278%defattr(-,root,root,-)
279%{_libdir}/*.a
280
281
282%changelog
283* Fri Aug 21 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.4.0-1
284- new upstream release.
285
286* Sat Aug 31 2019 Toshiaki Ara <ara_t@384.jp> 5.1.4-8
287- rebuild with readline-8.0 and ncurses-6.1
288
289* Sun Mar 22 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 5.1.4-7
290- rebuilt with readline 6.3
291
292* Mon Dec 30 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 5.1.4-6
293- added Japanese summary
294- moved devel and static subpackages to Development/Libraries Group
295
296* Mon Dec 30 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 5.1.4-5
297- build with current VineSeed
298
299* Sat Sep 25 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.1.4-4
300- rebuild with rpm-4.8.1 for pkg-config file
301
302* Fri Feb 12 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 5.1.4-3
303- rebuilt with gcc-4.4.3-3 on ppc
304
305* Fri Feb  5 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 5.1.4-2
306- rebuilt with rpm-4.8.0-3 (on ppc)
307
308* Wed Feb 03 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 5.1.4-1
309- new upstream release
310- add lua-static subpackage
311
312* Sat Jul 26 2008 Shu KONNO <owa@bg.wakwak.com> 5.1.2-1vl5
313- applied new versioning policy and spec in utf-8
314
315* Sun Aug 5 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 5.1.2-0vl2
316- rebuild for VineSeed
317
318* Sun Aug 5 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 5.1.2-0vl1
319- initial build for Vine Linux 4.1
320 - source update
321
322* Sat Aug 4 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 5.1.1-0vlmp1
323- rebuild for Vine Linux 4.1
324
325* Fri Jan 19 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 5.1.1-3
326- Remove "-lreadline -lncurses" from lua.pc (bz 213895)
327
328* Sun Oct 15 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 5.1.1-2
329- Only link /usr/bin/lua with readline / do not link %%{_libdir}/liblua-5.1.so
330  with readline so that we don't cause any License troubles for packages
331  linking against liblua-5.1.so, otherwise lua could drag the GPL only readline
332  lib into the linking of non GPL apps.
333
334* Sat Oct 14 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 5.1.1-1
335- New upstream release 5.1.1
336- Fix detection of readline during compile (iow add readline support back)
337
338* Sat Jul 23 2005 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 5.0.2vlmp1
339- initial build for Vine Linux 3.2
Note: See TracBrowser for help on using the repository browser.