lua-vl.spec 11 KB

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