%define modname doublemetaphone %define soname %{modname}.so %define inifile A71_%{modname}.ini Summary: Provide Double Metaphone functionality Name: php-%{modname} Version: 1.0.0 Release: %mkrel 3 Group: Development/PHP License: PHP License URL: http://pecl.php.net/package/doublemetaphone Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz Requires(pre): rpm-helper Requires(postun): rpm-helper BuildRequires: php-devel >= 3:5.2.0 BuildRequires: file %description The Double Metaphone algorithm by Lawrence Philips allows a word to be broken down into its phonemes. %prep %setup -q -n %{modname}-%{version} [ "../package*.xml" != "/" ] && mv ../package*.xml . # fix permissions find . -type f | xargs chmod 644 # strip away annoying ^M find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//' find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//' # lib64 fix perl -pi -e "s|/lib\b|/%{_lib}|g" config.m4 %build %serverbuild phpize %configure2_5x --with-libdir=%{_lib} \ --with-%{modname}=shared,%{_prefix} %make %install rm -rf %{buildroot} install -d %{buildroot}%{_sysconfdir}/php.d install -d %{buildroot}%{_libdir}/php/extensions install -d %{buildroot}/var/log/httpd install -m0755 modules/%{soname} %{buildroot}%{_libdir}/php/extensions/ cat > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF extension = %{soname} EOF %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc package*.xml %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile} %attr(0755,root,root) %{_libdir}/php/extensions/%{soname} %changelog * Wed Jan 30 2013 oden <oden> 1.0.0-3.mga3 + Revision: 393258 - rebuilt for php-5.4.11 * Sun Jan 13 2013 umeabot <umeabot> 1.0.0-2.mga3 + Revision: 375734 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sun Jul 29 2012 spuhler <spuhler> 1.0.0-1.mga3 + Revision: 275629 - upgrade to 1.0.0 * Mon Mar 19 2012 luigiwalser <luigiwalser> 0.2.0-19.mga2 + Revision: 223879 - httpd restart is handled by filetriggers now * Wed Dec 21 2011 spuhler <spuhler> 0.2.0-18.mga2 + Revision: 185147 - rebuild against php-5.3.9 * Sun Feb 06 2011 spuhler <spuhler> 0.2.0-17.mga1 + Revision: 47811 - removed buildroot definition from .spec - imported package php-doublemetaphone