SHA256
1
0
forked from pool/lua51

- fix update-alternatives

OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua51?expand=0&rev=8
This commit is contained in:
Petr Gajdos 2014-09-12 09:17:52 +00:00 committed by Git OBS Bridge
parent cceba71427
commit dcd1236149
2 changed files with 24 additions and 5 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Sep 12 09:18:50 UTC 2014 - pgajdos@suse.com
- fix update-alternatives
-------------------------------------------------------------------
Wed Sep 10 10:20:31 UTC 2014 - pgajdos@suse.com

View File

@ -118,9 +118,15 @@ make %{?_smp_mflags} -C src CC="%{__cc}" MYCFLAGS="%{optflags} -fPIC -DLUA_USE_L
%install
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
# update-alternatives
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
for file in lua luac ; do
mv "%{buildroot}%{_bindir}/${file}" "%{buildroot}%{_bindir}/${file}%{major_version}"
touch "%{buildroot}%{_sysconfdir}/alternatives/${file}"
ln -sf "%{_sysconfdir}/alternatives/${file}" "%{buildroot}%{_bindir}/${file}"
mv "%{buildroot}%{_mandir}/man1/${file}.1" "%{buildroot}%{_mandir}/man1/${file}%{major_version}.1"
touch "%{buildroot}%{_sysconfdir}/alternatives/${file}.1.gz"
ln -sf "%{_sysconfdir}/alternatives/${file}.1.gz" "%{buildroot}%{_mandir}/man1/${file}.1.gz"
done
install -d -m 0755 %{buildroot}%{_libdir}/lua/%{major_version}
install -d -m 0755 %{buildroot}%{_datadir}/lua/%{major_version}
@ -149,15 +155,23 @@ fi
%files
%defattr(-,root,root)
%doc COPYRIGHT HISTORY README
%{_mandir}/man1/lua%{major_version}.1*
%{_mandir}/man1/luac%{major_version}.1*
%{_prefix}/bin/lua%{major_version}
%{_prefix}/bin/luac%{major_version}
%{_bindir}/lua%{major_version}
%{_bindir}/luac%{major_version}
%{_mandir}/man1/lua%{major_version}.1.gz
%{_mandir}/man1/luac%{major_version}.1.gz
%{_bindir}/lua
%{_bindir}/luac
%{_mandir}/man1/lua.1.gz
%{_mandir}/man1/luac.1.gz
%ghost %{_sysconfdir}/alternatives/lua
%ghost %{_sysconfdir}/alternatives/luac
%ghost %{_sysconfdir}/alternatives/lua.1.gz
%ghost %{_sysconfdir}/alternatives/luac.1.gz
%{_sysconfdir}/rpm/macros.lua51
%dir %{_libdir}/lua
%dir %{_libdir}/lua/%{major_version}
%dir %{_datadir}/lua
%dir %{_datadir}/lua/%{major_version}
/etc/rpm/macros.lua51
%files -n liblua5_1
%defattr(-,root,root)