From 26de85af9444fe5330a7d69593720e2226f38172 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Aug 13 2021 14:29:36 +0000 Subject: 3.7.0 --- diff --git a/.gitignore b/.gitignore index 5016d90..757bf60 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ cowsay-3.03.tar.gz /cowsay-3.04.tar.gz +/cowsay-3.7.0.tar.gz diff --git a/animalsay b/animalsay index 77c3461..b717763 100644 --- a/animalsay +++ b/animalsay @@ -2,13 +2,13 @@ NUM=0 TOL=0 -for cow in /usr/share/cowsay/*.cow ; do +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/*.cow ; do +for cow in /usr/share/cowsay/cows/*.cow ; do NUM=$((NUM+1)) if [ $NUM = $SELECT ] ; then break ; fi done diff --git a/cowsay-3.03-debian-01-empty_messages_fix.patch b/cowsay-3.03-debian-01-empty_messages_fix.patch deleted file mode 100644 index bb2ea7a..0000000 --- a/cowsay-3.03-debian-01-empty_messages_fix.patch +++ /dev/null @@ -1,19 +0,0 @@ -Description: Work-around for broken baloons with empty messages -Forwarded: no -Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=165218#5 -Bug-Debian: http://bugs.debian.org/165218 -Author: Jeronimo Pellegrini - ---- cowsay-3.03.orig/cowsay -+++ cowsay-3.03/cowsay -@@ -106,6 +106,10 @@ sub maxlength { - $l = length $i; - $m = $l if ($l > $m); - } -+## maxlength patch from Jeronimo Pellegrini (Closes: #165218) -+ if ($m == -1) { -+ $m = 0; -+ } - return $m; - } - diff --git a/cowsay-3.03-debian-02-remove_trailing_spaces.patch b/cowsay-3.03-debian-02-remove_trailing_spaces.patch deleted file mode 100644 index 496439b..0000000 --- a/cowsay-3.03-debian-02-remove_trailing_spaces.patch +++ /dev/null @@ -1,28 +0,0 @@ -Description: Removing trailing spaces - This is mainly to work-around broken word-wrapping by mail clients. -Forwarded: no -Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276144#42 -Bug-Debian: http://bugs.debian.org/276144 -Author: Florian Ernst - ---- cowsay-3.03.orig/cowsay -+++ cowsay-3.03/cowsay -@@ -128,15 +132,16 @@ sub construct_balloon { - @border = qw[ / \ \ / | | ]; - } - } -+## no trailing spaces (#276144) - push(@balloon_lines, -- " " . ("_" x $max2) . " \n" , -+ " " . ("_" x $max2) . "\n" , - sprintf($format, $border[0], $message[0], $border[1]), - (@message < 2 ? "" : - map { sprintf($format, $border[4], $_, $border[5]) } - @message[1 .. $#message - 1]), - (@message < 2 ? "" : - sprintf($format, $border[2], $message[$#message], $border[3])), -- " " . ("-" x $max2) . " \n" -+ " " . ("-" x $max2) . "\n" - ); - } - diff --git a/cowsay-3.03-debian-utf8_width.patch b/cowsay-3.03-debian-utf8_width.patch deleted file mode 100644 index 0c3f86e..0000000 --- a/cowsay-3.03-debian-utf8_width.patch +++ /dev/null @@ -1,24 +0,0 @@ -Description: utf8 support in input, output and arguments on utf8-enabled locales - Note that this is not a complete solution (doesn't support Chinese/Japanese - characters for example) but it's better than what we had. -Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=254557#27 -Bug-Debian: http://bugs.debian.org/254557 -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/cowsay/+bug/393212 -Author: Damyan Ivanov - ---- a/cowsay -+++ b/cowsay -@@ -12,6 +12,13 @@ use File::Basename; - use Getopt::Std; - use Cwd; - -+if (${^UTF8LOCALE}) { -+ binmode STDIN, ':utf8'; -+ binmode STDOUT, ':utf8'; -+ require Encode; -+ eval { $_ = Encode::decode_utf8($_,1) } for @ARGV; -+} -+ - $version = "3.03"; - $progname = basename($0); - $eyes = "oo"; diff --git a/cowsay-3.03-help.patch b/cowsay-3.03-help.patch deleted file mode 100644 index 1fc4b4a..0000000 --- a/cowsay-3.03-help.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -rup cowsay-3.03.orig/cowsay cowsay-3.03/cowsay ---- cowsay-3.03.orig/cowsay 2007-09-17 13:27:32.000000000 +0200 -+++ cowsay-3.03/cowsay 2007-09-17 13:28:04.000000000 +0200 -@@ -185,3 +185,7 @@ Usage: $progname [-bdgpstwy] [-h] [-e ey - [-l] [-n] [-T tongue] [-W wrapcolumn] [message] - EOF - } -+ -+sub main::HELP_MESSAGE { -+ display_usage; -+} diff --git a/cowsay.spec b/cowsay.spec index dd3515c..9ca542b 100644 --- a/cowsay.spec +++ b/cowsay.spec @@ -2,22 +2,15 @@ %global __requires_exclude .*Acme::Cow.* Name: cowsay -Version: 3.04 -Release: 17%{?dist} +Version: 3.7.0 +Release: 1%{?dist} Summary: Configurable speaking/thinking cow License: GPLv3+ -URL: https://github.com/tnalpgge/rank-amateur-cowsay -Source0: %{url}/archive/%{name}-%{version}.tar.gz +URL: https://github.com/cowsay-org/cowsay +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz Source1: cowsay.bashcomp Source2: animalsay -Patch0: cowsay-3.03-help.patch -Patch1: mech-and-cow.patch -# these are from https://packages.debian.org/sid/cowsay -Patch2: cowsay-3.03-debian-01-empty_messages_fix.patch -Patch3: cowsay-3.03-debian-02-remove_trailing_spaces.patch -Patch4: cowsay-3.03-debian-utf8_width.patch -# More cows: -Patch5: fox-cow.patch +Patch0: fox-cow.patch BuildArch: noarch BuildRequires: bash-completion @@ -32,35 +25,23 @@ It generates ASCII pictures of a cow with a message. It can also generate pictures of other animals. %prep -%setup -qn rank-amateur-cowsay-cowsay-%{version} -%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 +%setup -q -mv cows/mech-and-cow cows/mech-and-cow.cow -%patch1 -p1 - -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 - -%patch5 -p1 +%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},%{_sysconfdir}/bash_completion.d} +mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_datadir}/%{name}/cows,%{_sysconfdir}/bash_completion.d} cp -p %{name} $RPM_BUILD_ROOT%{_bindir} -cp -p cows/* $RPM_BUILD_ROOT%{_datadir}/%{name} +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}/daemon.cow +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 @@ -69,16 +50,19 @@ mkdir -p $RPM_BUILD_ROOT%{compdir}/ cp %{SOURCE1} $RPM_BUILD_ROOT%{compdir}/ %files -%doc ChangeLog LICENSE README +%doc ChangeLog LICENSE.txt README* %{_bindir}/* %{_mandir}/man1/cow* %{_datadir}/%{name} -%exclude %{_datadir}/cowsay/bong.cow -%exclude %{_datadir}/cowsay/sodomized.cow -%exclude %{_datadir}/cowsay/satanic.cow +%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 - 3.7.0-1 +- 3.7.0i, new upstream. + * Tue Jan 26 2021 Fedora Release Engineering - 3.04-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/fox-cow.patch b/fox-cow.patch index 5303eda..5ff22a0 100644 --- a/fox-cow.patch +++ b/fox-cow.patch @@ -2,7 +2,7 @@ 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/cows/fox.cow ++++ b/share/cows/fox.cow @@ -0,0 +1,18 @@ +$the_cow = <