From 7fa7b3d9a55b9e769360d2a1bf2e03b9a14f2852 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 3 Sep 2015 08:50:03 +0200 Subject: php-pecl-mosquitto: 0.3.0 (beta) --- REFLECTION | 27 ++++++++++++++++++++++++--- php-pecl-mosquitto.spec | 48 +++++++++++++++++++++++++++++++++++++----------- 2 files changed, 61 insertions(+), 14 deletions(-) diff --git a/REFLECTION b/REFLECTION index 8ae220e..f099fdc 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #107 mosquitto version 0.2.2 ] { +Extension [ extension #126 mosquitto version 0.3.0 ] { - Constants [7] { Constant [ integer MOSQ_LOG_INFO ] { 1 } @@ -32,8 +32,13 @@ Extension [ extension #107 mosquitto version 0.2.2 ] { - Properties [0] { } - - Methods [24] { + - Methods [27] { Method [ public method __construct ] { + + - Parameters [2] { + Parameter #0 [ $id ] + Parameter #1 [ $cleanSession ] + } } Method [ public method onConnect ] { @@ -78,6 +83,13 @@ Extension [ extension #107 mosquitto version 0.2.2 ] { } } + Method [ public method onPublish ] { + + - Parameters [1] { + Parameter #0 [ callable $onConnect ] + } + } + Method [ public method getSocket ] { } @@ -111,6 +123,9 @@ Extension [ extension #107 mosquitto version 0.2.2 ] { } } + Method [ public method clearWill ] { + } + Method [ public method setReconnectDelay ] { - Parameters [3] { @@ -187,6 +202,9 @@ Extension [ extension #107 mosquitto version 0.2.2 ] { Parameter #1 [ $maxPackets ] } } + + Method [ public method exitLoop ] { + } } } @@ -208,7 +226,7 @@ Extension [ extension #107 mosquitto version 0.2.2 ] { Property [ protected $line ] } - - Methods [9] { + - Methods [10] { Method [ public method __construct ] { - Parameters [3] { @@ -218,6 +236,9 @@ Extension [ extension #107 mosquitto version 0.2.2 ] { } } + Method [ public method __wakeup ] { + } + Method [ final public method getMessage ] { } diff --git a/php-pecl-mosquitto.spec b/php-pecl-mosquitto.spec index fe5fc7b..c978e32 100644 --- a/php-pecl-mosquitto.spec +++ b/php-pecl-mosquitto.spec @@ -6,6 +6,14 @@ # # Please, preserve the changelog entries # +%if 0%{?scl:1} +%if "%{scl}" == "rh-php56" +%global sub_prefix more-php56- +%else +%global sub_prefix %{scl_prefix} +%endif +%endif + %{?scl: %scl_package php-pecl-mosquitto} %{!?php_incldir: %global php_incldir %{_includedir}/php} %{!?__pecl: %global __pecl %{_bindir}/pecl} @@ -21,21 +29,19 @@ %endif Summary: Extension for libmosquitto -Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 0.2.2 -Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1 +Name: %{?sub_prefix}php-pecl-%{pecl_name} +Version: 0.3.0 +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{proj_name} -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Source0: http://pecl.php.net/get/%{proj_name}-%{version}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{?scl_prefix}php-devel > 5.3 BuildRequires: %{?scl_prefix}php-pear BuildRequires: mosquitto-devel -Requires(post): %{__pecl} -Requires(postun): %{__pecl} Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} @@ -72,11 +78,16 @@ Obsoletes: php56w-pecl-%{pecl_name} Mosquitto provides support for the MQTT protocol, including publishing, subscribing, and an event loop. +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl})}. + %prep %setup -q -c mv %{proj_name}-%{version} NTS +# Don't install/register tests +sed -e 's/role="test"/role="src"/' -i package.xml + cd NTS # Sanity check, really often broken extver=$(sed -n '/#define PHP_MOSQUITTO_VERSION/{s/.* "//;s/".*$//;p}' php_mosquitto.h) @@ -136,16 +147,24 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} # Test & Documentation for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{proj_name}/$i done -%post -%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +# when pear installed alone, after us +%triggerin -- %{?scl_prefix}php-pear +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi +# posttrans as pear can be installed after us +%posttrans +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi %postun -if [ $1 -eq 0 ] ; then +if [ $1 -eq 0 -a -x %{__pecl} ] ; then %{pecl_uninstall} %{pecl_name} >/dev/null || : fi @@ -172,8 +191,10 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) -%doc %{pecl_docdir}/%{pecl_name} +%{?_licensedir:%license NTS/LICENSE} +%doc %{pecl_docdir}/%{proj_name} %{pecl_xmldir}/%{name}.xml + %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so @@ -184,6 +205,11 @@ rm -rf %{buildroot} %changelog +* Thu Sep 03 2015 Remi Collet - 0.3.0-1 +- Update to 0.3.0 (beta) +- drop runtime dependency on pear, new scriptlets +- cleanup + * Wed Dec 24 2014 Remi Collet - 0.2.2-2.1 - Fedora 21 SCL mass rebuild -- cgit