5df61e3
#	The original source of this package contains a font with a forbidden
5df61e3
#		license.
Patrick Monnerat 519628a
#	The attached source tarball does not contain this font and has been
5df61e3
#		produced from the original by executing the following commands:
5df61e3
#
Patrick Monnerat 519628a
#	wget http://web135.srv3.sysproserver.de/milki.erphesfurt.de./captcha/captcha-%{version}.tgz
5df61e3
#	tar xzf captcha-%{version}.tgz
5df61e3
#	rm -f captcha-%{version}/MyUnderwood.*
5df61e3
#	tar czf captcha-%{version}.nofont.tar.gz captcha-%{version}
5df61e3
#
5df61e3
#	SHA1 sums:
Patrick Monnerat 519628a
#	facfe0f57adddd4e278852abd5499177f03a0c1f captcha-2.3.tgz
Patrick Monnerat 519628a
#	5387d2972766d5109cb4ae8572350a2229a89705 captcha-2.3.nofont.tar.gz
5df61e3
5df61e3
%global fontdir		%{_datadir}/fonts/dejavu
5df61e3
5df61e3
Name:		php-captchaphp
5df61e3
Summary:	PHP very user-friendly CAPTCHA solution
Patrick Monnerat 519628a
Version:	2.3
d74bca1
Release:	9%{?dist}
5df61e3
5df61e3
#	Public Domain or any FOSS License, see README
5df61e3
#	We're choosing MIT because it is universally compatible with other FOSS 
5df61e3
#		licenses.
5df61e3
License:	Public Domain or MIT
5df61e3
5df61e3
Group:		System Environment/Libraries
5df61e3
URL:		http://freshmeat.net/projects/captchaphp/
5df61e3
Source0:	captcha-%{version}.nofont.tar.gz
Patrick Monnerat 519628a
Patch1:		captcha-2.3-24pre.patch
5df61e3
Requires:	php-gd >= 4.3.2
5df61e3
Requires:	%{fontdir}
5df61e3
Buildarch:	noarch
5df61e3
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
5df61e3
5df61e3
%description
5df61e3
  This PHP script provides a very user-friendly CAPTCHA solution.
5df61e3
You can easily embed it into your <form> generation scripts to
5df61e3
prevent spam-bot access.
5df61e3
5df61e3
It strives to be accessible and implements an arithmetic riddle
5df61e3
as alternative for visually impaired users. It does not require
5df61e3
cookies, but makes use of "AJAX" to give users visual feedback
5df61e3
for solving the CAPTCHA. It grants access fuzzily (when single
5df61e3
letters were outguessed) instead of frustrating people. And it
5df61e3
can be customized rather easily.
5df61e3
5df61e3
5df61e3
#-------------------------------------------------------------------------------
5df61e3
%prep
5df61e3
#-------------------------------------------------------------------------------
5df61e3
5df61e3
%setup -q -n captcha-%{version}
5df61e3
%patch1 -p 1
5df61e3
5df61e3
5df61e3
#-------------------------------------------------------------------------------
5df61e3
%build
5df61e3
#-------------------------------------------------------------------------------
5df61e3
5df61e3
#	Replace the font path by our (arbitrary) default font directory.
5df61e3
5df61e3
sed -i -e "/CAPTCHA_FONT_DIR/s#,.*#, '%{fontdir}/');#" captcha.php
5df61e3
5df61e3
5df61e3
#-------------------------------------------------------------------------------
5df61e3
%install
5df61e3
#-------------------------------------------------------------------------------
5df61e3
5df61e3
rm -rf "${RPM_BUILD_ROOT}"
5df61e3
5df61e3
#	Install directory.
5df61e3
5df61e3
install -p -d -m 755 "${RPM_BUILD_ROOT}/%{_datadir}/php/captchaphp/"
5df61e3
5df61e3
5df61e3
#	Install file.
5df61e3
5df61e3
install -p -m 644 captcha.php "${RPM_BUILD_ROOT}/%{_datadir}/php/captchaphp/"
5df61e3
5df61e3
5df61e3
#-------------------------------------------------------------------------------
5df61e3
%clean
5df61e3
#-------------------------------------------------------------------------------
5df61e3
5df61e3
rm -rf "${RPM_BUILD_ROOT}"
5df61e3
5df61e3
5df61e3
#-------------------------------------------------------------------------------
5df61e3
%files
5df61e3
#-------------------------------------------------------------------------------
5df61e3
5df61e3
%defattr(-, root, root, -)
5df61e3
%doc README index.php
5df61e3
%{_datadir}/php/captchaphp
5df61e3
5df61e3
5df61e3
#-------------------------------------------------------------------------------
5df61e3
%changelog
d74bca1
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3-9
d74bca1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d74bca1
989a76c
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.3-8
989a76c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
989a76c
1af3ece
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-7
1af3ece
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
1af3ece
ab2792f
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-6
ab2792f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ab2792f
ca1e66b
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-5
ca1e66b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
ca1e66b
add1e46
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-4
add1e46
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
add1e46
cd53738
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-3
cd53738
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
cd53738
a91f08a
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-2
a91f08a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
a91f08a
5df61e3
#-------------------------------------------------------------------------------
5df61e3
Patrick Monnerat 519628a
* Tue May  3 2011 Patrick Monnerat <pm@datasphere.ch> 2.3-1
Patrick Monnerat 519628a
- New upstream release.
Patrick Monnerat 519628a
- Patch "24pre" to apply pre 2.4 updates.
Patrick Monnerat 519628a
5df61e3
* Mon Jun 14 2010 Patrick Monnerat <pm@datasphere.ch> 2.2-2
5df61e3
- Using MIT license.
5df61e3
5df61e3
* Tue May 25 2010 Patrick Monnerat <pm@datasphere.ch> 2.2-1
5df61e3
- New upstream release.
5df61e3
5df61e3
* Mon Jul 13 2009 Patrick Monnerat <pm@datasphere.ch> 2.0-3
5df61e3
- Depends on font directory rather than font package: this circumvents the
5df61e3
  font package name change done between F10 and F11.
5df61e3
5df61e3
* Tue Jun 23 2009 Patrick Monnerat <pm@datasphere.ch> 2.0-2
5df61e3
- Move class files to a package-specific sub-directory.
5df61e3
- Get rid of build dependence on "ed".
5df61e3
5df61e3
* Mon Jun  8 2009 Patrick Monnerat <pm@datasphere.ch> 2.0-1
5df61e3
- Initial RPM spec file.
5df61e3
- Patch "nodeferror" to allow predefining CAPTCHA_* constants without
5df61e3
  issuing an error at include time.
5df61e3
- Patch "https" to detect SSL use automatically.
5df61e3
- Patch "undef" to fix an undefined index error.
5df61e3
- Patch "directcall" to improve direct call detection.
5df61e3
- Patch "translatable" to make module translatable through the use of
5df61e3
  additional CAPTCHA_* defines for texts.
5df61e3
- Font included in original package has an incompatible license: thus it
5df61e3
  is not packaged. Instead, we use a reasonable default ttf font package and
5df61e3
  directory.