2 # - add web access, but secure it to keep only needed files there
3 %define pkgname securimage
4 %define php_min_version 5.2.0
5 Summary: PHP CAPTCHA Script
10 Group: Development/Languages/PHP
11 Source0: https://www.phpcaptcha.org/latest.tar.gz?/%{pkgname}-%{version}.tar.gz
12 # Source0-md5: 5725a8ce1bb3c86e8ecedc7bc7e20a94
13 URL: https://www.phpcaptcha.org/
14 BuildRequires: /usr/bin/php
15 BuildRequires: rpm-php-pearprov >= 4.4.2-11
16 BuildRequires: rpmbuild(macros) >= 1.461
17 Requires: php(core) >= %{php_min_version}
20 Requires: php(mbstring)
22 Requires: php(session)
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define _appdir %{php_data_dir}/%{pkgname}
30 Securimage is an open-source free PHP CAPTCHA script for generating
31 complex images and CAPTCHA codes to protect forms from spam and abuse.
33 It can be easily added into existing forms on your website to provide
34 protection from spam bots. It can run on most any webserver as long as
35 you have PHP installed, and GD support within PHP. Securimage does
36 everything from generating the CAPTCHA images to validating the typed
37 code. Audible codes can be streamed to the browser with Flash for the
41 - Show an image in just 3 lines of code
42 - Validate submitted entries in less than 6 lines of code
43 - Customizable code length, character sets, and Unicode support
45 - Easily add background images
46 - Several security features such as image distortion, random lines,
48 - Flash button to stream audible codes in WAV format
49 - Ability to use a word list
50 - Case sensitive option for added security
51 - Display alphanumeric captchas, mathematical captchas, or a multi
53 - Highly customizable!
58 mv %{pkgname}/*.{txt,ttf} .
61 mv %{pkgname}/{*.html,*example*} examples
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT%{_appdir}
66 cp -a %{pkgname}/* $RPM_BUILD_ROOT%{_appdir}
67 install -d $RPM_BUILD_ROOT%{php_data_dir}
69 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
70 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
73 rm -rf $RPM_BUILD_ROOT
76 %defattr(644,root,root,755)
77 %doc README.txt README.FONT.txt LICENSE.txt
78 %{php_data_dir}/securimage
79 %{_examplesdir}/%{name}-%{version}