rpms/cowsay/devel animalsay, NONE, 1.1 cowsay.bashcomp, NONE, 1.1 cowsay.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Michał Bentkowski (ecik) fedora-extras-commits at redhat.com
Tue Jan 2 19:05:58 UTC 2007


Author: ecik

Update of /cvs/extras/rpms/cowsay/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4466/devel

Modified Files:
	.cvsignore sources 
Added Files:
	animalsay cowsay.bashcomp cowsay.spec 
Log Message:
auto-import cowsay-3.03-2 on branch devel from cowsay-3.03-2.src.rpm


--- NEW FILE animalsay ---
#!/bin/sh

NUM=0
TOL=0
for cow in /usr/share/cowsay/*.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
    NUM=$((NUM+1))
    if [ $NUM = $SELECT ] ; then break ; fi
done

exec /usr/bin/cowsay -f $cow "$@"


--- NEW FILE cowsay.bashcomp ---
# 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 at 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 :


--- NEW FILE cowsay.spec ---
Name:           cowsay
Version:        3.03
Release:        2%{?dist}
Summary:        Configurable speaking/thinking cow
Group:          Amusements/Games
License:        Artistic or GPL
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
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
%{__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

%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
* 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


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/cowsay/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	2 Jan 2007 19:04:42 -0000	1.1
+++ .cvsignore	2 Jan 2007 19:05:28 -0000	1.2
@@ -0,0 +1 @@
+cowsay-3.03.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/cowsay/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	2 Jan 2007 19:04:42 -0000	1.1
+++ sources	2 Jan 2007 19:05:28 -0000	1.2
@@ -0,0 +1 @@
+b29169797359420dadb998079021a494  cowsay-3.03.tar.gz




More information about the scm-commits mailing list