Fetching contributors…
Cannot retrieve contributors at this time
99 lines (76 sloc) 2.22 KB
Summary: Friendly interactive shell
Name: fish
Release: 0.%{?dist}
License: GPL-2.0
Group: System/Shells
Source0: %{name}_@VERSION@.orig.tar.gz
BuildRequires: ncurses-devel gettext gcc-c++ autoconf
%if 0%{?opensuse_bs} && 0%{?rhel} && 0%{?rhel} < 7
BuildRequires: gcc48 gcc48-c++
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: bc
Requires: python
Requires: man
%if 0%{?rhel_version} >= 700 || 0%{?centos_version} >= 700 || 0%{?fedora} || 0%{?is_opensuse}
Requires: hostname
Requires: net-tools
fish is a shell geared towards interactive use. Its features are
focused on user friendliness and discoverability. The language syntax
is simple but incompatible with other shell languages.
%setup -q -n %{name}-@VERSION@
%if 0%{?opensuse_bs} && 0%{?rhel} && 0%{?rhel} < 7
export CC=gcc48
export CXX=g++48
%if 0%{?rhel} < 6
# i686 required for atomic instructions; default is i386
export CXXFLAGS="$CXXFLAGS -march=i686"
%if 0%{?opensuse_bs}
%configure || cat config.log
make %{?_smp_mflags}
make install DESTDIR="$RPM_BUILD_ROOT"
%find_lang %{name}
# Add fish to the list of allowed shells in /etc/shells
if ! grep %{_bindir}/fish %{_sysconfdir}/shells >/dev/null; then
echo %{_bindir}/fish >>%{_sysconfdir}/shells
# Remove fish from the list of allowed shells in /etc/shells
if [ "$1" = 0 ]; then
grep -v %{_bindir}/fish %{_sysconfdir}/shells >%{_sysconfdir}/fish.tmp
mv %{_sysconfdir}/fish.tmp %{_sysconfdir}/shells
%files -f %{name}.lang
# The documentation directory
%docdir %{_datadir}/doc/fish/
# man files
%docdir %{_datadir}/fish/man/man1/
# The program binaries
%attr(0755,root,root) %{_bindir}/*
# Configuration files
%dir %{_sysconfdir}/fish/
%config(noreplace) %{_sysconfdir}/fish/
# Support files
# pkgconfig