Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-backports-src > by-pkgid > 7baf9f0c37e87036070a588da8b73769 > files > 2

php-gender-1.1.0-11.mga7.src.rpm

%define modname gender
%define soname %{modname}.so
%define inifile A89_%{modname}.ini

Summary:	Gender Extension
Name:		php-%{modname}
Version:	1.1.0
Release:	%mkrel 11
Group:		Development/PHP
License:	PHP License
URL:		http://pecl.php.net/package/gender/
Source0:	http://pecl.php.net/get/%{modname}-%{version}.tgz
Requires:	php-bz2
Requires(pre): rpm-helper
Requires(postun): rpm-helper
BuildRequires:	php-devel >= 3:7.4.0
BuildRequires:	file
Requires:	php >= 3:7.4.0
Requires:	php-common = 3:7.4

%description
Gender PHP extension is a port of the gender.c program originally written by
Joerg Michael. The main purpose is to find out the gender of first names. The
actual database contains >40000 first names from 54 countries.

%prep

%setup -q -n %{modname}-%{version}
[ "../package*.xml" != "/" ] && mv ../package*.xml .

bunzip2 data/nam_dict.txt.bz2

# 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 -p -i -e "s|/lib\b|/%{_lib}|g" *.m4

perl -pi -e "s|/home/user/|%{_datadir}/%{name}/|g" README

%build
%serverbuild

phpize
%configure2_5x --with-libdir=%{_lib} \
    --enable-%{modname}

%make_build

%install
install -d %{buildroot}%{_sysconfdir}/php.d
install -d %{buildroot}%{_libdir}/php/extensions
install -d %{buildroot}%{_datadir}/%{name}

install -m0755 modules/%{soname} %{buildroot}%{_libdir}/php/extensions/
install -m0644 data/nam_dict.txt %{buildroot}%{_datadir}/%{name}/
bzip2 -9 %{buildroot}%{_datadir}/%{name}/nam_dict.txt

cat > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF
extension = %{soname}

[%{modname}]
EOF

%files
%doc package*.xml CREDITS LICENSE README
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile}
%attr(0755,root,root) %{_libdir}/php/extensions/%{soname}
%dir %{_datadir}/%{name}
%attr(0644,root,root) %{_datadir}/%{name}/nam_dict.txt.bz2





%changelog
* Thu Jun 18 2020 mokraemer <mokraemer> 1.1.0-11.mga7
+ Revision: 1595925
- Fix dependency
- backport for php 7.4
- backport php 7.4

* Tue Feb 18 2020 umeabot <umeabot> 1.1.0-10.mga8
+ Revision: 1538974
- Mageia 8 Mass Rebuild
+ wally <wally>
- replace deprecated %%configure2_5x

* Fri Nov 29 2019 mokraemer <mokraemer> 1.1.0-9.mga8
+ Revision: 1463520
+ rebuild (emptylog)

* Wed Dec 12 2018 mokraemer <mokraemer> 1.1.0-7.mga7
+ Revision: 1340433
- rebuild

* Fri Oct 26 2018 mokraemer <mokraemer> 1.1.0-6.mga7
+ Revision: 1325839
- updated requirements

* Sun Sep 23 2018 umeabot <umeabot> 1.1.0-5.mga7
+ Revision: 1300219
- Mageia 7 Mass Rebuild

* Wed Apr 11 2018 pterjan <pterjan> 1.1.0-4.mga7
+ Revision: 1217355
- Rebuild for php 7.2, it was built with old php on arm

* Sun Dec 03 2017 mokraemer <mokraemer> 1.1.0-3.mga7
+ Revision: 1180967
+ rebuild (emptylog)

* Mon Nov 13 2017 zezinho <zezinho> 1.1.0-2.mga7
+ Revision: 1177236
- rebuild against php 7

* Thu Feb 25 2016 oden <oden> 1.1.0-1.mga6
+ Revision: 978991
- 1.1.0

* Fri Feb 12 2016 umeabot <umeabot> 1.0.0-7.mga6
+ Revision: 958361
- Mageia 6 Mass Rebuild

* Wed Oct 15 2014 umeabot <umeabot> 1.0.0-6.mga5
+ Revision: 750555
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 1.0.0-5.mga5
+ Revision: 687126
- Mageia 5 Mass Rebuild

* Fri Apr 18 2014 oden <oden> 1.0.0-4.mga5
+ Revision: 616550
- rebuilt for php-5.6.0beta1

* Fri Jan 24 2014 pterjan <pterjan> 1.0.0-3.mga4
+ Revision: 567608
- Rebuild for new PHP

* Sat Oct 19 2013 umeabot <umeabot> 1.0.0-2.mga4
+ Revision: 527891
- Mageia 4 Mass Rebuild

* Thu Jun 13 2013 oden <oden> 1.0.0-1.mga4
+ Revision: 442846
- 1.0.0

* Wed Jan 30 2013 oden <oden> 0.8.0-3.mga3
+ Revision: 393263
- rebuilt for php-5.4.11

* Sun Jan 13 2013 umeabot <umeabot> 0.8.0-2.mga3
+ Revision: 375771
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Wed Sep 12 2012 oden <oden> 0.8.0-1.mga3
+ Revision: 292901
- new version

* Mon Mar 19 2012 luigiwalser <luigiwalser> 0.7.0-12.mga2
+ Revision: 223895
- httpd restart is handled by filetriggers now

* Wed Dec 21 2011 spuhler <spuhler> 0.7.0-11.mga2
+ Revision: 185243
- rebuild against php-5.3.9

* Sun Feb 06 2011 spuhler <spuhler> 0.7.0-10.mga1
+ Revision: 47906
- removed buildroot definition from .spec
- imported package php-gender