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

Revision 12519, 10.5 KB checked in by tomop, 3 years ago (diff)

updated 7 packages

ghostscript-9.53.3-1

lua-5.4.2-1

libjpeg-turbo-2.0.6-1

libtiff-4.2.0-1

openjpeg2-2.4.0-1

proftpd-1.3.7a-1

wireshark-3.4.2-1

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