summaryrefslogtreecommitdiffstats
path: root/php-pecl-seaslog.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-seaslog.spec')
-rw-r--r--php-pecl-seaslog.spec112
1 files changed, 49 insertions, 63 deletions
diff --git a/php-pecl-seaslog.spec b/php-pecl-seaslog.spec
index 3435d78..84159c9 100644
--- a/php-pecl-seaslog.spec
+++ b/php-pecl-seaslog.spec
@@ -1,36 +1,38 @@
# remirepo spec file for php-pecl-seaslog
#
-# Copyright (c) 2015-2019 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2015-2024 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
-%scl_package php-pecl-seaslog
-%else
-%global _root_libdir %{_libdir}
-%endif
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global proj_name SeasLog
-%global pecl_name seaslog
-%global with_tests 0%{!?_without_tests:1}
+%{?scl:%scl_package php-pecl-seaslog}
+
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%global proj_name SeasLog
+%global pecl_name seaslog
+%global with_tests 0%{!?_without_tests:1}
%if "%{php_version}" < "5.6"
-%global ini_name %{pecl_name}.ini
+%global ini_name %{pecl_name}.ini
%else
-%global ini_name 40-%{pecl_name}.ini
+%global ini_name 40-%{pecl_name}.ini
%endif
+%global sources %{proj_name}-%{version}
+%global _configure ../%{sources}/configure
Summary: An effective, fast, stable log extension for PHP
-Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 2.1.0
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-License: PHP
+Name: %{?scl_prefix}php-pecl-%{pecl_name}
+Version: 2.2.0
+Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+License: PHP-3.0.1
URL: https://pecl.php.net/package/%{proj_name}
-Source0: https://pecl.php.net/get/%{proj_name}-%{version}.tgz
+Source0: https://pecl.php.net/get/%{sources}.tgz
+# upstream patch + https://github.com/SeasX/SeasLog/pull/322
+Patch0: %{pecl_name}-php81.patch
+
+BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
@@ -39,38 +41,11 @@ BuildRequires: %{?scl_prefix}php-json
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
Requires: %{?scl_prefix}php-json%{?_isa}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{proj_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{proj_name})%{?_isa} = %{version}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
-%endif
-
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
-
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter shared private
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
-%endif
%description
@@ -92,15 +67,14 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
-mv %{proj_name}-%{version} NTS
# Don't install tests
sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
-sed -e 's/ifndef ulong/if 0/' -i include/php7_wrapper.h
+cd %{sources}
+%patch -P0 -p1
: Sanity check, really often broken
extver=$(sed -n '/#define SEASLOG_VERSION /{s/.* "//;s/".*$//;p}' include/SeasLog.h)
@@ -110,9 +84,9 @@ if test "x${extver}" != "x%{version}"; then
fi
cd ..
+mkdir NTS
%if %{with_zts}
-# Duplicate source tree for NTS / ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
# Create configuration file
@@ -124,7 +98,7 @@ extension=%{pecl_name}.so
;seaslog.default_basepath = '/var/log/www'
;seaslog.default_logger = 'default'
;seaslog.default_datetime_format = 'Y-m-d H:i:s'
-;seaslog.default_template = '%T | %L | %P | %Q | %t | %M'
+;seaslog.default_template = '%%T | %%L | %%P | %%Q | %%t | %%M'
;seaslog.disting_folder = 1
;seaslog.disting_type = 0
;seaslog.disting_by_hour = 0
@@ -158,19 +132,20 @@ EOF
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
%configure \
--with-seaslog \
- --with-php-config=%{_bindir}/php-config
+ --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
--with-seaslog \
- --with-php-config=%{_bindir}/zts-php-config
+ --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -194,27 +169,25 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
# 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 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
%check
# No useful test in tests directory
-cd NTS
: Minimal load test for NTS extension
%{__php} --no-php-ini \
--define extension=json.so \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- --modules | grep -i %{pecl_name}
+ --modules | grep -i '^%{pecl_name}$'
%if %{with_zts}
-cd ../ZTS
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
--define extension=json.so \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep -i %{pecl_name}
+ --modules | grep -i '^%{pecl_name}$'
%endif
@@ -239,8 +212,8 @@ fi
%files
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
-%{?_licensedir:%license NTS/LICENSE}
%{pecl_xmldir}/%{name}.xml
%config(noreplace) %{php_inidir}/%{ini_name}
@@ -253,6 +226,19 @@ fi
%changelog
+* Mon Feb 19 2024 Remi Collet <remi@remirepo.net> - 2.2.0-3
+- fix for PHP 8.1 using patch from
+ https://github.com/SeasX/SeasLog/pull/322
+
+* Fri Sep 1 2023 Remi Collet <remi@remirepo.net> - 2.2.0-2
+- build out of sources tree
+
+* Tue Jan 19 2021 Remi Collet <remi@remirepo.net> - 2.2.0-1
+- update to 2.2.0
+
+* Wed Aug 19 2020 Remi Collet <remi@remirepo.net> - 2.1.0-2
+- F33 build
+
* Thu Jan 2 2020 Remi Collet <remi@remirepo.net> - 2.1.0-1
- update to 2.1.0
- open https://github.com/SeasX/SeasLog/issues/286