Toshaan Bharvani
2 years ago
commit
2e2212701d
4 changed files with 254 additions and 0 deletions
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh |
||||
|
||||
NUM=0 |
||||
TOL=0 |
||||
for cow in /usr/share/cowsay/cows/*.cow ; do |
||||
TOL=$((TOL+1)) |
||||
done |
||||
|
||||
SELECT=$(((`date +%M | sed -e 's|^0||'`*60+`date +%S | sed -e 's|^0||'`)%(TOL))) |
||||
|
||||
for cow in /usr/share/cowsay/cows/*.cow ; do |
||||
NUM=$((NUM+1)) |
||||
if [ $NUM = $SELECT ] ; then break ; fi |
||||
done |
||||
|
||||
exec /usr/bin/cowsay -f $cow "$@" |
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
# Copyright 1999-2005 Gentoo Foundation |
||||
# Distributed under the terms of the GNU General Public License v2 |
||||
# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/games-misc/cowsay/files/cowsay.bashcomp,v 1.1 2005/02/06 14:37:54 ka0ttic Exp $ |
||||
|
||||
# bash command-line completion for cowsay |
||||
# Author: Aaron Walker <ka0ttic@gentoo.org> |
||||
# Modified by: Michal Bentkowski <mr.ecik at gmail.com> |
||||
|
||||
_cowsay() { |
||||
local cur prev opts x |
||||
COMPREPLY=() |
||||
cur="${COMP_WORDS[COMP_CWORD]}" |
||||
prev="${COMP_WORDS[COMP_CWORD-1]}" |
||||
opts="-e -f -h -l -n -T -W -b -d -g -p -s -t -w -y" |
||||
|
||||
if [[ "${cur}" == -* || ${COMP_CWORD} -eq 1 ]] ; then |
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) |
||||
return 0 |
||||
fi |
||||
|
||||
case "${prev}" in |
||||
-f) |
||||
COMPREPLY=( $( command ls /usr/share/cowsay| \ |
||||
sed -ne 's/^\('$cur'.*\)\.cow$/\1/p') ) |
||||
return 0 |
||||
;; |
||||
-[eTW]) |
||||
COMPREPLY=() |
||||
;; |
||||
esac |
||||
} |
||||
complete -o filenames -F _cowsay cowsay cowthink |
||||
|
||||
# vim: set ft=sh tw=80 sw=4 et : |
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
Description: Add a fox cow |
||||
Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888229#5 |
||||
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888229 |
||||
--- /dev/null |
||||
+++ b/share/cows/fox.cow |
||||
@@ -0,0 +1,18 @@ |
||||
+$the_cow = <<EOC; |
||||
+ $thoughts ,-. .-, |
||||
+ $thoughts |-.\\ __ /.-| |
||||
+ $thoughts \\ ` ` / |
||||
+ /_ _ \\ |
||||
+ < _`q p _ > |
||||
+ <.._=/ \\=_. > |
||||
+ {`\\()/`}`\\ |
||||
+ { } \\ |
||||
+ |{ } \\ |
||||
+ \\ '--' .- \\ |
||||
+ |- / \\ |
||||
+ | | | | | ; |
||||
+ | | |.;.,..__ | |
||||
+ .-"";` `| |
||||
+ / | / |
||||
+ `-../____,..---'` |
||||
+EOC |
@ -0,0 +1,180 @@
@@ -0,0 +1,180 @@
|
||||
%global compdir %(pkg-config --variable=completionsdir bash-completion) |
||||
%global __requires_exclude .*Acme::Cow.* |
||||
|
||||
Name: cowsay |
||||
Version: 3.7.0 |
||||
Release: 1%{?dist} |
||||
Summary: Configurable speaking/thinking cow |
||||
License: GPLv3+ |
||||
URL: https://github.com/cowsay-org/cowsay |
||||
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz |
||||
Source1: cowsay.bashcomp |
||||
Source2: animalsay |
||||
Patch0: fox-cow.patch |
||||
|
||||
BuildArch: noarch |
||||
BuildRequires: bash-completion |
||||
BuildRequires: perl-generators |
||||
Requires: perl-Encode |
||||
|
||||
%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 |
||||
|
||||
%build |
||||
echo No need to build anything |
||||
|
||||
%install |
||||
# 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}/cows,%{_sysconfdir}/bash_completion.d} |
||||
cp -p %{name} $RPM_BUILD_ROOT%{_bindir} |
||||
cp -p share/cows/* $RPM_BUILD_ROOT%{_datadir}/%{name}/cows |
||||
cp -p %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
||||
cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir} |
||||
|
||||
# License issue |
||||
rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/cows/daemon.cow |
||||
|
||||
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 |
||||
mkdir -p $RPM_BUILD_ROOT%{compdir}/ |
||||
cp %{SOURCE1} $RPM_BUILD_ROOT%{compdir}/ |
||||
|
||||
%files |
||||
%doc ChangeLog LICENSE.txt README* |
||||
%{_bindir}/* |
||||
%{_mandir}/man1/cow* |
||||
%{_datadir}/%{name} |
||||
%exclude %{_datadir}/cowsay/cows/bong.cow |
||||
%exclude %{_datadir}/cowsay/cows/sodomized.cow |
||||
%exclude %{_datadir}/cowsay/cows/satanic.cow |
||||
%(dirname %{compdir}) |
||||
|
||||
%changelog |
||||
* Fri Aug 13 2021 Gwyn Ciesla <gwync@protonmail.com> - 3.7.0-1 |
||||
- 3.7.0i, new upstream. |
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.04-17 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild |
||||
|
||||
* Thu Nov 19 2020 Filipe Brandenburger <filbranden@gmail.com> - 3.04-16 |
||||
- Add fox cow. |
||||
|
||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.04-15 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild |
||||
|
||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.04-14 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild |
||||
|
||||
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.04-13 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild |
||||
|
||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.04-12 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild |
||||
|
||||
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.04-11 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild |
||||
|
||||
* Thu Feb 08 2018 Matthew Miller <mattdm@fedoraproject.org> - 3.04-10 |
||||
- spec file modernization (no group, no rm -rf) |
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.04-9 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild |
||||
|
||||
* Mon Nov 20 2017 Gwyn Ciesla <limburgher@gmail.com> - 3.04-8 |
||||
- Drop tastless content entirely. |
||||
|
||||
* Mon Nov 20 2017 Gwyn Ciesla <limburgher@gmail.com> - 3.04-7 |
||||
- Split out -tasteless, 1515182. |
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.04-6 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild |
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.04-5 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild |
||||
|
||||
* Mon Jan 09 2017 Jon Ciesla <limburgher@gmail.com> - 3.04-4 |
||||
- Require perl-Encode, BZ 1411168. |
||||
|
||||
* Mon Dec 19 2016 Jon Ciesla <limburgher@gmail.com> - 3.04-3 |
||||
- Fix license tag, BZ 1350114. |
||||
|
||||
* Wed Dec 14 2016 Jon Ciesla <limburgher@gmail.com> - 3.04-2 |
||||
- Drop bogus Acme::Cow requirement, BZ 1404804. |
||||
|
||||
* Mon Dec 12 2016 Jon Ciesla <limburgher@gmail.com> - 3.04-1 |
||||
- 3.04, new upstream location, BZ 1403460. |
||||
|
||||
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.03-20 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild |
||||
|
||||
* Sun Jan 17 2016 Hans Ulrich Niedermann <hun@n-dimensional.de> - 3.03-19 |
||||
- replace %%define by %%global |
||||
- avoid license issue with daemon.cow by not shipping it in RPM |
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.03-18 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild |
||||
|
||||
* Fri Feb 20 2015 Matthew Miller <mattdm@fedoraproject.org> - 3.03-17 |
||||
- include unicode and formatting fixes from Debian |
||||
|
||||
* Fri Sep 26 2014 Rahul Sundaram <sundaram@fedoraproject.org> - 3.03-16 |
||||
- fix location of bash completion script |
||||
- don't own /etc/bash_completion.d/ |
||||
- drop redundant buildroot, defattr and clean |
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.03-15 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild |
||||
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.03-14 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild |
||||
|
||||
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 3.03-13 |
||||
- Perl 5.18 rebuild |
||||
|
||||
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.03-12 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild |
||||
|
||||
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.03-11 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild |
||||
|
||||
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.03-10 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild |
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.03-9 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild |
||||
|
||||
* 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 |
Loading…
Reference in new issue