Accepting request 1030729 from home:luc14n0:branches:shells
Add zsh-sh subpackage. OBS-URL: https://build.opensuse.org/request/show/1030729 OBS-URL: https://build.opensuse.org/package/show/shells/zsh?expand=0&rev=238
This commit is contained in:
parent
737d982d05
commit
a70a866590
12
zsh.changes
12
zsh.changes
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Oct 22 05:22:28 UTC 2022 - Luciano Santos <luc14n0@opensuse.org>
|
||||||
|
|
||||||
|
- Add zsh-sh subpackage to offer Zsh users a "native" way to handle
|
||||||
|
/bin/sh scripts and use an SH shell with the capabilities of Zsh
|
||||||
|
itself to emulate a Bourne shell. An 'sh' symlink pointing to the
|
||||||
|
Zsh binary is all that is needed for it to emulate the Bourne
|
||||||
|
shell, it is similar to the use of `emulate sh` Zsh's built-in
|
||||||
|
command or the `zsh --emulate sh` shell command.
|
||||||
|
- Drop deprecated use of install_info(_delete) post(un) macros. RPM
|
||||||
|
file triggers have replaced their functionality since 2019.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Sep 12 13:03:37 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
Mon Sep 12 13:03:37 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
48
zsh.spec
48
zsh.spec
@ -95,6 +95,17 @@ mechanism, and more.
|
|||||||
|
|
||||||
This package contains the Zsh manual in HTML format.
|
This package contains the Zsh manual in HTML format.
|
||||||
|
|
||||||
|
%package sh
|
||||||
|
Summary: Handle behaviour of /bin/sh
|
||||||
|
Group: System/Shells
|
||||||
|
Requires: zsh = %{version}
|
||||||
|
Conflicts: alternative(sh)
|
||||||
|
Provides: alternative(sh)
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description sh
|
||||||
|
Use zsh as /bin/sh implementation.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
@ -192,6 +203,13 @@ rm -f %{buildroot}/%{_infodir}/dir
|
|||||||
%fdupes %{buildroot}
|
%fdupes %{buildroot}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create the symlink required for zsh-sh to handle /bin/sh
|
||||||
|
#
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
ln -s %{_bindir}/zsh %{buildroot}%{_bindir}/sh
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if ! 0%{?qemu_user_space_build}
|
%if ! 0%{?qemu_user_space_build}
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
@ -211,9 +229,7 @@ mv Test/E01options.ztst Test/E01options.ztst.mvd
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%if 0%{?suse_version}
|
%if ! 0%{?suse_version}
|
||||||
:
|
|
||||||
%else
|
|
||||||
if [ "$1" = 0 ] ; then
|
if [ "$1" = 0 ] ; then
|
||||||
/sbin/install-info --delete %{_infodir}/zsh.info.gz %{_infodir}/dir \
|
/sbin/install-info --delete %{_infodir}/zsh.info.gz %{_infodir}/dir \
|
||||||
--entry="* zsh: (zsh). An enhanced bourne shell."
|
--entry="* zsh: (zsh). An enhanced bourne shell."
|
||||||
@ -221,23 +237,20 @@ mv Test/E01options.ztst Test/E01options.ztst.mvd
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%if 0%{?suse_version}
|
%if ! 0%{?suse_version}
|
||||||
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
if [ ! -f %{_sysconfdir}/shells ]; then
|
||||||
%else
|
echo "%{_bindir}/zsh" > %{_sysconfdir}/shells
|
||||||
if [ ! -f %{_sysconfdir}/shells ]; then
|
else
|
||||||
echo "%{_bindir}/zsh" > %{_sysconfdir}/shells
|
grep -q "^%{_bindir}/zsh$" %{_sysconfdir}/shells \
|
||||||
else
|
|| echo "%{_bindir}/zsh" >> %{_sysconfdir}/shells
|
||||||
grep -q "^%{_bindir}/zsh$" %{_sysconfdir}/shells || echo "%{_bindir}/zsh" >> %{_sysconfdir}/shells
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
/sbin/install-info %{_infodir}/zsh.info.gz %{_infodir}/dir \
|
/sbin/install-info %{_infodir}/zsh.info.gz %{_infodir}/dir \
|
||||||
--entry="* zsh: (zsh). An enhanced bourne shell."
|
--entry="* zsh: (zsh). An enhanced bourne shell."
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%if 0%{?suse_version}
|
%if ! 0%{?suse_version}
|
||||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
|
||||||
%else
|
|
||||||
if [ "$1" = 0 ] ; then
|
if [ "$1" = 0 ] ; then
|
||||||
if [ -f %{_sysconfdir}/shells ] ; then
|
if [ -f %{_sysconfdir}/shells ] ; then
|
||||||
TmpFile=`%{_bindir}/mktemp /tmp/.zshrpmXXXXXX`
|
TmpFile=`%{_bindir}/mktemp /tmp/.zshrpmXXXXXX`
|
||||||
@ -279,4 +292,7 @@ fi
|
|||||||
%files htmldoc
|
%files htmldoc
|
||||||
%doc Doc/htmldoc/*
|
%doc Doc/htmldoc/*
|
||||||
|
|
||||||
|
%files sh
|
||||||
|
%{_bindir}/sh
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user