Accepting request 922644 from Base:System
OBS-URL: https://build.opensuse.org/request/show/922644 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gawk?expand=0&rev=46
This commit is contained in:
commit
9a4214016f
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 23 15:02:47 UTC 2021 - Manfred Schwarb <manfred99@gmx.ch>
|
||||||
|
|
||||||
|
- remove update-alternatives support, as on linux systems GNU software
|
||||||
|
(i.e. gawk in this case) is usually considered the default implementation.
|
||||||
|
- use %make macros
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 4 10:41:36 UTC 2021 - Ludwig Nussel <lnussel@suse.de>
|
Thu Feb 4 10:41:36 UTC 2021 - Ludwig Nussel <lnussel@suse.de>
|
||||||
|
|
||||||
|
46
gawk.spec
46
gawk.spec
@ -32,11 +32,6 @@ BuildRequires: automake
|
|||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: makeinfo
|
BuildRequires: makeinfo
|
||||||
BuildRequires: update-alternatives
|
|
||||||
Requires(post): %{install_info_prereq}
|
|
||||||
Requires(post): update-alternatives
|
|
||||||
Requires(preun): %{install_info_prereq}
|
|
||||||
Requires(preun): update-alternatives
|
|
||||||
Provides: awk
|
Provides: awk
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -52,48 +47,26 @@ almost completely POSIX 1003.2 compliant.
|
|||||||
%build
|
%build
|
||||||
autoreconf -fiv
|
autoreconf -fiv
|
||||||
%configure
|
%configure
|
||||||
make %{?_smp_mflags}
|
%make_build
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make check %{?_smp_mflags}
|
%make_build check
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
|
|
||||||
%if !0%{?usrmerged}
|
%if !0%{?usrmerged}
|
||||||
install -d %{buildroot}/bin
|
install -d -m 755 %{buildroot}/bin
|
||||||
ln -sf %{_bindir}/gawk %{buildroot}/bin
|
ln -s %{_bindir}/gawk %{buildroot}/bin/gawk
|
||||||
ln -s %{_sysconfdir}/alternatives/awk %{buildroot}/bin/awk
|
ln -s %{_bindir}/gawk %{buildroot}/bin/awk
|
||||||
%endif
|
%endif
|
||||||
rm -f %{buildroot}%{_bindir}/*-%{version} %{buildroot}%{_bindir}/awk
|
|
||||||
|
|
||||||
# create symlinks for update-alternatives
|
# remove versioned gawk and create symlink for awk.1
|
||||||
%if !0%{?usrmerged}
|
rm -fv %{buildroot}%{_bindir}/*-%{version}
|
||||||
ln -s %{_sysconfdir}/alternatives/usr-bin-awk %{buildroot}%{_bindir}/awk
|
ln -sfv %{_mandir}/man1/gawk.1%{?ext_man} %{buildroot}%{_mandir}/man1/awk.1%{?ext_man}
|
||||||
%else
|
|
||||||
ln -s %{_sysconfdir}/alternatives/awk %{buildroot}%{_bindir}/awk
|
|
||||||
%endif
|
|
||||||
ln -s %{_sysconfdir}/alternatives/awk.1%{?ext_man} %{buildroot}%{_mandir}/man1/awk.1%{?ext_man}
|
|
||||||
|
|
||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
|
|
||||||
%post
|
|
||||||
%if !0%{?usrmerged}
|
|
||||||
%{_sbindir}/update-alternatives \
|
|
||||||
--install /bin/awk awk %{_bindir}/gawk 20 \
|
|
||||||
--slave %{_bindir}/awk usr-bin-awk %{_bindir}/gawk \
|
|
||||||
--slave %{_mandir}/man1/awk.1.gz awk.1%{?ext_man} %{_mandir}/man1/gawk.1%{?ext_man}
|
|
||||||
%else
|
|
||||||
%{_sbindir}/update-alternatives \
|
|
||||||
--install %{_bindir}/awk awk %{_bindir}/gawk 20 \
|
|
||||||
--slave %{_mandir}/man1/awk.1.gz awk.1%{?ext_man} %{_mandir}/man1/gawk.1%{?ext_man}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%postun
|
|
||||||
if [ ! -f %{_bindir}/gawk ]; then
|
|
||||||
%{_sbindir}/update-alternatives --remove awk %{_bindir}/gawk
|
|
||||||
fi
|
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%config %{_sysconfdir}/profile.d/gawk.csh
|
%config %{_sysconfdir}/profile.d/gawk.csh
|
||||||
%config %{_sysconfdir}/profile.d/gawk.sh
|
%config %{_sysconfdir}/profile.d/gawk.sh
|
||||||
@ -101,13 +74,10 @@ fi
|
|||||||
#UsrMerge
|
#UsrMerge
|
||||||
/bin/awk
|
/bin/awk
|
||||||
/bin/gawk
|
/bin/gawk
|
||||||
%ghost %{_sysconfdir}/alternatives/usr-bin-awk
|
|
||||||
#EndUsrMerge
|
#EndUsrMerge
|
||||||
%endif
|
%endif
|
||||||
%{_bindir}/awk
|
%{_bindir}/awk
|
||||||
%{_mandir}/man1/awk.1%{?ext_man}
|
%{_mandir}/man1/awk.1%{?ext_man}
|
||||||
%ghost %{_sysconfdir}/alternatives/awk
|
|
||||||
%ghost %{_sysconfdir}/alternatives/awk.1%{?ext_man}
|
|
||||||
%license COPYING*
|
%license COPYING*
|
||||||
%doc AUTHORS NEWS POSIX.STD README ChangeLog*
|
%doc AUTHORS NEWS POSIX.STD README ChangeLog*
|
||||||
%{_bindir}/gawk
|
%{_bindir}/gawk
|
||||||
|
Loading…
Reference in New Issue
Block a user