fish.spec.in 1.75 KB
Newer Older
David Adam's avatar
David Adam committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Summary:                Friendly interactive shell
Name:                   fish

Version:                @[email protected]
Release:                0.%{?dist}

License:                GPL-2.0
Group:                  System/Shells
URL:                    http://fishshell.com/

Source0:                %{name}[email protected]@.orig.tar.gz
BuildRequires:          ncurses-devel gettext gcc-c++ autoconf

BuildRoot:              %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires:		bc
Requires:               python
18 19
Requires:		which
Requires:		man
David Adam's avatar
David Adam committed
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74

%description

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.

%prep
%setup -q -n %{name}[email protected]@

%build
%configure
make %{?_smp_mflags}

%install
make install DESTDIR="$RPM_BUILD_ROOT"
%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
# 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
fi

%postun
# 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
fi

%files -f %{name}.lang
%defattr(-,root,root,-)

# The documentation directory
%docdir %{_datadir}/doc/fish/
%{_datadir}/doc/fish/

# man files
%{_mandir}/man1/*
%docdir %{_datadir}/fish/man/man1/
%{_datadir}/fish/man/man1/

# The program binaries
%attr(0755,root,root) %{_bindir}/*

# Configuration files
%dir %{_sysconfdir}/fish/
%config(noreplace) %{_sysconfdir}/fish/config.fish

# Support files
%{_datadir}/fish/
David Adam's avatar
David Adam committed
75 76 77

# pkgconfig
%{_datadir}/pkgconfig/fish.pc