Accepting request 329247 from home:MargueriteSu:branches:devel:languages:lua
OBS-URL: https://build.opensuse.org/request/show/329247 OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua51?expand=0&rev=11
This commit is contained in:
parent
931e30f8d3
commit
28f5b1e74d
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Sep 5 05:22:42 UTC 2015 - i@marguerite.su
|
||||||
|
|
||||||
|
- provides Lua(API) and Lua(devel)
|
||||||
|
- adjust update-alternative weight
|
||||||
|
- macros installs to -devel
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 31 18:12:35 UTC 2015 - jengelh@inai.de
|
Fri Jul 31 18:12:35 UTC 2015 - jengelh@inai.de
|
||||||
|
|
||||||
|
47
lua51.spec
47
lua51.spec
@ -16,17 +16,14 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define major_version 5.1
|
||||||
|
%define lib_suffix 5_1
|
||||||
Name: lua51
|
Name: lua51
|
||||||
Version: 5.1.5
|
Version: 5.1.5
|
||||||
Release: 0
|
Release: 0
|
||||||
%define major_version 5.1
|
|
||||||
BuildRequires: pkg-config
|
|
||||||
BuildRequires: readline-devel
|
|
||||||
BuildRequires: update-alternatives
|
|
||||||
PreReq: update-alternatives
|
|
||||||
Summary: Small Embeddable Language with Simple Procedural Syntax
|
Summary: Small Embeddable Language with Simple Procedural Syntax
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Other
|
Group: Development/Languages/Lua
|
||||||
Url: http://www.lua.org
|
Url: http://www.lua.org
|
||||||
Source: http://www.lua.org/ftp/lua-%{version}.tar.gz
|
Source: http://www.lua.org/ftp/lua-%{version}.tar.gz
|
||||||
Source1: macros.lua
|
Source1: macros.lua
|
||||||
@ -35,6 +32,11 @@ Patch0: %{name}-%{version}-shared.diff
|
|||||||
Patch1: %{name}-%{version}-module-path.diff
|
Patch1: %{name}-%{version}-module-path.diff
|
||||||
Patch3: %{name}-%{version}-libdir.diff
|
Patch3: %{name}-%{version}-libdir.diff
|
||||||
Patch4: %{name}-%{version}-pkgconfig.patch
|
Patch4: %{name}-%{version}-pkgconfig.patch
|
||||||
|
BuildRequires: pkg-config
|
||||||
|
BuildRequires: readline-devel
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(preun): update-alternatives
|
||||||
|
Provides: Lua(API) = %{major_version}
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -54,8 +56,9 @@ simplicity, efficiency, portability, and low embedding cost.
|
|||||||
Summary: Development files for lua
|
Summary: Development files for lua
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Conflicts: lua50-devel
|
Requires: liblua%{lib_suffix} = %{version}
|
||||||
Conflicts: lua-devel
|
Provides: Lua(devel) = %{major_version}
|
||||||
|
Obsoletes: otherproviders(Lua(devel))
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Lua is a programming language originally designed for extending
|
Lua is a programming language originally designed for extending
|
||||||
@ -65,13 +68,13 @@ stand-alone language.
|
|||||||
This package contains files needed for embedding lua into your
|
This package contains files needed for embedding lua into your
|
||||||
application.
|
application.
|
||||||
|
|
||||||
%package -n liblua5_1
|
%package -n liblua%{lib_suffix}
|
||||||
Summary: The Lua integration library
|
Summary: The Lua integration library
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Provides: %{name}-libs = %{version}
|
Provides: %{name}-libs = %{version}
|
||||||
Obsoletes: %{name}-libs <= %{version}
|
Obsoletes: %{name}-libs <= %{version}
|
||||||
|
|
||||||
%description -n liblua5_1
|
%description -n liblua%{lib_suffix}
|
||||||
Lua is a programming language originally designed for extending
|
Lua is a programming language originally designed for extending
|
||||||
applications, but also frequently used as a general-purpose,
|
applications, but also frequently used as a general-purpose,
|
||||||
stand-alone language.
|
stand-alone language.
|
||||||
@ -113,11 +116,12 @@ simplicity, efficiency, portability, and low embedding cost.
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
sed -i 's:LUA_ROOT2 "LIBDIR/lua/%{major_version}/":LUA_ROOT2 \"%{_lib}/lua/%{major_version}/":' src/luaconf.h
|
sed -i 's:LUA_ROOT2 "LIBDIR/lua/%{major_version}/":LUA_ROOT2 \"%{_lib}/lua/%{major_version}/":' src/luaconf.h
|
||||||
make %{?_smp_mflags} -C src CC="%{__cc}" MYCFLAGS="%{optflags} -fPIC -DLUA_USE_LINUX" MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" V=%{major_version} all
|
make %{?_smp_mflags} -C src CC="gcc" MYCFLAGS="%{optflags} -fPIC -DLUA_USE_LINUX" MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" V=%{major_version} all
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install INSTALL_TOP="%{buildroot}%{_prefix}" INSTALL_LIB="%{buildroot}%{_libdir}" INSTALL_CMOD=%{buildroot}%{_libdir}/lua/%{major_version} INSTALL_MAN="%{buildroot}%{_mandir}/man1"
|
make install INSTALL_TOP="%{buildroot}%{_prefix}" INSTALL_LIB="%{buildroot}%{_libdir}" INSTALL_CMOD=%{buildroot}%{_libdir}/lua/%{major_version} INSTALL_MAN="%{buildroot}%{_mandir}/man1"
|
||||||
install -D -m644 etc/lua.pc %{buildroot}%{_libdir}/pkgconfig/lua.pc
|
find %{buildroot} -name "*.a" -delete -print
|
||||||
|
install -D -m644 etc/lua.pc %{buildroot}%{_libdir}/pkgconfig/lua-%{major_version}.pc
|
||||||
# update-alternatives
|
# update-alternatives
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for file in lua luac ; do
|
for file in lua luac ; do
|
||||||
@ -130,27 +134,27 @@ for file in lua luac ; do
|
|||||||
done
|
done
|
||||||
install -d -m 0755 %{buildroot}%{_libdir}/lua/%{major_version}
|
install -d -m 0755 %{buildroot}%{_libdir}/lua/%{major_version}
|
||||||
install -d -m 0755 %{buildroot}%{_datadir}/lua/%{major_version}
|
install -d -m 0755 %{buildroot}%{_datadir}/lua/%{major_version}
|
||||||
install -D -m 644 %{SOURCE1} %buildroot/etc/rpm/macros.lua51
|
install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.lua-%{major_version}
|
||||||
|
|
||||||
# Debian/Ubuntu/SteamOS/Arch Linux compatibility
|
# Debian/Ubuntu/SteamOS/Arch Linux compatibility
|
||||||
ln -s %{_libdir}/liblua.so.%{major_version} %{buildroot}%{_libdir}/liblua%{major_version}.so.0
|
ln -s %{_libdir}/liblua.so.%{major_version} %{buildroot}%{_libdir}/liblua%{major_version}.so.0
|
||||||
ln -s %{_libdir}/liblua.so %{buildroot}%{_libdir}/liblua5.1.so
|
ln -s %{_libdir}/liblua.so %{buildroot}%{_libdir}/liblua5.1.so
|
||||||
|
|
||||||
%post
|
%post
|
||||||
/usr/sbin/update-alternatives --install \
|
%{_sbindir}/update-alternatives --install \
|
||||||
%{_bindir}/lua lua %{_bindir}/lua%{major_version} 10 \
|
%{_bindir}/lua lua %{_bindir}/lua%{major_version} 30 \
|
||||||
--slave %{_bindir}/luac luac %{_bindir}/luac%{major_version} \
|
--slave %{_bindir}/luac luac %{_bindir}/luac%{major_version} \
|
||||||
--slave %{_mandir}/man1/lua.1.gz lua.1.gz %{_mandir}/man1/lua%{major_version}.1.gz \
|
--slave %{_mandir}/man1/lua.1.gz lua.1.gz %{_mandir}/man1/lua%{major_version}.1.gz \
|
||||||
--slave %{_mandir}/man1/luac.1.gz luac.1.gz %{_mandir}/man1/luac%{major_version}.1.gz
|
--slave %{_mandir}/man1/luac.1.gz luac.1.gz %{_mandir}/man1/luac%{major_version}.1.gz
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ "$1" = 0 ] ; then
|
if [ "$1" = 0 ] ; then
|
||||||
/usr/sbin/update-alternatives --remove lua %{_bindir}/lua%{major_version}
|
%{_sbindir}/update-alternatives --remove lua %{_bindir}/lua%{major_version}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%post -n liblua5_1 -p /sbin/ldconfig
|
%post -n liblua%{lib_suffix} -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -n liblua5_1 -p /sbin/ldconfig
|
%postun -n liblua%{lib_suffix} -p /sbin/ldconfig
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -167,26 +171,25 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/luac
|
%ghost %{_sysconfdir}/alternatives/luac
|
||||||
%ghost %{_sysconfdir}/alternatives/lua.1.gz
|
%ghost %{_sysconfdir}/alternatives/lua.1.gz
|
||||||
%ghost %{_sysconfdir}/alternatives/luac.1.gz
|
%ghost %{_sysconfdir}/alternatives/luac.1.gz
|
||||||
%{_sysconfdir}/rpm/macros.lua51
|
|
||||||
%dir %{_libdir}/lua
|
%dir %{_libdir}/lua
|
||||||
%dir %{_libdir}/lua/%{major_version}
|
%dir %{_libdir}/lua/%{major_version}
|
||||||
%dir %{_datadir}/lua
|
%dir %{_datadir}/lua
|
||||||
%dir %{_datadir}/lua/%{major_version}
|
%dir %{_datadir}/lua/%{major_version}
|
||||||
|
|
||||||
%files -n liblua5_1
|
%files -n liblua%{lib_suffix}
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_libdir}/liblua.so.%{major_version}
|
%{_libdir}/liblua.so.%{major_version}
|
||||||
%{_libdir}/liblua%{major_version}.so.0
|
%{_libdir}/liblua%{major_version}.so.0
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
%{_sysconfdir}/rpm/macros.lua-%{major_version}
|
||||||
%{_includedir}/lauxlib.h
|
%{_includedir}/lauxlib.h
|
||||||
%{_includedir}/lua.h
|
%{_includedir}/lua.h
|
||||||
%{_includedir}/lua.hpp
|
%{_includedir}/lua.hpp
|
||||||
%{_includedir}/luaconf.h
|
%{_includedir}/luaconf.h
|
||||||
%{_includedir}/lualib.h
|
%{_includedir}/lualib.h
|
||||||
%{_libdir}/pkgconfig/lua.pc
|
%{_libdir}/pkgconfig/lua-%{major_version}.pc
|
||||||
%{_libdir}/liblua.a
|
|
||||||
%{_libdir}/liblua.so
|
%{_libdir}/liblua.so
|
||||||
%{_libdir}/liblua5.1.so
|
%{_libdir}/liblua5.1.so
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user