[12494] | 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 |
---|
[521] | 9 | |
---|
[12494] | 10 | # Place rpm-macros into proper location. |
---|
| 11 | %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) |
---|
[9461] | 12 | |
---|
[12494] | 13 | Summary: Lua is a powerful, light-weight programming language designed for extending applications. |
---|
| 14 | Summary(ja): アプリケーション拡張向けに設計された強力かつ軽量なプログラミング言語 |
---|
| 15 | Name: lua |
---|
| 16 | Version: 5.4.0 |
---|
| 17 | Release: 1%{?_dist_release} |
---|
| 18 | Group: programming |
---|
| 19 | Vendor: Project Vine |
---|
| 20 | Distribution: Vine Linux |
---|
[521] | 21 | |
---|
[12494] | 22 | License: MIT |
---|
| 23 | URL: https://www.lua.org/ |
---|
| 24 | Source0: https://www.lua.org/ftp/%{name}-%{version}.tar.gz |
---|
| 25 | # copied from doc/readme.html on 2014-07-18 |
---|
| 26 | Source1: mit.txt |
---|
| 27 | %if 0%{?bootstrap} |
---|
| 28 | Source2: http://www.lua.org/ftp/lua-%{bootstrap_version}.tar.gz |
---|
| 29 | %endif |
---|
| 30 | Source3: http://www.lua.org/tests/lua-%{test_version}-tests.tar.gz |
---|
| 31 | # multilib |
---|
| 32 | Source4: luaconf.h |
---|
| 33 | # rpm-macro |
---|
| 34 | Source1000: macros.lua |
---|
| 35 | # rpm-generator |
---|
| 36 | Source1001: lua.attr |
---|
| 37 | Patch0: %{name}-5.4.0-beta-autotoolize.patch |
---|
| 38 | Patch1: %{name}-5.3.0-idsize.patch |
---|
| 39 | #Patch2: %%{name}-5.3.0-luac-shared-link-fix.patch |
---|
| 40 | Patch3: %{name}-5.2.2-configure-linux.patch |
---|
| 41 | Patch4: %{name}-5.3.0-configure-compat-module.patch |
---|
| 42 | %if 0%{?bootstrap} |
---|
| 43 | Patch5: %{name}-5.3.0-autotoolize.patch |
---|
| 44 | Patch6: %{name}-5.3.5-luac-shared-link-fix.patch |
---|
| 45 | %endif |
---|
| 46 | Patch7: %{name}-5.4.0-CVE-2020-15889.patch |
---|
| 47 | Patch8: %{name}-5.4.0-CVE-2020-15945.patch |
---|
| 48 | # https://www.lua.org/bugs.html |
---|
| 49 | # Bug 1 is CVE-2020-15889 |
---|
| 50 | Patch9: %{name}-5.4.0-bug2.patch |
---|
| 51 | Patch10: %{name}-5.4.0-bug3.patch |
---|
| 52 | Patch11: %{name}-5.4.0-bug4.patch |
---|
| 53 | Patch12: %{name}-5.4.0-bug5.patch |
---|
| 54 | Patch13: %{name}-5.4.0-bug6.patch |
---|
| 55 | Patch14: %{name}-5.4.0-bug7.patch |
---|
| 56 | Patch15: %{name}-5.4.0-bug8.patch |
---|
[9461] | 57 | |
---|
[12494] | 58 | Patch1000: CVE-2020-24342.patch |
---|
[521] | 59 | |
---|
[12494] | 60 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 61 | BuildRequires: readline-devel |
---|
| 62 | BuildRequires: ncurses-devel |
---|
[521] | 63 | |
---|
[12494] | 64 | Requires: 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 | |
---|
[521] | 68 | %description |
---|
| 69 | Lua is an extension programming language designed to support |
---|
| 70 | general procedural programming with data description facilities. |
---|
| 71 | It also offers good support for object-oriented programming, |
---|
| 72 | functional programming, and data-driven programming. |
---|
| 73 | Lua is intended to be used as a powerful, light-weight configuration language |
---|
| 74 | for any program that needs one. |
---|
| 75 | Lua 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 |
---|
[9461] | 79 | Lua は、データ記述機能を備え、汎用の手続き型プログラミングをサポート |
---|
| 80 | するようデザインされた拡張プログラミング言語です。 |
---|
| 81 | オブジェクト指向プログラミング、関数型プログラミング、データ駆動型 |
---|
| 82 | プログラミングもサポートしています。 |
---|
| 83 | Lua は、コンフィギュレーションが必要なあらゆるプログラムのための、 |
---|
| 84 | パワフルかつ軽いコンフィギュレーション言語としての使用を意図しています。 |
---|
| 85 | Lua は、クリーンな C (つまり、ANSI C と C++ の共通のサブセット) で |
---|
| 86 | 書かれたライブラリとして実装されています。 |
---|
[521] | 87 | |
---|
| 88 | |
---|
[12494] | 89 | %package libs |
---|
| 90 | Summary: Libraries for %{name} |
---|
| 91 | Summary(ja): Lua の共有ライブラリ |
---|
| 92 | Provides: lua(abi) = %{major_version} |
---|
| 93 | |
---|
| 94 | %description libs |
---|
| 95 | This package contains the shared libraries for %{name}. |
---|
| 96 | |
---|
| 97 | |
---|
| 98 | %package devel |
---|
| 99 | Summary: Libraries and include files for Lua. |
---|
| 100 | Summary(ja): Lua の開発用ファイル |
---|
| 101 | Group: programming |
---|
| 102 | Requires: %{name} = %{version}-%{release} |
---|
| 103 | Requires: ncurses-devel |
---|
| 104 | Requires: pkgconfig |
---|
| 105 | |
---|
[521] | 106 | %description devel |
---|
| 107 | Libraries and include files for Lua. |
---|
| 108 | |
---|
| 109 | |
---|
[12494] | 110 | %package static |
---|
| 111 | Summary: Static library for Lua |
---|
| 112 | Summary(ja): Lua の静的ライブラリ |
---|
| 113 | Group: programming |
---|
| 114 | Requires: %{name}-devel = %{version}-%{release} |
---|
| 115 | |
---|
[521] | 116 | %description static |
---|
| 117 | This package contains the static version of liblua for %{name}. |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | %prep |
---|
[12494] | 121 | %if 0%{?bootstrap} |
---|
| 122 | %setup -q -a 2 -a 3 -n %{name}-%{version} |
---|
| 123 | %else |
---|
| 124 | %setup -q -a 3 |
---|
| 125 | %endif |
---|
| 126 | cp %{SOURCE1} . |
---|
| 127 | mv 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 |
---|
| 142 | pushd src |
---|
| 143 | %patch1000 -p1 -b .CVE-2020-24342 |
---|
| 144 | popd |
---|
[521] | 145 | |
---|
[12494] | 146 | # Put proper version in configure.ac, patch0 hardcodes 5.3.0 |
---|
| 147 | sed -i 's|5.3.0|%{version}|g' configure.ac |
---|
| 148 | autoreconf -ifv |
---|
| 149 | |
---|
| 150 | %if 0%{?bootstrap} |
---|
| 151 | cd lua-%{bootstrap_version}/ |
---|
| 152 | mv 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 |
---|
| 158 | autoreconf -i |
---|
| 159 | cd .. |
---|
| 160 | %endif |
---|
| 161 | |
---|
| 162 | |
---|
[521] | 163 | %build |
---|
[12494] | 164 | %configure --with-readline --with-compat-module |
---|
[521] | 165 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool |
---|
| 166 | sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool |
---|
[12494] | 167 | # Autotools give me a headache sometimes. |
---|
| 168 | sed -i 's|@pkgdatadir@|%{_datadir}|g' src/luaconf.h.template |
---|
| 169 | |
---|
[521] | 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 |
---|
[12494] | 172 | make %{?_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} |
---|
| 176 | pushd lua-%{bootstrap_version} |
---|
| 177 | %configure --with-readline --with-compat-module |
---|
| 178 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool |
---|
| 179 | sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool |
---|
| 180 | # Autotools give me a headache sometimes. |
---|
| 181 | sed -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 |
---|
[521] | 185 | make %{?_smp_mflags} LIBS="-lm -ldl" luac_LDADD="liblua.la -lm -ldl" |
---|
[12494] | 186 | popd |
---|
| 187 | %endif |
---|
[521] | 188 | |
---|
| 189 | |
---|
| 190 | %install |
---|
| 191 | rm -rf $RPM_BUILD_ROOT |
---|
| 192 | make install DESTDIR=$RPM_BUILD_ROOT |
---|
[12494] | 193 | rm $RPM_BUILD_ROOT%{_libdir}/*.la |
---|
| 194 | mkdir -p $RPM_BUILD_ROOT%{_libdir}/lua/%{major_version} |
---|
| 195 | mkdir -p $RPM_BUILD_ROOT%{_datadir}/lua/%{major_version} |
---|
[521] | 196 | |
---|
[12494] | 197 | # Rename luaconf.h to luaconf-<arch>.h to avoid file conflicts on |
---|
| 198 | # multilib systems and install luaconf.h wrapper |
---|
| 199 | mv %{buildroot}%{_includedir}/luaconf.h %{buildroot}%{_includedir}/luaconf-%{_arch}.h |
---|
| 200 | install -p -m 644 %{SOURCE4} %{buildroot}%{_includedir}/luaconf.h |
---|
[521] | 201 | |
---|
[12494] | 202 | %if 0%{?bootstrap} |
---|
| 203 | pushd lua-%{bootstrap_version} |
---|
| 204 | mkdir $RPM_BUILD_ROOT/installdir |
---|
| 205 | make install DESTDIR=$RPM_BUILD_ROOT/installdir |
---|
| 206 | cp -a $RPM_BUILD_ROOT/installdir/%{_libdir}/liblua-%{bootstrap_major_version}.so $RPM_BUILD_ROOT%{_libdir}/ |
---|
| 207 | mkdir -p $RPM_BUILD_ROOT%{_libdir}/lua/%{bootstrap_major_version} |
---|
| 208 | mkdir -p $RPM_BUILD_ROOT%{_datadir}/lua/%{bootstrap_major_version} |
---|
| 209 | rm -rf $RPM_BUILD_ROOT/installdir |
---|
| 210 | popd |
---|
| 211 | %endif |
---|
| 212 | |
---|
| 213 | # Install rpm-macro and requires generator |
---|
| 214 | install -Dpm 0644 %{SOURCE1000} $RPM_BUILD_ROOT/%{macrosdir}/macros.lua |
---|
| 215 | install -Dpm 0644 %{SOURCE1001} $RPM_BUILD_ROOT/%{_fileattrsdir}/lua.attr |
---|
| 216 | |
---|
| 217 | |
---|
| 218 | %check |
---|
| 219 | cd ./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 |
---|
| 230 | sed -i.orig -e ' |
---|
| 231 | /db.lua/d; |
---|
| 232 | /errors.lua/d; |
---|
| 233 | ' all.lua |
---|
| 234 | LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir} $RPM_BUILD_ROOT/%{_bindir}/lua -e"_U=true" all.lua |
---|
| 235 | |
---|
| 236 | |
---|
[521] | 237 | %clean |
---|
[9052] | 238 | rm -rf $RPM_BUILD_ROOT |
---|
[521] | 239 | |
---|
[12494] | 240 | |
---|
[9052] | 241 | %post -p /sbin/ldconfig |
---|
| 242 | %postun -p /sbin/ldconfig |
---|
| 243 | |
---|
| 244 | |
---|
[521] | 245 | %files |
---|
| 246 | %defattr(-,root,root,-) |
---|
[12494] | 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 |
---|
[521] | 252 | %{_mandir}/man1/lua*.1* |
---|
[12494] | 253 | |
---|
| 254 | %files libs |
---|
[521] | 255 | %dir %{_libdir}/lua |
---|
[12494] | 256 | %dir %{_libdir}/lua/%{major_version} |
---|
| 257 | %{_libdir}/liblua-%{major_version}.so |
---|
[521] | 258 | %dir %{_datadir}/lua |
---|
[12494] | 259 | %dir %{_datadir}/lua/%{major_version} |
---|
[521] | 260 | |
---|
[12494] | 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 | |
---|
[521] | 267 | %files devel |
---|
| 268 | %defattr(-,root,root,-) |
---|
| 269 | %{_includedir}/l*.h |
---|
| 270 | %{_includedir}/l*.hpp |
---|
| 271 | %{_libdir}/liblua.so |
---|
| 272 | %{_libdir}/pkgconfig/*.pc |
---|
[12494] | 273 | %dir %{macrosdir} |
---|
| 274 | %{macrosdir}/macros.lua |
---|
| 275 | %{_fileattrsdir}/lua.attr |
---|
[521] | 276 | |
---|
| 277 | %files static |
---|
| 278 | %defattr(-,root,root,-) |
---|
| 279 | %{_libdir}/*.a |
---|
| 280 | |
---|
| 281 | |
---|
| 282 | %changelog |
---|
[12494] | 283 | * Fri Aug 21 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.4.0-1 |
---|
| 284 | - new upstream release. |
---|
| 285 | |
---|
[12139] | 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 | |
---|
[9461] | 289 | * Sun Mar 22 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 5.1.4-7 |
---|
| 290 | - rebuilt with readline 6.3 |
---|
| 291 | |
---|
[9052] | 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 | |
---|
[8083] | 296 | * Mon Dec 30 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 5.1.4-5 |
---|
| 297 | - build with current VineSeed |
---|
| 298 | |
---|
[1897] | 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 | |
---|
[521] | 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 |
---|