diff options
author | Remi Collet <remi@remirepo.net> | 2025-08-29 16:34:41 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2025-08-29 16:34:41 +0200 |
commit | a1ab71cdeb8893159dae89e600641c0525208297 (patch) | |
tree | 4442787a08fe12dbce134eeb58abe96f1b32ec23 /php-pecl-dbus.spec | |
parent | 580753fa9993e479740a574af5619552b62c0011 (diff) |
update to 0.4.1
re-license spec file to CECILL-2.1
move from pecl to pie packaging
Diffstat (limited to 'php-pecl-dbus.spec')
-rw-r--r-- | php-pecl-dbus.spec | 225 |
1 files changed, 63 insertions, 162 deletions
diff --git a/php-pecl-dbus.spec b/php-pecl-dbus.spec index ccd9ef4..ac1e825 100644 --- a/php-pecl-dbus.spec +++ b/php-pecl-dbus.spec @@ -1,80 +1,54 @@ -# spec file for php-pecl-dbus +# remirepo spec file for php-pecl-dbus # -# Copyright (c) 2014-2017 Remi Collet -# License: CC-BY-SA -# http://creativecommons.org/licenses/by-sa/4.0/ +# SPDX-FileCopyrightText: Copyright 2014-2025 Remi Collet +# SPDX-License-Identifier: CECILL-2.1 +# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # # Please, preserve the changelog entries # -%{?scl: %scl_package php-pecl-dbus} - -%global with_zts 0%{?__ztsphp:1} -%global pecl_name dbus -%if "%{php_version}" < "5.6" -%global ini_name %{pecl_name}.ini -%else -%global ini_name 40-%{pecl_name}.ini -%endif +%{?scl:%scl_package php-pecl-dbus} + +%bcond_without tests + +# Extension +%global ext_name dbus +%global ini_name 40-%{ext_name}.ini +%global upstream_version 0.4.1 +#global upstream_prever RC1 +# PIE / packagist +%global pie_vend pecl +%global pie_proj dbus +# Github forge +%global gh_vend derickr +%global gh_proj pecl-dbus +%global forgeurl https://github.com/%{gh_vend}/%{gh_proj} +#global commit b3ae87353da524f33374ee0418ad48f704bb6af1 +%global tag %{upstream_version}%{?upstream_prever} Summary: Extension for interaction with DBUS busses -Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 0.1.1 -Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} -License: BSD -Group: Development/Languages -URL: http://pecl.php.net/package/DBus -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz - -# Link from dbus.c header -Source1: http://www.php.net/license/3_01.txt - -# Fix RPATH added because of "pkg-config --libs dbus-1" -Patch0: %{pecl_name}-rpath.patch - -# http://svn.php.net/viewvc?view=revision&revision=332876 -# http://svn.php.net/viewvc?view=revision&revision=332055 -# http://svn.php.net/viewvc?view=revision&revision=315794 -# http://svn.php.net/viewvc?view=revision&revision=314194 -Patch1: %{pecl_name}-svn.patch - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: %{?scl_prefix}php-devel > 5.2 -BuildRequires: %{?scl_prefix}php-pear +Name: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} +Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} +%forgemeta +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +License: PHP-3.01 +URL: %{forgeurl} +Source0: %{forgesource} + +BuildRequires: make +BuildRequires: %{?dtsprefix}gcc +BuildRequires: (%{?scl_prefix}php-devel >= 8.0 with %{?scl_prefix}php-devel < 8.6) BuildRequires: dbus-devel BuildRequires: libxml2-devel Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_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(%{pecl_name}) = %{version} -Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} - -%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -Obsoletes: php53-pecl-%{pecl_name} -Obsoletes: php53u-pecl-%{pecl_name} -Obsoletes: php54-pecl-%{pecl_name} -Obsoletes: php54w-pecl-%{pecl_name} -%if "%{php_version}" > "5.5" -Obsoletes: php55u-pecl-%{pecl_name} -Obsoletes: php55w-pecl-%{pecl_name} -%endif -%if "%{php_version}" > "5.6" -Obsoletes: php56u-pecl-%{pecl_name} -Obsoletes: php56w-pecl-%{pecl_name} -%endif -%endif - -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter shared private -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} -%endif + +# PECL/PIE +Provides: %{?scl_prefix}php-%{ext_name} = %{version} +Provides: %{?scl_prefix}php-%{ext_name}%{?_isa} = %{version} +Provides: %{?scl_prefix}php-pecl(%{ext_name}) = %{version} +Provides: %{?scl_prefix}php-pecl(%{ext_name})%{?_isa} = %{version} +Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version} %description @@ -83,17 +57,7 @@ and also act as a DBUS service. %prep -%setup -q -c -mv %{pecl_name}-%{version} NTS - -cd NTS -%patch0 -p1 -b .rpath -%patch1 -p3 -b .upstream - -cp %{SOURCE1} LICENSE - -# Fix version -sed -e '/PHP_DBUS_VERSION/s/0.1.0/%{version}/' -i php_dbus.h +%forgesetup # Sanity check, really often broken extver=$(sed -n '/#define PHP_DBUS_VERSION/{s/.* "//;s/".*$//;p}' php_dbus.h) @@ -101,119 +65,56 @@ if test "x${extver}" != "x%{version}"; then : Error: Upstream extension version is ${extver}, expecting %{version}. exit 1 fi -cd .. - -%if %{with_zts} -# Duplicate source tree for NTS / ZTS build -cp -pr NTS ZTS -%endif # Create configuration file cat > %{ini_name} << 'EOF' -; Enable %{pecl_name} extension module -extension=%{pecl_name}.so +; Enable %{ext_name} extension module +extension=%{ext_name} EOF %build -cd NTS -%{_bindir}/phpize -%configure \ - --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/php-config -make %{?_smp_mflags} +export PHP_RPATH=no + +%{__phpize} +sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global -%if %{with_zts} -cd ../ZTS -%{_bindir}/zts-phpize %configure \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/zts-php-config -make %{?_smp_mflags} -%endif + --with-php-config=%{__phpconfig} +%make_build -%install -rm -rf %{buildroot} -make -C NTS \ - install INSTALL_ROOT=%{buildroot} +%install +%make_install # install config file 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 - -%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 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i -done -%{!?_licensedir:install -Dpm 644 LICENSE %{buildroot}%{pecl_docdir}/%{pecl_name}/LICENSE} - - -%if 0%{?fedora} < 24 -# when pear installed alone, after us -%triggerin -- %{?scl_prefix}php-pear -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -# posttrans as pear can be installed after us -%posttrans -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -%postun -if [ $1 -eq 0 -a -x %{__pecl} ] ; then - %{pecl_uninstall} %{pecl_name} >/dev/null || : -fi -%endif - %check -cd NTS : Minimal load test for NTS extension %{__php} --no-php-ini \ - --define extension=modules/%{pecl_name}.so \ - --modules | grep %{pecl_name} - -%if %{with_zts} -cd ../ZTS -: Minimal load test for ZTS extension -%{__ztsphp} --no-php-ini \ - --define extension=modules/%{pecl_name}.so \ - --modules | grep %{pecl_name} -%endif - - -%clean -rm -rf %{buildroot} + --define extension=modules/%{ext_name}.so \ + --modules | grep '^%{ext_name}$' %files -%defattr(-,root,root,-) -%{?_licensedir:%license NTS/LICENSE} -%doc %{pecl_docdir}/%{pecl_name} -%{pecl_xmldir}/%{name}.xml +%license LICENSE +%doc composer.json +%doc CREDITS +%doc README.rst %config(noreplace) %{php_inidir}/%{ini_name} -%{php_extdir}/%{pecl_name}.so - -%if %{with_zts} -%config(noreplace) %{php_ztsinidir}/%{ini_name} -%{php_ztsextdir}/%{pecl_name}.so -%endif +%{php_extdir}/%{ext_name}.so %changelog +* Fri Aug 29 2025 Remi Collet <remi@remirepo.net> - 0.4.1-1 +- update to 0.4.1 +- re-license spec file to CECILL-2.1 +- move from pecl to pie packaging + * Tue Mar 8 2016 Remi Collet <remi@fedoraproject.org> - 0.1.1-5 - adapt for F24 - drop runtime dependency on pear, new scriptlets |