ed24aed
Name:           compat-lua
4574ca4
Version:        5.1.5
ae059ad
Release:        9%{?dist}
ed24aed
Summary:        Powerful light-weight programming language (compat version)
ed24aed
Group:          Development/Languages
ed24aed
License:        MIT
ed24aed
URL:            http://www.lua.org/
ed24aed
Source0:        http://www.lua.org/ftp/lua-%{version}.tar.gz
ed24aed
Patch0:         lua-5.1.4-autotoolize.patch
ed24aed
Patch1:         lua-5.1.4-lunatic.patch
ed24aed
Patch2:         lua-5.1.4-idsize.patch
4574ca4
Patch3:         lua-5.1.4-pc-compat.patch
ed24aed
BuildRequires:  readline-devel ncurses-devel libtool
ed24aed
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
ed24aed
Provides:       lua = 5.1
ed24aed
ed24aed
%description
ed24aed
This package contains a compatibility version of the lua-5.1 binaries.
ed24aed
ed24aed
ed24aed
%package libs
ed24aed
Summary:        Powerful light-weight programming language (compat version)
ed24aed
Provides:       lua(abi) = 5.1
ed24aed
ed24aed
%description libs
ed24aed
This package contains a compatibility version of the lua-5.1 libraries.
ed24aed
ed24aed
ed24aed
%package devel
ed24aed
Summary:        Development files for %{name}
ed24aed
Group:          System Environment/Libraries
ed24aed
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
ed24aed
ed24aed
%description devel
ed24aed
This package contains development files for compat-lua-libs.
ed24aed
ed24aed
ed24aed
%prep
ed24aed
%setup -q -n lua-%{version}
ed24aed
%patch0 -p1 -E -z .autoxxx
ed24aed
%patch1 -p0 -z .lunatic
ed24aed
%patch2 -p1 -z .idsize
4574ca4
%patch3 -p1
ed24aed
# fix perms on auto files
ed24aed
chmod u+x autogen.sh config.guess config.sub configure depcomp install-sh missing
4574ca4
# Avoid make doing auto-reconf itself, killing our rpath removal in the process
ed24aed
autoreconf -i -f
ed24aed
ed24aed
ed24aed
%build
ed24aed
%configure --with-readline
ed24aed
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
ed24aed
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
ed24aed
# hack so that only /usr/bin/lua gets linked with readline as it is the
ed24aed
# only one which needs this and otherwise we get License troubles
ed24aed
make %{?_smp_mflags} LIBS="-lm -ldl" luac_LDADD="liblua.la -lm -ldl"
ed24aed
# also remove readline from lua.pc
ed24aed
sed -i 's/-lreadline -lncurses //g' etc/lua.pc
ed24aed
ed24aed
ed24aed
%install
4574ca4
%make_install
ed24aed
rm $RPM_BUILD_ROOT%{_libdir}/liblua.{a,la}
ed24aed
mkdir -p $RPM_BUILD_ROOT%{_libdir}/lua/5.1
ed24aed
mkdir -p $RPM_BUILD_ROOT%{_datadir}/lua/5.1
ed24aed
# Rename some files to avoid conflicts with 5.2
ed24aed
mv $RPM_BUILD_ROOT%{_bindir}/lua $RPM_BUILD_ROOT%{_bindir}/lua-5.1
ed24aed
mv $RPM_BUILD_ROOT%{_bindir}/luac $RPM_BUILD_ROOT%{_bindir}/luac-5.1
ed24aed
mv $RPM_BUILD_ROOT%{_mandir}/man1/lua.1 \
ed24aed
  $RPM_BUILD_ROOT%{_mandir}/man1/lua-5.1.1
ed24aed
mv $RPM_BUILD_ROOT%{_mandir}/man1/luac.1 \
ed24aed
  $RPM_BUILD_ROOT%{_mandir}/man1/luac-5.1.1
ed24aed
mkdir -p $RPM_BUILD_ROOT%{_includedir}/lua-5.1
ed24aed
mv $RPM_BUILD_ROOT%{_includedir}/l*h* $RPM_BUILD_ROOT%{_includedir}/lua-5.1
ed24aed
rm $RPM_BUILD_ROOT%{_libdir}/liblua.so
ed24aed
mv $RPM_BUILD_ROOT%{_libdir}/pkgconfig/lua.pc \
ed24aed
  $RPM_BUILD_ROOT%{_libdir}/pkgconfig/lua-5.1.pc
ed24aed
ed24aed
ed24aed
%post libs -p /sbin/ldconfig
ed24aed
%postun libs -p /sbin/ldconfig
ed24aed
ed24aed
ed24aed
%files
ed24aed
%{_bindir}/lua-5.1
ed24aed
%{_bindir}/luac-5.1
ed24aed
%{_mandir}/man1/lua*5.1.1*
ed24aed
ed24aed
%files libs
ed24aed
%doc COPYRIGHT HISTORY README doc/*.html doc/*.css doc/*.gif doc/*.png
ed24aed
%{_libdir}/liblua-5.1.so
ed24aed
%dir %{_libdir}/lua
ed24aed
%dir %{_libdir}/lua/5.1
ed24aed
%dir %{_datadir}/lua
ed24aed
%dir %{_datadir}/lua/5.1
ed24aed
ed24aed
%files devel
ed24aed
%{_includedir}/lua-5.1/
ed24aed
%{_libdir}/pkgconfig/lua-5.1.pc
ed24aed
ed24aed
ed24aed
%changelog
ae059ad
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.5-9
ae059ad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
ae059ad
ce0122f
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.5-8
ce0122f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
ce0122f
e385b6c
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.5-7
e385b6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e385b6c
Igor Gnatenko d9b3de2
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 5.1.5-6
Igor Gnatenko d9b3de2
- Rebuild for readline 7.x
Igor Gnatenko d9b3de2
10a5cc6
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.5-5
10a5cc6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
10a5cc6
a189503
* Wed Nov 25 2015 Yaakov Selkowitz <yselkowi@redhat.com> - 5.1.5-4
a189503
- Also use lib64 instead of lib on aarch64
a189503
7ad2a32
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.5-3
7ad2a32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
7ad2a32
e998584
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.5-2
e998584
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
e998584
4574ca4
* Thu Jun 19 2014 Hans de Goede <hdegoede@redhat.com> - 5.1.5-1
4574ca4
- Rebase to 5.1.5 (rhbz#1111013)
4574ca4
0a7abe9
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.4-6
0a7abe9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
0a7abe9
ed24aed
* Sat Aug  3 2013 Hans de Goede <hdegoede@redhat.com> - 5.1.4-5
ed24aed
- New Fedora package with full lua-5.1 for use with applications not yet
ed24aed
  ported to 5.2
ed24aed
- Release fields start at 5 to be newer the compat-lua-libs from the
ed24aed
  non-compat lua package