diff options
| -rw-r--r-- | LICENSE | 26 | ||||
| -rw-r--r-- | php-pear-Text-CAPTCHA.spec | 30 | ||||
| -rwxr-xr-x | strip.sh | 22 | 
3 files changed, 43 insertions, 35 deletions
diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 9cfbc8b..0000000 --- a/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) Christian Wenz <wenz@php.net> - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -* Neither the name of the <ORGANIZATION> nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/php-pear-Text-CAPTCHA.spec b/php-pear-Text-CAPTCHA.spec index 3efe976..f3e847e 100644 --- a/php-pear-Text-CAPTCHA.spec +++ b/php-pear-Text-CAPTCHA.spec @@ -1,15 +1,27 @@ +# spec file for php-pear-Text-CAPTCHA +# +# Copyright (c) 2013 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/3.0/ +# +# Please, preserve the changelog entries +#  %{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}  %global pear_name Text_CAPTCHA  Name:           php-pear-Text-CAPTCHA -Version:        0.4.6 +Version:        0.5.0  Release:        1%{?dist}  Summary:        Generation of CAPTCHAs  Group:          Development/Libraries  License:        BSD  URL:            http://pear.php.net/package/Text_CAPTCHA -Source0:        http://pear.php.net/get/%{pear_name}-%{version}.tgz +# remove tests which use non-free stuff (fonts) +# pear download Text_CAPTCHA-%{version} +# ./strip.sh %{version} +Source0:        %{pear_name}-%{version}-strip.tgz +Source1:        strip.sh  BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)  BuildArch:      noarch @@ -19,11 +31,11 @@ Requires(post): %{__pear}  Requires(postun): %{__pear}  Requires:       php-gd  Requires:       php-pear(PEAR) -Requires:       php-pear(Text_Password) +Requires:       php-pear(Text_Password) >= 1.1.1  # Optional  Requires:       php-pear(Numbers_Words)  Requires:       php-pear(Text_Figlet) -Requires:       php-pear(Image_Text) +Requires:       php-pear(Image_Text) >= 0.7.0  Provides:       php-pear(%{pear_name}) = %{version} @@ -36,11 +48,7 @@ computers and humans apart)  %setup -q -c  cd %{pear_name}-%{version} -# fix wrong-file-end-of-line-encoding -sed -e 's/\r//' -i examples/CAPTCHA_Word_test.php -# remove checksum for altered file -sed -e '/CAPTCHA_Word_test.php/s/md5sum.*name/name/' \ -    ../package.xml >%{name}.xml +mv ../package.xml %{name}.xml  %build @@ -85,6 +93,10 @@ fi  %changelog +* Wed Aug 07 2013 Remi Collet <remi@fedoraproject.org> - 0.5.0-1 +- Update to 0.5.0 +- strip sources from non-free stuff (fonts) +  * Mon Mar 18 2013 Remi Collet <remi@fedoraproject.org> - 0.4.6-1  - Version 0.4.6 (alpha) - API 0.4.0 (alpha) diff --git a/strip.sh b/strip.sh new file mode 100755 index 0000000..35126de --- /dev/null +++ b/strip.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +name=Text_CAPTCHA +list=$(mktemp) + +if [ -f $name-$1.tgz ] +then +	tar xif $name-$1.tgz +	tar tf $name-$1.tgz >$list.old + +	rm -r $name-$1/tests +	sed -e '/tests/d' -i package.xml + +	tar czf $name-$1-strip.tgz package.xml $name-$1 +	tar tf $name-$1-strip.tgz | grep -v '/$' >$list.new + +	diff $list.old $list.new +	rm -rf $name-$1 package.xml +else +	echo "usage $0 <version>" +fi +rm -f  $list*  | 
