[12494] | 1 | # No tests yet for 5.3.5 |
---|
[12519] | 2 | %global test_version 5.4.2 |
---|
[12494] | 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 |
---|
[12519] | 8 | %global bootstrap_version %{bootstrap_major_version}.6 |
---|
[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 |
---|
[12519] | 16 | Version: 5.4.2 |
---|
[12494] | 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 | # https://www.lua.org/bugs.html |
---|
[12519] | 47 | # none |
---|
[9461] | 48 | |
---|
[12494] | 49 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 50 | BuildRequires: readline-devel |
---|
| 51 | BuildRequires: ncurses-devel |
---|
[521] | 52 | |
---|
[12494] | 53 | Requires: 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 | |
---|
[521] | 57 | %description |
---|
| 58 | Lua is an extension programming language designed to support |
---|
| 59 | general procedural programming with data description facilities. |
---|
| 60 | It also offers good support for object-oriented programming, |
---|
| 61 | functional programming, and data-driven programming. |
---|
| 62 | Lua is intended to be used as a powerful, light-weight configuration language |
---|
| 63 | for any program that needs one. |
---|
| 64 | Lua 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 |
---|
[9461] | 68 | Lua は、データ記述機能を備え、汎用の手続き型プログラミングをサポート |
---|
| 69 | するようデザインされた拡張プログラミング言語です。 |
---|
| 70 | オブジェクト指向プログラミング、関数型プログラミング、データ駆動型 |
---|
| 71 | プログラミングもサポートしています。 |
---|
| 72 | Lua は、コンフィギュレーションが必要なあらゆるプログラムのための、 |
---|
| 73 | パワフルかつ軽いコンフィギュレーション言語としての使用を意図しています。 |
---|
| 74 | Lua は、クリーンな C (つまり、ANSI C と C++ の共通のサブセット) で |
---|
| 75 | 書かれたライブラリとして実装されています。 |
---|
[521] | 76 | |
---|
| 77 | |
---|
[12494] | 78 | %package libs |
---|
| 79 | Summary: Libraries for %{name} |
---|
| 80 | Summary(ja): Lua の共有ライブラリ |
---|
| 81 | Provides: lua(abi) = %{major_version} |
---|
| 82 | |
---|
| 83 | %description libs |
---|
| 84 | This package contains the shared libraries for %{name}. |
---|
| 85 | |
---|
| 86 | |
---|
| 87 | %package devel |
---|
| 88 | Summary: Libraries and include files for Lua. |
---|
| 89 | Summary(ja): Lua の開発用ファイル |
---|
| 90 | Group: programming |
---|
| 91 | Requires: %{name} = %{version}-%{release} |
---|
| 92 | Requires: ncurses-devel |
---|
| 93 | Requires: pkgconfig |
---|
| 94 | |
---|
[521] | 95 | %description devel |
---|
| 96 | Libraries and include files for Lua. |
---|
| 97 | |
---|
| 98 | |
---|
[12494] | 99 | %package static |
---|
| 100 | Summary: Static library for Lua |
---|
| 101 | Summary(ja): Lua の静的ライブラリ |
---|
| 102 | Group: programming |
---|
| 103 | Requires: %{name}-devel = %{version}-%{release} |
---|
| 104 | |
---|
[521] | 105 | %description static |
---|
| 106 | This package contains the static version of liblua for %{name}. |
---|
| 107 | |
---|
| 108 | |
---|
| 109 | %prep |
---|
[12494] | 110 | %if 0%{?bootstrap} |
---|
| 111 | %setup -q -a 2 -a 3 -n %{name}-%{version} |
---|
| 112 | %else |
---|
| 113 | %setup -q -a 3 |
---|
| 114 | %endif |
---|
| 115 | cp %{SOURCE1} . |
---|
| 116 | mv 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 |
---|
[521] | 122 | |
---|
[12494] | 123 | # Put proper version in configure.ac, patch0 hardcodes 5.3.0 |
---|
| 124 | sed -i 's|5.3.0|%{version}|g' configure.ac |
---|
| 125 | autoreconf -ifv |
---|
| 126 | |
---|
| 127 | %if 0%{?bootstrap} |
---|
| 128 | cd lua-%{bootstrap_version}/ |
---|
| 129 | mv 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 |
---|
| 135 | autoreconf -i |
---|
| 136 | cd .. |
---|
| 137 | %endif |
---|
| 138 | |
---|
| 139 | |
---|
[521] | 140 | %build |
---|
[12494] | 141 | %configure --with-readline --with-compat-module |
---|
[521] | 142 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool |
---|
| 143 | sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool |
---|
[12494] | 144 | # Autotools give me a headache sometimes. |
---|
| 145 | sed -i 's|@pkgdatadir@|%{_datadir}|g' src/luaconf.h.template |
---|
| 146 | |
---|
[521] | 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 |
---|
[12494] | 149 | make %{?_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} |
---|
| 153 | pushd lua-%{bootstrap_version} |
---|
| 154 | %configure --with-readline --with-compat-module |
---|
| 155 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool |
---|
| 156 | sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool |
---|
| 157 | # Autotools give me a headache sometimes. |
---|
| 158 | sed -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 |
---|
[521] | 162 | make %{?_smp_mflags} LIBS="-lm -ldl" luac_LDADD="liblua.la -lm -ldl" |
---|
[12494] | 163 | popd |
---|
| 164 | %endif |
---|
[521] | 165 | |
---|
| 166 | |
---|
| 167 | %install |
---|
| 168 | rm -rf $RPM_BUILD_ROOT |
---|
| 169 | make install DESTDIR=$RPM_BUILD_ROOT |
---|
[12494] | 170 | rm $RPM_BUILD_ROOT%{_libdir}/*.la |
---|
| 171 | mkdir -p $RPM_BUILD_ROOT%{_libdir}/lua/%{major_version} |
---|
| 172 | mkdir -p $RPM_BUILD_ROOT%{_datadir}/lua/%{major_version} |
---|
[521] | 173 | |
---|
[12494] | 174 | # Rename luaconf.h to luaconf-<arch>.h to avoid file conflicts on |
---|
| 175 | # multilib systems and install luaconf.h wrapper |
---|
| 176 | mv %{buildroot}%{_includedir}/luaconf.h %{buildroot}%{_includedir}/luaconf-%{_arch}.h |
---|
| 177 | install -p -m 644 %{SOURCE4} %{buildroot}%{_includedir}/luaconf.h |
---|
[521] | 178 | |
---|
[12494] | 179 | %if 0%{?bootstrap} |
---|
| 180 | pushd lua-%{bootstrap_version} |
---|
| 181 | mkdir $RPM_BUILD_ROOT/installdir |
---|
| 182 | make install DESTDIR=$RPM_BUILD_ROOT/installdir |
---|
| 183 | cp -a $RPM_BUILD_ROOT/installdir/%{_libdir}/liblua-%{bootstrap_major_version}.so $RPM_BUILD_ROOT%{_libdir}/ |
---|
| 184 | mkdir -p $RPM_BUILD_ROOT%{_libdir}/lua/%{bootstrap_major_version} |
---|
| 185 | mkdir -p $RPM_BUILD_ROOT%{_datadir}/lua/%{bootstrap_major_version} |
---|
| 186 | rm -rf $RPM_BUILD_ROOT/installdir |
---|
| 187 | popd |
---|
| 188 | %endif |
---|
| 189 | |
---|
| 190 | # Install rpm-macro and requires generator |
---|
| 191 | install -Dpm 0644 %{SOURCE1000} $RPM_BUILD_ROOT/%{macrosdir}/macros.lua |
---|
| 192 | install -Dpm 0644 %{SOURCE1001} $RPM_BUILD_ROOT/%{_fileattrsdir}/lua.attr |
---|
| 193 | |
---|
| 194 | |
---|
| 195 | %check |
---|
| 196 | cd ./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 |
---|
| 207 | sed -i.orig -e ' |
---|
| 208 | /db.lua/d; |
---|
| 209 | /errors.lua/d; |
---|
| 210 | ' all.lua |
---|
| 211 | LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir} $RPM_BUILD_ROOT/%{_bindir}/lua -e"_U=true" all.lua |
---|
| 212 | |
---|
| 213 | |
---|
[521] | 214 | %clean |
---|
[9052] | 215 | rm -rf $RPM_BUILD_ROOT |
---|
[521] | 216 | |
---|
[12494] | 217 | |
---|
[9052] | 218 | %post -p /sbin/ldconfig |
---|
| 219 | %postun -p /sbin/ldconfig |
---|
| 220 | |
---|
| 221 | |
---|
[521] | 222 | %files |
---|
| 223 | %defattr(-,root,root,-) |
---|
[12494] | 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 |
---|
[521] | 229 | %{_mandir}/man1/lua*.1* |
---|
[12494] | 230 | |
---|
| 231 | %files libs |
---|
[521] | 232 | %dir %{_libdir}/lua |
---|
[12494] | 233 | %dir %{_libdir}/lua/%{major_version} |
---|
| 234 | %{_libdir}/liblua-%{major_version}.so |
---|
[521] | 235 | %dir %{_datadir}/lua |
---|
[12494] | 236 | %dir %{_datadir}/lua/%{major_version} |
---|
[521] | 237 | |
---|
[12494] | 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 | |
---|
[521] | 244 | %files devel |
---|
| 245 | %defattr(-,root,root,-) |
---|
| 246 | %{_includedir}/l*.h |
---|
| 247 | %{_includedir}/l*.hpp |
---|
| 248 | %{_libdir}/liblua.so |
---|
| 249 | %{_libdir}/pkgconfig/*.pc |
---|
[12494] | 250 | %dir %{macrosdir} |
---|
| 251 | %{macrosdir}/macros.lua |
---|
| 252 | %{_fileattrsdir}/lua.attr |
---|
[521] | 253 | |
---|
| 254 | %files static |
---|
| 255 | %defattr(-,root,root,-) |
---|
| 256 | %{_libdir}/*.a |
---|
| 257 | |
---|
| 258 | |
---|
| 259 | %changelog |
---|
[12519] | 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 | |
---|
[12494] | 264 | * Fri Aug 21 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.4.0-1 |
---|
| 265 | - new upstream release. |
---|
| 266 | |
---|
[12139] | 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 | |
---|
[9461] | 270 | * Sun Mar 22 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 5.1.4-7 |
---|
| 271 | - rebuilt with readline 6.3 |
---|
| 272 | |
---|
[9052] | 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 | |
---|
[8083] | 277 | * Mon Dec 30 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 5.1.4-5 |
---|
| 278 | - build with current VineSeed |
---|
| 279 | |
---|
[1897] | 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 | |
---|
[521] | 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 |
---|