%global php_libname phpcaptcha Name: php-phpcaptcha Version: 2.0.1 Release: 0.1.beta%{?dist} License: LGPLv2+ Summary: Securimage captcha library for PHP Group: Development/Libraries URL: http://phpcaptcha.org/ # Real source url is: http://www.phpcaptcha.org/latest.tar.gz # sadly there doesn't appear to be any way to get historical releases. # I download and then to mv latest.tar.gz phpcaptcha-2.0.1.beta.tar.gz Source: %{php_libname}-%{version}.beta.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: php-common BuildRequires: dos2unix BuildArch: noarch %description Securimage is an open-source free PHP CAPTCHA script for generating complex images and CAPTCHA codes to protect forms from spam and abuse. It can be easily added into existing forms on your website to provide protection from spam bots. It can run on most any webserver as long as you have PHP installed, and GD support within PHP. Securimage does everything from generating the CAPTCHA images to validating the typed code. Audible codes can be streamed to the browser with Flash for the vision impaired. %prep %setup -c -q dos2unix securimage_show_example2.php dos2unix securimage_show_example.php rm -rf database/.htaccess %build %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_datadir}/php/%{php_libname} cp -a audio backgrounds database gdfonts images words %{buildroot}%{_datadir}/php/%{php_libname} cp -a securimage.php securimage_play.php securimage_play.swf securimage_show.php %{buildroot}%{_datadir}/php/%{php_libname} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc LICENSE.txt README.txt README.FONT.txt securimage_show_example2.php securimage_show_example.php %{_datadir}/php/%{php_libname} %changelog * Sun Feb 07 2010 David Nalley 2.0.1-0.1.beta - Initial Packaging