|
|
e341143 |
# Fedora spec file for php-pecl-gearman
|
|
|
e341143 |
#
|
|
|
e341143 |
# License: MIT
|
|
|
e341143 |
# http://opensource.org/licenses/MIT
|
|
|
e341143 |
#
|
|
|
e341143 |
# Please, preserve the changelog entries
|
|
|
e341143 |
#
|
|
|
e341143 |
|
|
|
e341143 |
%global gh_commit f7ec3cf044f654a3db4c415658941898a6e4d42f
|
|
|
e341143 |
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
|
|
|
e341143 |
%global gh_date 20160816
|
|
|
e341143 |
%global gh_owner wcgallego
|
|
|
e341143 |
%global gh_project pecl-gearman
|
|
|
e341143 |
%global with_tests 0%{?_with_tests:1}
|
|
|
e341143 |
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
|
|
|
e341143 |
%global pecl_name gearman
|
|
|
e341143 |
%global ini_name 40-%{pecl_name}.ini
|
|
Paul Whalen |
556809b |
|
|
Paul Whalen |
556809b |
Name: php-pecl-gearman
|
|
|
e341143 |
Version: 2.0.1
|
|
|
e341143 |
Release: 1%{?dist}
|
|
Paul Whalen |
556809b |
Summary: PHP wrapper to libgearman
|
|
Paul Whalen |
556809b |
|
|
Paul Whalen |
556809b |
Group: Development/Tools
|
|
Paul Whalen |
556809b |
License: PHP
|
|
|
e341143 |
URL: https://github.com/%{gh_owner}/%{gh_project}
|
|
|
e341143 |
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}%{?prever}-%{gh_short}.tar.gz
|
|
Paul Whalen |
556809b |
|
|
Remi Collet |
5bede66 |
BuildRequires: libgearman-devel > 1.1.0
|
|
|
e06d28f |
BuildRequires: php-devel
|
|
Paul Whalen |
556809b |
BuildRequires: php-pear
|
|
Paul Whalen |
556809b |
# Required by phpize
|
|
|
e06d28f |
BuildRequires: autoconf, automake, libtool
|
|
Paul Whalen |
556809b |
|
|
Paul Whalen |
556809b |
Requires: php(zend-abi) = %{php_zend_api}
|
|
Paul Whalen |
556809b |
Requires: php(api) = %{php_core_api}
|
|
Paul Whalen |
556809b |
|
|
|
f1484b2 |
Provides: php-%{pecl_name} = %{version}
|
|
|
f1484b2 |
Provides: php-%{pecl_name}%{?_isa} = %{version}
|
|
|
e06d28f |
Provides: php-pecl(%{pecl_name}) = %{version}
|
|
|
f1484b2 |
Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}
|
|
|
b54c07c |
|
|
Paul Whalen |
556809b |
|
|
Paul Whalen |
556809b |
%description
|
|
Paul Whalen |
556809b |
This extension uses libgearman library to provide API for
|
|
Paul Whalen |
556809b |
communicating with gearmand, and writing clients and workers
|
|
Paul Whalen |
556809b |
|
|
|
f1484b2 |
Documentation: http://php.net/gearman
|
|
|
f1484b2 |
|
|
|
f1484b2 |
|
|
Paul Whalen |
556809b |
%prep
|
|
|
b54c07c |
%setup -q -c
|
|
|
e341143 |
mv %{gh_project}-%{gh_commit} NTS
|
|
|
e341143 |
%{__php} -r '
|
|
|
e341143 |
$pkg = simplexml_load_file("NTS/package.xml");
|
|
|
e341143 |
$pkg->date = substr("%{gh_date}",0,4)."-".substr("%{gh_date}",4,2)."-".substr("%{gh_date}",6,2);
|
|
|
e341143 |
$pkg->version->release = "%{version}";
|
|
|
e341143 |
$pkg->asXML("package.xml");
|
|
|
e341143 |
'
|
|
|
b54c07c |
|
|
|
36876c6 |
# Fix lib directory
|
|
|
36876c6 |
# https://github.com/wcgallego/pecl-gearman/pull/39
|
|
|
36876c6 |
sed -e '/GEARMAN_LIB_DIR/s/lib/$PHP_LIBDIR/' -i NTS/config.m4
|
|
|
36876c6 |
|
|
|
f1484b2 |
# Dont register tests on install
|
|
|
e341143 |
sed -e 's/role="test"/role="src"/' \
|
|
|
e341143 |
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
|
|
|
e341143 |
-i package.xml
|
|
|
f1484b2 |
|
|
|
b54c07c |
# Upstream often forget to change this
|
|
|
f1484b2 |
extver=$(sed -n '/#define PHP_GEARMAN_VERSION/{s/.* "//;s/".*$//;p}' NTS/php_gearman.h)
|
|
|
b54c07c |
if test "x${extver}" != "x%{version}"; then
|
|
|
b54c07c |
: Error: Upstream version is ${extver}, expecting %{version}.
|
|
|
b54c07c |
exit 1
|
|
|
b54c07c |
fi
|
|
|
b54c07c |
|
|
|
98dbc64 |
cat >%{ini_name} <
|
|
|
b54c07c |
; enable %{pecl_name} extension
|
|
|
b54c07c |
extension=%{pecl_name}.so
|
|
|
b54c07c |
EOF
|
|
|
b54c07c |
|
|
|
f1484b2 |
%if %{with_zts}
|
|
|
f1484b2 |
cp -pr NTS ZTS
|
|
|
f1484b2 |
%endif
|
|
|
f1484b2 |
|
|
Paul Whalen |
556809b |
|
|
Paul Whalen |
556809b |
%build
|
|
|
f1484b2 |
cd NTS
|
|
|
f1484b2 |
%{_bindir}/phpize
|
|
|
36876c6 |
%configure --with-libdir=%{_lib} --with-php-config=%{_bindir}/php-config
|
|
|
f1484b2 |
make %{?_smp_mflags}
|
|
|
f1484b2 |
|
|
|
f1484b2 |
%if %{with_zts}
|
|
|
f1484b2 |
cd ../ZTS
|
|
|
f1484b2 |
%{_bindir}/zts-phpize
|
|
|
36876c6 |
%configure --with-libdir=%{_lib} --with-php-config=%{_bindir}/zts-php-config
|
|
Paul Whalen |
556809b |
make %{?_smp_mflags}
|
|
|
f1484b2 |
%endif
|
|
Paul Whalen |
556809b |
|
|
Paul Whalen |
556809b |
|
|
Paul Whalen |
556809b |
%install
|
|
|
f1484b2 |
make -C NTS install INSTALL_ROOT=%{buildroot}
|
|
|
b54c07c |
|
|
Paul Whalen |
556809b |
# Install XML package description
|
|
|
b54c07c |
install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
|
|
|
b54c07c |
|
|
|
b54c07c |
# install config file
|
|
|
98dbc64 |
install -Dpm644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
|
|
Paul Whalen |
556809b |
|
|
|
f1484b2 |
%if %{with_zts}
|
|
|
f1484b2 |
make -C ZTS install INSTALL_ROOT=%{buildroot}
|
|
|
f1484b2 |
install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
|
|
|
f1484b2 |
%endif
|
|
|
f1484b2 |
|
|
|
f1484b2 |
# Documentation
|
|
|
f1484b2 |
for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
|
|
|
f1484b2 |
do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
|
|
|
f1484b2 |
done
|
|
|
f1484b2 |
|
|
Paul Whalen |
556809b |
|
|
|
b54c07c |
%check
|
|
|
f1484b2 |
: Minimal load test for NTS extension
|
|
|
f1484b2 |
%{__php} --no-php-ini \
|
|
|
f1484b2 |
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
|
|
|
f1484b2 |
--modules | grep %{pecl_name}
|
|
|
b54c07c |
|
|
|
f1484b2 |
%if %{with_zts}
|
|
|
f1484b2 |
: Minimal load test for ZTS extension
|
|
|
f1484b2 |
%{__ztsphp} --no-php-ini \
|
|
|
f1484b2 |
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
|
|
|
b54c07c |
--modules | grep %{pecl_name}
|
|
|
f1484b2 |
%endif
|
|
|
b54c07c |
|
|
Paul Whalen |
556809b |
|
|
Paul Whalen |
556809b |
%files
|
|
|
e341143 |
%license NTS/LICENSE
|
|
|
f1484b2 |
%doc %{pecl_docdir}/%{pecl_name}
|
|
Paul Whalen |
556809b |
%{pecl_xmldir}/%{name}.xml
|
|
Paul Whalen |
556809b |
|
|
|
f1484b2 |
%config(noreplace) %{php_inidir}/%{ini_name}
|
|
|
f1484b2 |
%{php_extdir}/%{pecl_name}.so
|
|
|
f1484b2 |
|
|
|
f1484b2 |
%if %{with_zts}
|
|
|
f1484b2 |
%{php_ztsextdir}/%{pecl_name}.so
|
|
|
f1484b2 |
%config(noreplace) %{php_ztsinidir}/%{ini_name}
|
|
|
f1484b2 |
%endif
|
|
Paul Whalen |
556809b |
|
|
Paul Whalen |
556809b |
|
|
Paul Whalen |
556809b |
%changelog
|
|
|
e341143 |
* Tue Sep 20 2016 Remi Collet <remi@fedoraproject.org> - 2.0.1
|
|
|
e341143 |
- update to 2.0.1 for PHP 7
|
|
|
e341143 |
- use sources from https://github.com/wcgallego/pecl-gearman fork
|
|
|
e341143 |
- spec cleanup
|
|
|
e341143 |
|
|
Remi Collet |
9f026a8 |
* Wed Feb 10 2016 Remi Collet <remi@fedoraproject.org> - 1.1.2-4
|
|
Remi Collet |
9f026a8 |
- F24: drop scriptlets (replaced by file triggers in php-pear)
|
|
Remi Collet |
9f026a8 |
|
|
|
01862a5 |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-3
|
|
|
01862a5 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
01862a5 |
|
|
|
72fa151 |
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2-2
|
|
|
72fa151 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
72fa151 |
|
|
|
f1484b2 |
* Tue Sep 9 2014 Remi Collet <remi@fedoraproject.org> - 1.1.2-1
|
|
|
f1484b2 |
- update to 1.1.2
|
|
|
f1484b2 |
- cleanup and modernize the spec file
|
|
|
f1484b2 |
- build ZTS extension
|
|
|
f1484b2 |
- install doc in pecl_docdir
|
|
|
f1484b2 |
|
|
|
ed9cccd |
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-5
|
|
|
ed9cccd |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
|
|
ed9cccd |
|
|
|
98dbc64 |
* Thu Jun 19 2014 Remi Collet <rcollet@redhat.com> - 1.1.1-4
|
|
|
98dbc64 |
- rebuild for https://fedoraproject.org/wiki/Changes/Php56
|
|
|
98dbc64 |
- add numerical prefix to extension configuration file
|
|
|
98dbc64 |
|
|
|
add3831 |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-3
|
|
|
add3831 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
add3831 |
|
|
|
b533867 |
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-2
|
|
|
b533867 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
b533867 |
|
|
Remi Collet |
5bede66 |
* Fri Mar 22 2013 Remi Collet <rcollet@redhat.com> - 1.1.1-1
|
|
Remi Collet |
5bede66 |
- update to 1.1.1
|
|
Remi Collet |
5bede66 |
- rebuild for http://fedoraproject.org/wiki/Features/Php55
|
|
Remi Collet |
5bede66 |
|
|
|
c9be081 |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-2
|
|
|
c9be081 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
c9be081 |
|
|
|
aa3f140 |
* Fri Nov 30 2012 Tom Callaway <spot@fedoraproject.org> - 1.1.0-1
|
|
|
aa3f140 |
- update to 1.1.0
|
|
|
aa3f140 |
|
|
|
e06d28f |
* Sat Aug 04 2012 Remi Collet <remi@fedoraproject.org> - 1.0.2-1
|
|
|
e06d28f |
- update to 1.0.2
|
|
|
e06d28f |
- add BR on libgearman-1.0, workaround for https://bugzilla.redhat.com/819209
|
|
|
e06d28f |
- add missing provides php-pecl(gearman)
|
|
|
e06d28f |
|
|
|
3b63bb1 |
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2
|
|
|
3b63bb1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
3b63bb1 |
|
|
|
b54c07c |
* Thu Jan 19 2012 Remi Collet <remi@fedoraproject.org> - 1.0.1-1
|
|
|
b54c07c |
- update to 1.0.1 for php 5.4
|
|
|
b54c07c |
- add %%check for php extension
|
|
|
b54c07c |
- add filter to fix private-shared-object-provides
|
|
|
b54c07c |
- use %%setup -c because package.xml is outside the tree
|
|
|
b54c07c |
|
|
|
ccf5a7e |
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-6
|
|
|
ccf5a7e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
ccf5a7e |
|
|
Jesse Keating |
aec6071 |
* Fri Aug 12 2011 Jesse Keating <jkeating@redhat.com> - 0.7.0-5
|
|
Jesse Keating |
aec6071 |
- Rebuild for broken deps
|
|
Jesse Keating |
aec6071 |
|
|
Paul Whalen |
556809b |
* Mon Apr 11 2011 Paul Whalen <paul.whalen@senecac.on.ca> 0.7.0-4
|
|
Paul Whalen |
556809b |
- fix setup and package.xml install
|
|
Paul Whalen |
556809b |
|
|
Paul Whalen |
556809b |
* Mon Apr 11 2011 Paul Whalen <paul.whalen@senecac.on.ca> 0.7.0-3
|
|
Paul Whalen |
556809b |
- correct macros, add license to files
|
|
Paul Whalen |
556809b |
|
|
Paul Whalen |
556809b |
* Fri Apr 08 2011 Paul Whalen <paul.whalen@senecac.on.ca> 0.7.0-2
|
|
Paul Whalen |
556809b |
- correct package following pecl packaging guidelines
|
|
Paul Whalen |
556809b |
|
|
Paul Whalen |
556809b |
* Fri Mar 11 2011 Paul Whalen <paul.whalen@senecac.on.ca> 0.7.0-1
|
|
Paul Whalen |
556809b |
- Initial Packaging
|
|
Paul Whalen |
556809b |
|