Update to 2.7.1

Along with many fixes:

* Consistent indent
* Requires → Recommends for optional binaries
* Add Recommends/Requires for groff to get autocompletion from manpages
* Ship pkg-config file because it is **useful**
* Sync shells scriptlets with Fedora Packaging Guidelines
* Include COPYING

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1508180
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1514319
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
epel9
Igor Gnatenko 7 years ago
parent b3d7f44922
commit 8429bcf874

1
.gitignore vendored

@ -4,3 +4,4 @@
/fish-2.3.0.tar.gz /fish-2.3.0.tar.gz
/fish-2.3.1.tar.gz /fish-2.3.1.tar.gz
/fish-2.6.0.tar.gz /fish-2.6.0.tar.gz
/fish-2.7.1.tar.gz

@ -1,106 +1,105 @@
Name: fish Name: fish
Version: 2.6.0 Version: 2.7.1
Release: 1%{?dist} Release: 1%{?dist}
Summary: A friendly interactive shell Summary: Friendly interactive shell
Group: System Environment/Shells
License: GPLv2 License: GPLv2
URL: https://fishshell.com/ URL: https://fishshell.com
Source0: https://fishshell.com/files/%{version}/fish-%{version}.tar.gz Source0: https://github.com/fish-shell/fish-shell/releases/download/%{version}/%{name}-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gettext
BuildRequires: doxygen
BuildRequires: ncurses-devel
BuildRequires: pcre2-devel
BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-devel
%global __python %{expand:%{__python%{python3_pkgversion}}} %global __python %{__python3}
# fish's 'math' command requires bc # fish's 'math' command requires bc
Requires: bc Requires: bc
# tab completion wants man-db # tab completion wants man-db
Requires: man-db man-pages %if 0%{?rhel} && 0%{?rhel} <= 7
Requires: man-db
Requires: man-pages
Requires: groff-base
%else
Recommends: man-db
Recommends: man-pages
Recommends: groff-base
%endif
# Other misc requirements # Other misc requirements
Requires: hostname Requires: hostname
BuildRequires: ncurses-devel gettext groff doxygen pcre2-devel
%description %description
fish is a fully-equipped command line shell (like bash or zsh) that is fish is a fully-equipped command line shell (like bash or zsh) that is
smart and user-friendly. fish supports powerful features like syntax smart and user-friendly. fish supports powerful features like syntax
highlighting, autosuggestions, and tab completions that just work, with highlighting, autosuggestions, and tab completions that just work, with
nothing to learn or configure. nothing to learn or configure.
# EPEL compatibility
%if 0%{?rhel}
%global _pkgdocdir %{_docdir}/%{name}
%endif
%prep %prep
%setup -q %autosetup -p1
# Change the bundled scripts to invoke the python binary directly. # Change the bundled scripts to invoke the python binary directly.
for i in share/tools/*.py share/tools/*/*.py; do for f in $(find share/tools -type f -name '*.py'); do
sed -i -e "1 s@^#!/usr/bin/env python\$@#!%{__python}@g" "$i" sed -i -e '1{s@^#!.*@#!%{__python3}@}' "$f"
done done
%build %build
%configure --docdir=%{_pkgdocdir} --without-included-pcre2 %configure --docdir=%{_pkgdocdir} --without-included-pcre2 --disable-silent-rules
make %{?_smp_mflags} all fish_tests %make_build all fish_tests
%install %install
%make_install %make_install
# Fish has magical manpages (visible from inside fish) that live in # Fish has magical manpages (visible from inside fish) that live in
# /usr/share/fish/man/man1. Compress them (rpm won't do it automatically). # /usr/share/fish/man/man1. Compress them (rpm won't do it automatically).
gzip %{buildroot}%{_datadir}/fish/man/man1/*.1 # https://github.com/rpm-software-management/rpm/pull/381
gzip -9 -n %{buildroot}%{_datadir}/fish/man/man1/*.1
%find_lang %{name}
# Fish has what appears to be a useless pkgconfig file
rm %{buildroot}/usr/share/pkgconfig/fish.pc
# Install docs from tarball root # Install docs from tarball root
cp README.md %{buildroot}%{_pkgdocdir} cp -a README.md %{buildroot}%{_pkgdocdir}
cp CONTRIBUTING.md %{buildroot}%{_pkgdocdir} cp -a CONTRIBUTING.md %{buildroot}%{_pkgdocdir}
# filesystem will own a couple of config directories so that other packages # filesystem will own a couple of config directories so that other packages
# can ship fish config snippets without requiring fish: # can ship fish config snippets without requiring fish:
rmdir %{buildroot}%{_datadir}/fish/vendor_completions.d rmdir %{buildroot}%{_datadir}/fish/vendor_completions.d
rmdir %{buildroot}%{_datadir}/fish/vendor_conf.d rmdir %{buildroot}%{_datadir}/fish/vendor_conf.d
%check %find_lang %{name}
# fish_tests is somewhat sensitive to the contents of the filesystem. %check
# If imake is installed, then fish_tests will fail. This shouldn't be
# a problem under mock, though.
#
# See: https://github.com/fish-shell/fish-shell/issues/2322
./fish_tests ./fish_tests
%post %post
# Add fish to the list of allowed shells in /etc/shells
if [ "$1" = 1 ]; then if [ "$1" = 1 ]; then
if ! [ -f "%{_sysconfdir}/shells" ] || ! grep -q '^%{_bindir}/fish$' "%{_sysconfdir}/shells"; then if [ ! -f %{_sysconfdir}/shells ] ; then
echo '%{_bindir}/fish' >>"%{_sysconfdir}/shells" echo "%{_bindir}/fish" > %{_sysconfdir}/shells
echo "/bin/fish" >> %{_sysconfdir}/shells
else
grep -q "^%{_bindir}/fish$" %{_sysconfdir}/shells || echo "%{_bindir}/fish" >> %{_sysconfdir}/shells
grep -q "^/bin/fish$" %{_sysconfdir}/shells || echo "/bin/fish" >> %{_sysconfdir}/shells
fi fi
fi fi
%postun %postun
# Remove fish from the list of allowed shells in /etc/shells if [ "$1" = 0 ] && [ -f %{_sysconfdir}/shells ] ; then
if [ "$1" = 0 ]; then sed -i '\!^%{_bindir}/fish$!d' %{_sysconfdir}/shells
sed -i -e '\#^%{_bindir}/fish$#d' "%{_sysconfdir}/shells" sed -i '\!^/bin/fish$!d' %{_sysconfdir}/shells
fi fi
%files -f %{name}.lang %files -f %{name}.lang
%{_mandir}/man1/*.1* %license COPYING
%{_bindir}/* %{_mandir}/man1/fish*.1*
%{_bindir}/fish*
%config(noreplace) %{_sysconfdir}/fish/ %config(noreplace) %{_sysconfdir}/fish/
%{_datadir}/fish/ %{_datadir}/fish/
%{_datadir}/pkgconfig/fish.pc
%{_pkgdocdir} %{_pkgdocdir}
%changelog %changelog
* Sun Jan 14 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.7.1-1
- Update to 2.7.1
* Wed Oct 04 2017 Andy Lutomirski <luto@kernel.org> - 2.6.0-1 * Wed Oct 04 2017 Andy Lutomirski <luto@kernel.org> - 2.6.0-1
- Update to 2.6.0 - Update to 2.6.0
- Stop using bundled pcre2 - Stop using bundled pcre2

@ -1 +1 @@
SHA512 (fish-2.6.0.tar.gz) = d4ded5ce24600e85673a7bb016e9dc36bce999b27f40e6b1ce0b9ca49a421be2d444d9d2b6f178f6eee963e59daa4a65df4c3de2a8086a610486f758fcfb0ed1 SHA512 (fish-2.7.1.tar.gz) = 45ee3453404c5d6c56d307b4cd19197de862f9f42d7fa06461acec56dea7146db5675cf6419dd5f72e939b3e4b1955d3761098df1de89a8cebe47645eb6f7a4b

Loading…
Cancel
Save