From eda11ce9f13cd0582be607551a41e52c7b57c932 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 12 Oct 2017 11:33:32 +0200 Subject: v1.1.0 --- php-zephir-parser.spec | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'php-zephir-parser.spec') diff --git a/php-zephir-parser.spec b/php-zephir-parser.spec index 1f919f3..3bd4402 100644 --- a/php-zephir-parser.spec +++ b/php-zephir-parser.spec @@ -19,7 +19,7 @@ %endif %endif -%global gh_commit 475ce655ff418856c2ca836e10995907dbbc9b73 +%global gh_commit 0d16308092c2ff663dfc73e44a654e64d66362be %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20161126 %global gh_owner phalcon @@ -27,7 +27,7 @@ %global ext_name zephir_parser Name: %{?scl_prefix}%{gh_project} -Version: 1.0.3 +Version: 1.1.0 Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Summary: Zephir parser extension @@ -36,15 +36,11 @@ License: MIT URL: https://getcomposer.org/ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz +# honours RPM build flags and drop configure/make/install part +Patch0: %{gh_project}-build.patch + BuildRequires: %{?scl_prefix}php-devel > 5.5 BuildRequires: re2c -%if %{with_tests} -# From composer.json, "require" -# "phpunit/phpunit": "^4.8" -BuildRequires: php-composer(phpunit/phpunit) >= 4.8 -# For test autoloader -BuildRequires: php-composer(theseer/autoload) -%endif Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} @@ -61,12 +57,11 @@ The Zephir Parser delivered as a C extension for the PHP language. %prep %setup -q -n %{gh_project}-%{gh_commit} - -# drop install and cleanup stuff -sed -e '/-s install/,$d' -i install +%patch0 -p1 -b .rpm +grep CFLAGS install && exit 1 # Sanity check, really often broken -extver=$(sed -n '/#define PHP_ZEPHIR_PARSER_VERSION/{s/.* "//;s/".*$//;p}' php_zephir_parser.h) +extver=$(sed -n '/#define PHP_ZEPHIR_PARSER_VERSION/{s/.* "//;s/".*$//;p}' zephir_parser.h) if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then : Error: Upstream extension version is ${extver}, expecting %{version}%{?gh_date:-dev}. exit 1 @@ -75,8 +70,15 @@ fi %build %{?dtsenable} + %{?scl:scl enable %{scl}} ./install +%configure \ + --with-php-config=%{_bindir}/php-config \ + --enable-zephir_parser + +make %{?_smp_mflags} + %install %{?dtsenable} @@ -88,12 +90,12 @@ make install INSTALL_ROOT=%{buildroot} %{_bindir}/php -n -d extension=modules/%{ext_name}.so -m | grep "Zephir Parser" %if %{with_tests} -mkdir vendor -%{_bindir}/phpab --output vendor/autoload.php unit-tests - : Run test suite -%{_bindir}/php -d extension=modules/%{ext_name}.so %{_bindir}/phpunit \ - --verbose unit-tests +TEST_PHP_EXECUTABLE=%{__php} \ +TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{ext_name}.so" \ +NO_INTERACTION=1 \ +REPORT_EXIT_STATUS=1 \ +%{__php} -n run-tests.php --show-diff %else : Test suite disabled %endif @@ -108,6 +110,9 @@ mkdir vendor %changelog +* Thu Oct 12 2017 Remi Collet - 1.1.0-1 +- update to 1.1.0 + * Wed Oct 11 2017 Remi Collet - 1.0.3-1 - rename from zephir-parser to php-zephir-parser - update to 1.0.3 (for zephir 0.10) -- cgit