Blob Blame History Raw
Name:           cowsay
Version:        3.03
Release:        8%{?dist}
Summary:        Configurable speaking/thinking cow
Group:          Amusements/Games
License:        GPLv2+ or Artistic
URL:            http://www.nog.net/~tony/warez/cowsay.shtml
Source0:        http://www.nog.net/~tony/warez/%{name}-%{version}.tar.gz
Source1:        cowsay.bashcomp
Source2:        animalsay
Patch0:         cowsay-3.03-help.patch
Patch1:         mech-and-cow.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

%description
cowsay is a configurable talking cow, written in Perl.  It operates
much as the figlet program does, and it written in the same spirit
of silliness.
It generates ASCII pictures of a cow with a message. It can also generate
pictures of other animals.


%prep
%setup -q
%patch0 -p1 -b .help
%{__sed} -e 's#%PREFIX%/share/cows#%{_datadir}/%{name}#' \
         -e 's#%BANGPERL%#!%{__perl}#' -i %{name}
%{__sed} -e 's#%PREFIX%/share/cows#%{_datadir}/%{name}#' \
         -e 's#/usr/local/share/cows#%{_datadir}/%{name}#' -i %{name}.1

mv cows/mech-and-cow cows/mech-and-cow.cow
%patch1 -p1

%build
echo No need to build anything

%install
rm -rf $RPM_BUILD_ROOT
# using install.sh is not a good idea so let's make the install manually
mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_datadir}/%{name},%{_sysconfdir}/bash_completion.d}
cp -p %{name} $RPM_BUILD_ROOT%{_bindir}
cp -p cows/* $RPM_BUILD_ROOT%{_datadir}/%{name}
cp -p %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1
cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}

chmod +x $RPM_BUILD_ROOT%{_bindir}/animalsay
ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/cowthink
ln -s %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/cowthink.1

cp %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc ChangeLog LICENSE README
%{_bindir}/*
%{_mandir}/man1/cow*
%{_datadir}/%{name}
%{_sysconfdir}/bash_completion.d

%changelog
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.03-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.03-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Tue Jul 15 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 3.03-6
- fix license tag to prevent false positive

* Fri May 23 2008 Jon Stanley <jonstanley@gmail.com> - 3.03-5
- Fix license tag

* Tue Oct 09 2007 Michał Bentkowski <mr.ecik at gmail.com> - 3.03-4
- Fix mech-and-cow file (#250844)

* Mon Sep 17 2007 Lubomir Kundrak <lkundrak@redhat.com> - 3.03-3
- Make --help be a bit more sane (#293061)

* Tue Jan 02 2007 Michał Bentkowski <mr.ecik at gmail.com> - 3.03-2
- Use cp -p to keep timestamps
- Fix paths in manpage
- Add animalsay

* Sun Dec 31 2006 Michał Bentkowski <mr.ecik at gmail.com> - 3.03-1
- Initial release