summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-snuffleupagus.spec23
1 files changed, 17 insertions, 6 deletions
diff --git a/php-snuffleupagus.spec b/php-snuffleupagus.spec
index 4810fd5..e8d4899 100644
--- a/php-snuffleupagus.spec
+++ b/php-snuffleupagus.spec
@@ -13,10 +13,11 @@
%global pkg_name %{name}
%endif
-%global gh_commit 543173ac37675472cb5a5520cdf72f09f8d3d5c4
+%global gh_commit bd02d0689190f526c99eee9b35c1335bd96a74af
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner nbs-system
%global gh_project snuffleupagus
+%global gh_date 20180117
%global pecl_name snuffleupagus
# ZTS is not supported, test suite fails
# https://github.com/nbs-system/snuffleupagus/issues/123
@@ -26,7 +27,11 @@
Summary: Security module for php7
Name: %{?sub_prefix}php-snuffleupagus
Version: 0.1.0
+%if %{?gh_date}
+Release: 3.%{gh_date}.%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+%else
Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+%endif
License: LGPLv3
Group: Development/Languages
URL: https://github.com/%{gh_owner}/%{gh_project}
@@ -34,7 +39,7 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: pcre-devel
-%if 0%{?rhel} == 6 || 0%{?rhel} == 7
+%if 0
BuildRequires: devtoolset-6-toolchain
%endif
@@ -79,13 +84,15 @@ mv src NTS
cd NTS
# needed because of sources relocation
-sed -e 's:src/::' -i tests/multi_config.phpt
+# https://github.com/nbs-system/snuffleupagus/pull/126
+sed -e 's:src/::' -i tests/multi_config.phpt tests/disabled_functions_register_tick_function.phpt
# Only RPM build flags
sed -e '/^CFLAGS/d' -i config.m4
# TODO not ok for now
# Sanity check, really often broken
+grep PHP_SNUFFLEUPAGUS_VERSION php_snuffleupagus.h
#extver=$(sed -n '/#define PHP_SNUFFLEUPAGUS_VERSION/{s/.* "//;s/".*$//;p}' php_snuffleupagus.h)
#if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then
# : Error: Upstream extension version is ${extver}, expecting %{version}%{?gh_date:-dev}.
@@ -109,7 +116,7 @@ EOF
%build
-%if 0%{?rhel} == 6 || 0%{?rhel} == 7
+%if 0
source /opt/rh/devtoolset-6/enable
%else
%{?dtsenable}
@@ -135,7 +142,7 @@ make %{?_smp_mflags}
%install
-%if 0%{?rhel} == 6 || 0%{?rhel} == 7
+%if 0
source /opt/rh/devtoolset-6/enable
%else
%{?dtsenable}
@@ -166,7 +173,7 @@ TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
-%{__php} -n run-tests.php --show-diff || : ignore
+%{__php} -n run-tests.php --show-diff
%if %{with_zts}
cd ../ZTS
@@ -199,6 +206,10 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Wed Jan 17 2018 Remi Collet <remi@remirepo.net> - 0.1.0-3.20180117.bd02d06
+- test build for gh#124
+- open https://github.com/nbs-system/snuffleupagus/pull/126
+
* Wed Jan 17 2018 Remi Collet <remi@remirepo.net> - 0.1.0-2
- clean build options, fix EL build