summaryrefslogtreecommitdiffstats
path: root/php-smbclient.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-01-29 11:36:34 +0100
committerRemi Collet <remi@php.net>2024-01-29 11:36:34 +0100
commit5c8a2a642ff350de5c9daf0d53c2d433ef0674da (patch)
tree6950ed9323baffe170c7088aa8a99554c77a4333 /php-smbclient.spec
parent35a6a99493061daca0152cd9346fa05384184307 (diff)
fix incompatible pointer types using upstream patchHEADmaster
build out of sources tree
Diffstat (limited to 'php-smbclient.spec')
-rw-r--r--php-smbclient.spec56
1 files changed, 26 insertions, 30 deletions
diff --git a/php-smbclient.spec b/php-smbclient.spec
index 87495d3..5289cef 100644
--- a/php-smbclient.spec
+++ b/php-smbclient.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-smbclient
#
-# Copyright (c) 2015-2023 Remi Collet
+# Copyright (c) 2015-2024 Remi Collet
# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -20,7 +20,6 @@
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner eduardok
%global gh_project libsmbclient-php
-#global gh_date 20161104
#global prever RC1
%global pecl_name smbclient
@@ -32,29 +31,25 @@
%endif
# Test suite requires a Samba server and configuration file
%bcond_with tests
+%global sources %{pecl_name}-%{version}%{?prever}
+%global _configure ../%{sources}/configure
Name: %{?scl_prefix}php-smbclient
Version: 1.1.1
-%if 0%{?gh_date}
-Release: 0.10.%{gh_date}git%{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
+Release: 6%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Summary: PHP wrapper for libsmbclient
License: BSD-2-Clause
URL: https://github.com/eduardok/libsmbclient-php
-%if 0%{?gh_date}
-Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
-%else
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
-%endif
+Source0: https://pecl.php.net/get/%{sources}.tgz
%if %{with tests}
Source2: %{pecl_name}-phpunit.xml
%endif
+Patch0: %{pecl_name}-upstream.patch
+
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
@@ -104,23 +99,19 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
-%if 0%{?gh_date}
-mv %{gh_project}-%{gh_commit} NTS
-mv NTS/package.xml .
-%else
-mv %{pecl_name}-%{version}%{?prever} NTS
-%endif
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
+cd %{sources}
+%patch -P0 -p1 -b .up
+
# Check extension version
ver=$(sed -n '/define PHP_SMBCLIENT_VERSION/{s/.* "//;s/".*$//;p}' php_smbclient.h)
-if test "$ver" != "%{version}%{?prever}%{?gh_date:-dev}"; then
- : Error: Upstream VERSION version is ${ver}, expecting %{version}%{?prever}%{?gh_date:-dev}.
+if test "$ver" != "%{version}%{?prever}"; then
+ : Error: Upstream VERSION version is ${ver}, expecting %{version}%{?prever}.
exit 1
fi
cd ..
@@ -131,24 +122,25 @@ extension=%{pecl_name}.so
EOF
+mkdir NTS
%if %{with_zts}
-# Duplicate source tree for NTS / ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
-%configure --with-php-config=%{_bindir}/php-config
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
+%configure --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
-%configure --with-php-config=%{_bindir}/zts-php-config
+%configure --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -171,7 +163,7 @@ install -Dpm 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
@@ -220,7 +212,7 @@ fi
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -234,6 +226,10 @@ fi
%changelog
+* Mon Jan 29 2024 Remi Collet <remi@remirepo.net> - 1.1.1-6
+- fix incompatible pointer types using upstream patch
+- build out of sources tree
+
* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 1.1.1-2
- rebuild for PHP 8.3.0RC1