summaryrefslogtreecommitdiffstats
path: root/php-zephir-parser.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-10-12 11:33:32 +0200
committerRemi Collet <remi@remirepo.net>2017-10-12 11:33:32 +0200
commiteda11ce9f13cd0582be607551a41e52c7b57c932 (patch)
tree1b2afb6a76bc632fdc73d641861aa85fa05783be /php-zephir-parser.spec
parentfb371cc729a625035332ba599de9406a0a317652 (diff)
v1.1.0
Diffstat (limited to 'php-zephir-parser.spec')
-rw-r--r--php-zephir-parser.spec41
1 files changed, 23 insertions, 18 deletions
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 <remi@remirepo.net> - 1.1.0-1
+- update to 1.1.0
+
* Wed Oct 11 2017 Remi Collet <remi@remirepo.net> - 1.0.3-1
- rename from zephir-parser to php-zephir-parser
- update to 1.0.3 (for zephir 0.10)