From e46c8698bba2ff799562ada7485f518228896f7e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 28 Sep 2021 07:47:03 +0200 Subject: New package --- .gitignore | 9 + Makefile | 4 + PHPINFO | 8 + REFLECTION | 729 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ php-pecl-ps.spec | 199 +++++++++++++++ 5 files changed, 949 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 PHPINFO create mode 100644 REFLECTION create mode 100644 php-pecl-ps.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01f0400 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +clog +package-*.xml +*.tgz +*.tar.bz2 +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..13af741 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../../common/Makefile + diff --git a/PHPINFO b/PHPINFO new file mode 100644 index 0000000..bfc1a83 --- /dev/null +++ b/PHPINFO @@ -0,0 +1,8 @@ + +ps + +PS Support => enabled +PSlib Version => 0.4.5 +Extension Version => 1.4.2 +Revision => $Revision$ +GD Support => disabled diff --git a/REFLECTION b/REFLECTION new file mode 100644 index 0000000..b34bbdd --- /dev/null +++ b/REFLECTION @@ -0,0 +1,729 @@ +Extension [ extension #124 ps version 1.4.2 ] { + + - Constants [6] { + Constant [ int PS_LINECAP_BUTT ] { 0 } + Constant [ int PS_LINECAP_ROUND ] { 1 } + Constant [ int PS_LINECAP_SQUARED ] { 2 } + Constant [ int PS_LINEJOIN_MITER ] { 0 } + Constant [ int PS_LINEJOIN_ROUND ] { 1 } + Constant [ int PS_LINEJOIN_BEVEL ] { 2 } + } + + - Functions { + Function [ function ps_new ] { + + - Parameters [0] { + } + } + Function [ function ps_delete ] { + + - Parameters [1] { + Parameter #0 [ $psdoc ] + } + } + Function [ function ps_open_file ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $filename ] + } + } + Function [ function ps_get_buffer ] { + + - Parameters [1] { + Parameter #0 [ $psdoc ] + } + } + Function [ function ps_close ] { + + - Parameters [1] { + Parameter #0 [ $psdoc ] + } + } + Function [ function ps_begin_page ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $width ] + Parameter #2 [ $height ] + } + } + Function [ function ps_end_page ] { + + - Parameters [1] { + Parameter #0 [ $psdoc ] + } + } + Function [ function ps_get_value ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $key ] + Parameter #2 [ $modifier ] + } + } + Function [ function ps_set_value ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $key ] + Parameter #2 [ $value ] + } + } + Function [ function ps_get_parameter ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $key ] + Parameter #2 [ $modifier ] + } + } + Function [ function ps_set_parameter ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $key ] + Parameter #2 [ $value ] + } + } + Function [ function ps_findfont ] { + + - Parameters [4] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $fontname ] + Parameter #2 [ $encoding ] + Parameter #3 [ $embed ] + } + } + Function [ function ps_setfont ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $font ] + Parameter #2 [ $fontsize ] + } + } + Function [ function ps_show ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $text ] + } + } + Function [ function ps_show_xy ] { + + - Parameters [4] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $text ] + Parameter #2 [ $x-coor ] + Parameter #3 [ $y-coor ] + } + } + Function [ function ps_show2 ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $text ] + Parameter #2 [ $length ] + } + } + Function [ function ps_show_xy2 ] { + + - Parameters [5] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $text ] + Parameter #2 [ $length ] + Parameter #3 [ $x-coor ] + Parameter #4 [ $y-coor ] + } + } + Function [ function ps_continue_text ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $text ] + } + } + Function [ function ps_show_boxed ] { + + - Parameters [8] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $text ] + Parameter #2 [ $x-coor ] + Parameter #3 [ $y-coor ] + Parameter #4 [ $width ] + Parameter #5 [ $height ] + Parameter #6 [ $mode ] + Parameter #7 [ $feature ] + } + } + Function [ function ps_stringwidth ] { + + - Parameters [4] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $text ] + Parameter #2 [ $font ] + Parameter #3 [ $size ] + } + } + Function [ function ps_string_geometry ] { + + - Parameters [4] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $text ] + Parameter #2 [ $font ] + Parameter #3 [ $size ] + } + } + Function [ function ps_set_text_pos ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $x-coor ] + Parameter #2 [ $y-coor ] + } + } + Function [ function ps_setdash ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $black ] + Parameter #2 [ $white ] + } + } + Function [ function ps_setpolydash ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $darray ] + } + } + Function [ function ps_setflat ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $value ] + } + } + Function [ function ps_setlinejoin ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $value ] + } + } + Function [ function ps_setlinecap ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $value ] + } + } + Function [ function ps_setmiterlimit ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $value ] + } + } + Function [ function ps_setlinewidth ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $width ] + } + } + Function [ function ps_setoverprintmode ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $mode ] + } + } + Function [ function ps_save ] { + + - Parameters [1] { + Parameter #0 [ $psdoc ] + } + } + Function [ function ps_restore ] { + + - Parameters [1] { + Parameter #0 [ $psdoc ] + } + } + Function [ function ps_translate ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $x-coor ] + Parameter #2 [ $y-coor ] + } + } + Function [ function ps_scale ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $x-scale ] + Parameter #2 [ $y-scale ] + } + } + Function [ function ps_rotate ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $angle ] + } + } + Function [ function ps_moveto ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $x-coor ] + Parameter #2 [ $y-coor ] + } + } + Function [ function ps_lineto ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $x-coor ] + Parameter #2 [ $y-coor ] + } + } + Function [ function ps_curveto ] { + + - Parameters [7] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $x1 ] + Parameter #2 [ $y1 ] + Parameter #3 [ $x2 ] + Parameter #4 [ $y2 ] + Parameter #5 [ $x3 ] + Parameter #6 [ $y3 ] + } + } + Function [ function ps_circle ] { + + - Parameters [4] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $x-coor ] + Parameter #2 [ $y-coor ] + Parameter #3 [ $radius ] + } + } + Function [ function ps_arc ] { + + - Parameters [6] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $x-coor ] + Parameter #2 [ $y-coor ] + Parameter #3 [ $radius ] + Parameter #4 [ $start ] + Parameter #5 [ $end ] + } + } + Function [ function ps_arcn ] { + + - Parameters [6] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $x-coor ] + Parameter #2 [ $y-coor ] + Parameter #3 [ $radius ] + Parameter #4 [ $alpha ] + Parameter #5 [ $beta ] + } + } + Function [ function ps_rect ] { + + - Parameters [5] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $x-coor ] + Parameter #2 [ $y-coor ] + Parameter #3 [ $width ] + Parameter #4 [ $height ] + } + } + Function [ function ps_closepath ] { + + - Parameters [1] { + Parameter #0 [ $psdoc ] + } + } + Function [ function ps_stroke ] { + + - Parameters [1] { + Parameter #0 [ $psdoc ] + } + } + Function [ function ps_closepath_stroke ] { + + - Parameters [1] { + Parameter #0 [ $psdoc ] + } + } + Function [ function ps_fill ] { + + - Parameters [1] { + Parameter #0 [ $psdoc ] + } + } + Function [ function ps_fill_stroke ] { + + - Parameters [1] { + Parameter #0 [ $psdoc ] + } + } + Function [ function ps_clip ] { + + - Parameters [1] { + Parameter #0 [ $psdoc ] + } + } + Function [ function ps_open_image_file ] { + + - Parameters [5] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $type ] + Parameter #2 [ $filename ] + Parameter #3 [ $stringparam ] + Parameter #4 [ $intparam ] + } + } + Function [ function ps_open_image ] { + + - Parameters [10] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $type ] + Parameter #2 [ $source ] + Parameter #3 [ $data ] + Parameter #4 [ $length ] + Parameter #5 [ $width ] + Parameter #6 [ $height ] + Parameter #7 [ $components ] + Parameter #8 [ $bpc ] + Parameter #9 [ $params ] + } + } + Function [ function ps_close_image ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $image ] + } + } + Function [ function ps_place_image ] { + + - Parameters [5] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $image ] + Parameter #2 [ $x-coor ] + Parameter #3 [ $y-coor ] + Parameter #4 [ $scale ] + } + } + Function [ function ps_add_bookmark ] { + + - Parameters [4] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $string ] + Parameter #2 [ $parent ] + Parameter #3 [ $open ] + } + } + Function [ function ps_set_info ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $fieldname ] + Parameter #2 [ $value ] + } + } + Function [ function ps_include_file ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $filename ] + } + } + Function [ function ps_add_note ] { + + - Parameters [9] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $llx ] + Parameter #2 [ $lly ] + Parameter #3 [ $urx ] + Parameter #4 [ $ury ] + Parameter #5 [ $contents ] + Parameter #6 [ $title ] + Parameter #7 [ $icon ] + Parameter #8 [ $open ] + } + } + Function [ function ps_add_pdflink ] { + + - Parameters [8] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $llx ] + Parameter #2 [ $lly ] + Parameter #3 [ $urx ] + Parameter #4 [ $ury ] + Parameter #5 [ $filename ] + Parameter #6 [ $page ] + Parameter #7 [ $dest ] + } + } + Function [ function ps_add_locallink ] { + + - Parameters [7] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $llx ] + Parameter #2 [ $lly ] + Parameter #3 [ $urx ] + Parameter #4 [ $ury ] + Parameter #5 [ $page ] + Parameter #6 [ $dest ] + } + } + Function [ function ps_add_launchlink ] { + + - Parameters [6] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $llx ] + Parameter #2 [ $lly ] + Parameter #3 [ $urx ] + Parameter #4 [ $ury ] + Parameter #5 [ $filename ] + } + } + Function [ function ps_add_weblink ] { + + - Parameters [6] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $llx ] + Parameter #2 [ $lly ] + Parameter #3 [ $urx ] + Parameter #4 [ $ury ] + Parameter #5 [ $url ] + } + } + Function [ function ps_set_border_style ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $style ] + Parameter #2 [ $width ] + } + } + Function [ function ps_set_border_color ] { + + - Parameters [4] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $red ] + Parameter #2 [ $green ] + Parameter #3 [ $blue ] + } + } + Function [ function ps_set_border_dash ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $black ] + Parameter #2 [ $white ] + } + } + Function [ function ps_setcolor ] { + + - Parameters [7] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $type ] + Parameter #2 [ $colorspace ] + Parameter #3 [ $c1 ] + Parameter #4 [ $c2 ] + Parameter #5 [ $c3 ] + Parameter #6 [ $c4 ] + } + } + Function [ function ps_makespotcolor ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $spotcolor ] + } + } + Function [ function ps_begin_pattern ] { + + - Parameters [6] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $width ] + Parameter #2 [ $height ] + Parameter #3 [ $xstep ] + Parameter #4 [ $ystep ] + Parameter #5 [ $painttype ] + } + } + Function [ function ps_end_pattern ] { + + - Parameters [1] { + Parameter #0 [ $psdoc ] + } + } + Function [ function ps_begin_template ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $width ] + Parameter #2 [ $height ] + } + } + Function [ function ps_end_template ] { + + - Parameters [1] { + Parameter #0 [ $psdoc ] + } + } + Function [ function ps_shfill ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $psshading ] + } + } + Function [ function ps_shading ] { + + - Parameters [11] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $type ] + Parameter #2 [ $x0 ] + Parameter #3 [ $y0 ] + Parameter #4 [ $x1 ] + Parameter #5 [ $y1 ] + Parameter #6 [ $c1 ] + Parameter #7 [ $c2 ] + Parameter #8 [ $c3 ] + Parameter #9 [ $c4 ] + Parameter #10 [ $optlist ] + } + } + Function [ function ps_shading_pattern ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $psshading ] + } + } + Function [ function ps_begin_font ] { + + - Parameters [9] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $fontname ] + Parameter #2 [ $a ] + Parameter #3 [ $b ] + Parameter #4 [ $c ] + Parameter #5 [ $d ] + Parameter #6 [ $e ] + Parameter #7 [ $f ] + Parameter #8 [ $optlist ] + } + } + Function [ function ps_end_font ] { + + - Parameters [1] { + Parameter #0 [ $psdoc ] + } + } + Function [ function ps_begin_glyph ] { + + - Parameters [7] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $name ] + Parameter #2 [ $wx ] + Parameter #3 [ $llx ] + Parameter #4 [ $lly ] + Parameter #5 [ $urx ] + Parameter #6 [ $ury ] + } + } + Function [ function ps_end_glyph ] { + + - Parameters [1] { + Parameter #0 [ $psdoc ] + } + } + Function [ function ps_hyphenate ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $word ] + } + } + Function [ function ps_symbol ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $ord ] + } + } + Function [ function ps_symbol_name ] { + + - Parameters [3] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $ord ] + Parameter #2 [ $font ] + } + } + Function [ function ps_symbol_width ] { + + - Parameters [4] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $ord ] + Parameter #2 [ $font ] + Parameter #3 [ $width ] + } + } + Function [ function ps_glyph_show ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $name ] + } + } + Function [ function ps_glyph_width ] { + + - Parameters [4] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $name ] + Parameter #2 [ $font ] + Parameter #3 [ $size ] + } + } + Function [ function ps_glyph_list ] { + + - Parameters [2] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $font ] + } + } + Function [ function ps_add_kerning ] { + + - Parameters [5] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $glyphname1 ] + Parameter #2 [ $glyphname2 ] + Parameter #3 [ $kern ] + Parameter #4 [ $font ] + } + } + Function [ function ps_add_ligature ] { + + - Parameters [5] { + Parameter #0 [ $psdoc ] + Parameter #1 [ $glyphname1 ] + Parameter #2 [ $glyphname2 ] + Parameter #3 [ $glyphname3 ] + Parameter #4 [ $font ] + } + } + } +} + diff --git a/php-pecl-ps.spec b/php-pecl-ps.spec new file mode 100644 index 0000000..bfb52fe --- /dev/null +++ b/php-pecl-ps.spec @@ -0,0 +1,199 @@ +# remirepo spec file for php-pecl-ps +# +# Copyright (c) 2021 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ +# +# Please, preserve the changelog entries +# +%{?scl: %scl_package php-pecl-ps} + +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global pecl_name ps + +Summary: An extension to create PostScript files +Name: %{?scl_prefix}php-pecl-ps +Version: 1.4.2 +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +License: BSD +Group: Development/Languages +URL: https://pecl.php.net/package/%{pecl_name} + +Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz + +BuildRequires: make +BuildRequires: %{?dtsprefix}gcc +BuildRequires: %{?scl_prefix}php-devel >= 7.0 +BuildRequires: %{?scl_prefix}php-pear +BuildRequires: pslib-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} + + +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} +# Other third party repo stuff +%if "%{php_version}" > "7.4" +Obsoletes: php74-pecl-%{pecl_name} +%endif +%if "%{php_version}" > "8.0" +Obsoletes: php80-pecl-%{pecl_name} +%endif +%if "%{php_version}" > "8.1" +Obsoletes: php81-pecl-%{pecl_name} +%endif +%endif + + +%description +Ps is an extension similar to the pdf extension but for creating PostScript +files. Its api is modelled after the pdf extension. + +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}. + + +%prep +%setup -c -q + +mv %{pecl_name}-%{version} NTS + +# Don't install/register tests +sed -e 's/role="test"/role="src"/' \ + %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -i package.xml + +pushd NTS +# https://github.com/steinm/ps/issues/1 +sed -e 's/HAVE_LIBGD/DISABLE_LIBGD/' -i *.c + +# Check version +extver=$(sed -n '/#define PHP_PS_VERSION/{s/.* "//;s/".*$//;p}' php_ps.h) +if test "x${extver}" != "x%{version}"; then + : Error: Upstream version is ${extver}, expecting %{version}. + exit 1 +fi +popd + +%if %{with_zts} +cp -pr NTS ZTS +%endif + +# Create the config file +cat > %{ini_name} << 'EOF' +; Enable %{pecl_name} extension module +extension=%{pecl_name}.so +EOF + + +%build +%{?dtsenable} + +cd NTS +%{_bindir}/phpize +%configure --with-php-config=%{_bindir}/php-config +make %{?_smp_mflags} + +%if %{with_zts} +cd ../ZTS +%{_bindir}/zts-phpize +%configure --with-php-config=%{_bindir}/zts-php-config +make %{?_smp_mflags} +%endif + + +%install +%{?dtsenable} + +make -C NTS install-modules INSTALL_ROOT=%{buildroot} + +# Drop in the bit of configuration +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-modules INSTALL_ROOT=%{buildroot} +install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} +%endif + +# Documentation +cd NTS +for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') +do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +done + + +%check +: Minimal load test for NTS extension +cd NTS +%{_bindir}/php --no-php-ini \ + --define extension=modules/%{pecl_name}.so \ + --modules | grep %{pecl_name} + +: Upstream test suite for NTS extension +TEST_PHP_EXECUTABLE=%{_bindir}/php \ +TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ +%{_bindir}/php -n run-tests.php -q --show-diff + + +%if %{with_zts} +: Minimal load test for ZTS extension +cd ../ZTS +%{__ztsphp} --no-php-ini \ + --define extension=modules/%{pecl_name}.so \ + --modules | grep %{pecl_name} + +: Upstream test suite for ZTS extension +TEST_PHP_EXECUTABLE=%{__ztsphp} \ +TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ +%{__ztsphp} -n run-tests.php -q --show-diff +%endif + + +%if 0%{?fedora} < 24 && 0%{?rhel} < 8 +# 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 + + +%files +#%%{?_licensedir:%%license NTS/LICENSE} +%doc %{pecl_docdir}/%{pecl_name} +%{pecl_xmldir}/%{name}.xml + +%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 + + +%changelog +* Sun Sep 26 2021 Remi Collet - 1.4.2-1 +- new package +- open https://github.com/steinm/ps/pull/2 cleanup +- open https://github.com/steinm/ps/issues/1 broken build with gd +- open https://github.com/steinm/ps/issues/3 missing LICENSE file -- cgit