diff options
| -rw-r--r-- | composer.json | 33 | ||||
| -rw-r--r-- | php-pecl-pdo-oci.spec | 93 |
2 files changed, 62 insertions, 64 deletions
diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..32859bb --- /dev/null +++ b/composer.json @@ -0,0 +1,33 @@ +{ + "name": "pecl/pdo_oci", + "type": "php-ext", + "description": "Use the PDO_OCI extension to access Oracle Database via PHP Data Objects (PDO) APIs", + "keywords": ["pdo_oci", "pdo", "oracle", "database"], + "homepage": "https://pecl.php.net/package/PDO_OCI", + "license": "PHP-3.01", + "authors": [ + { + "name": "Christopher Jones", + "email": "sixd@php.net", + "role": "Lead" + }, + { + "name": "Sharad Chandran R", + "email": "sharad.raju@oracle.com", + "role": "Lead" + } + ], + "require": { + "php": ">=8.3.0" + }, + "php-ext": { + "extension-name": "pdo_oci", + "configure-options": [ + { + "name": "with-pdo_oci", + "description": "Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client", + "needs-value": true + } + ] + } +} diff --git a/php-pecl-pdo-oci.spec b/php-pecl-pdo-oci.spec index b7661e9..b496e4e 100644 --- a/php-pecl-pdo-oci.spec +++ b/php-pecl-pdo-oci.spec @@ -11,13 +11,18 @@ %global pie_vend pecl %global pie_proj pdo_oci -%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name pdo_oci %global ini_name 40-%{pecl_name}.ini -%global sources %{pecl_name}-%{version} -%global _configure ../%{sources}/configure -%global oraclever 23.9 +# Github forge +%global gh_vend php +%global gh_proj pecl-database-pdo_oci +%global forgeurl https://github.com/%{gh_vend}/%{gh_proj} +%global tag v%{version} +# for EL-8 to avoid TAG usage +%global archivename %{gh_proj}-%{version} + +%global oraclever 23.26 %global oraclemax 24 %global oraclelib 23.1 %global oracledir 23 @@ -25,17 +30,16 @@ %global with_dtrace 1 -Summary: PDO driver for Oracle Database Name: %{?scl_prefix}php-pecl-pdo-oci -Version: 1.2.0 -Release: 1%{?dist} - +Summary: PDO driver for Oracle Database License: PHP-3.01 -URL: https://pecl.php.net/package/%{pecl_name} -Source0: https://pecl.php.net/get/%{sources}.tgz +Version: 1.2.0 +Release: 2%{?dist} +%forgemeta +URL: %{forgeurl} +Source0: %{forgesource} -BuildRequires: %{?scl_prefix}php-devel >= 8.3 -BuildRequires: %{?scl_prefix}php-pear +BuildRequires: %{?scl_prefix}php-devel >= 8.4 BuildRequires: %{?scl_prefix}php-pdo %if %{with_dtrace} BuildRequires: systemtap-sdt-devel @@ -79,20 +83,14 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep -%setup -qc -# don't install tests -sed -e 's/role="test"/role="src"/' \ - -e '/LICENSE/s/role="doc"/role="src"/' \ - -i package.xml +%forgesetup -cd %{sources} # Check reported version (phpinfo), as this is often broken extver=$(sed -n '/#define PHP_PDO_OCI_VERSION/{s/.* "//;s/".*$//;p}' php_pdo_oci.h) if test "x${extver}" != "x%{version}%{?versuffix}"; then : Error: Upstream version is ${extver}, expecting %{version}. exit 1 fi -cd .. # Drop in the bit of configuration cat > %{ini_name} << 'EOF' @@ -101,11 +99,6 @@ extension = %{pecl_name}.so EOF -mkdir NTS -%if %{with_zts} -mkdir ZTS -%endif - %build %{?dtsenable} @@ -120,41 +113,20 @@ peclconf() { --with-php-config=$1 } -cd %{sources} %{__phpize} +sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global -cd ../NTS peclconf %{__phpconfig} -make %{?_smp_mflags} - -%if %{with_zts} -cd ../ZTS -peclconf %{__ztsphpconfig} -make %{?_smp_mflags} -%endif +%make_build %install %{?dtsenable} # Install the NTS stuff -make -C NTS install INSTALL_ROOT=%{buildroot} +%make_install install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} -# Install XML package description -install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml - -# Install the ZTS stuff -%if %{with_zts} -make -C ZTS install INSTALL_ROOT=%{buildroot} -install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} -%endif - -# Documentation -for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i -done - %check : Minimal load test for NTS extension @@ -163,30 +135,23 @@ done --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep '^PDO_OCI$' -%if %{with_zts} -: Minimal load test for ZTS extension -%{__ztsphp} --no-php-ini \ - --define extension=pdo \ - --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep '^PDO_OCI$' -%endif - %files -%license %{sources}/LICENSE -%doc %{pecl_docdir}/%{pecl_name} -%{pecl_xmldir}/%{name}.xml +%license LICENSE +%doc CREDITS +%doc *.md + %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so -%if %{with_zts} -%{php_ztsextdir}/%{pecl_name}.so -%config(noreplace) %{php_ztsinidir}/%{ini_name} -%endif - %changelog +* Thu Mar 26 2026 Remi Collet <remi@remirepo.net> - 1.2.0-2 +- drop pear/pecl dependency +- sources from github +- cleanup ZTS stuff + * Wed Jan 7 2026 Remi Collet <remi@remirepo.net> - 1.2.0-1 - update to 1.2.0 - add pie virtual provides |
