diff options
Diffstat (limited to 'php-snuffleupagus.spec')
-rw-r--r-- | php-snuffleupagus.spec | 51 |
1 files changed, 22 insertions, 29 deletions
diff --git a/php-snuffleupagus.spec b/php-snuffleupagus.spec index e8d4899..2cd5b59 100644 --- a/php-snuffleupagus.spec +++ b/php-snuffleupagus.spec @@ -13,11 +13,11 @@ %global pkg_name %{name} %endif -%global gh_commit bd02d0689190f526c99eee9b35c1335bd96a74af +%global gh_commit 0b36d6ab1d91cdfca0ddc686a8b2ed930505210d %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner nbs-system %global gh_project snuffleupagus -%global gh_date 20180117 +#global gh_date 20180117 %global pecl_name snuffleupagus # ZTS is not supported, test suite fails # https://github.com/nbs-system/snuffleupagus/issues/123 @@ -26,11 +26,11 @@ Summary: Security module for php7 Name: %{?sub_prefix}php-snuffleupagus -Version: 0.1.0 -%if %{?gh_date} +Version: 0.2.0 +%if 0%{?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;')}} +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} %endif License: LGPLv3 Group: Development/Languages @@ -39,9 +39,6 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit} BuildRequires: %{?scl_prefix}php-devel BuildRequires: pcre-devel -%if 0 -BuildRequires: devtoolset-6-toolchain -%endif Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} @@ -80,13 +77,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -n %{gh_project}-%{gh_commit} -mv src NTS - -cd NTS -# needed because of sources relocation -# https://github.com/nbs-system/snuffleupagus/pull/126 -sed -e 's:src/::' -i tests/multi_config.phpt tests/disabled_functions_register_tick_function.phpt - +cd src # Only RPM build flags sed -e '/^CFLAGS/d' -i config.m4 @@ -102,7 +93,7 @@ cd .. %if %{with_zts} # duplicate for ZTS build -cp -pr NTS ZTS +cp -pr src ZTS %endif # Drop in the bit of configuration @@ -110,19 +101,19 @@ cat << 'EOF' | tee %{ini_name} ; Enable '%{pecl_name}' extension module extension = %{pecl_name}.so -; Configuration -;sp.configuration_file = '' +; Path to rules configuration files, glob or comma separated list +sp.configuration_file = '%{php_inidir}/%{pecl_name}-*.rules' +EOF + +cat << 'EOF' | tee %{pecl_name}-default.rules +# Default rules see https://snuffleupagus.readthedocs.io/config.html EOF %build -%if 0 -source /opt/rh/devtoolset-6/enable -%else %{?dtsenable} -%endif -cd NTS +cd src %{_bindir}/phpize %configure \ --with-php-config=%{_bindir}/php-config \ @@ -142,16 +133,13 @@ make %{?_smp_mflags} %install -%if 0 -source /opt/rh/devtoolset-6/enable -%else %{?dtsenable} -%endif # Install the NTS stuff -make -C NTS install INSTALL_ROOT=%{buildroot} +make -C src install INSTALL_ROOT=%{buildroot} install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} +install -D -m 644 %{pecl_name}-default.rules %{buildroot}%{php_inidir}/%{pecl_name}-default.rules %if %{with_zts} # Install the ZTS stuff @@ -162,7 +150,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %check -cd NTS +cd src : Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ @@ -197,6 +185,7 @@ REPORT_EXIT_STATUS=1 \ %doc *.md %config(noreplace) %{php_inidir}/%{ini_name} +%config(noreplace) %{php_inidir}/%{pecl_name}-default.rules %{php_extdir}/%{pecl_name}.so %if %{with_zts} @@ -206,6 +195,10 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Thu Jan 18 2018 Remi Collet <remi@remirepo.net> - 0.2.0-1 +- update to 0.2.0 +- open https://github.com/nbs-system/snuffleupagus/pull/128 - src in path + * 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 |