From f715ec8ea5d31dbb51fd830d0fec6145f3b3dc90 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 2 Apr 2015 17:55:25 +0200 Subject: php-pecl-libsodium: 0.1.2 --- php-pecl-libsodium.spec | 55 +++++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 20 deletions(-) (limited to 'php-pecl-libsodium.spec') diff --git a/php-pecl-libsodium.spec b/php-pecl-libsodium.spec index ca1c664..9485218 100644 --- a/php-pecl-libsodium.spec +++ b/php-pecl-libsodium.spec @@ -2,7 +2,7 @@ # # Copyright (c) 2014-2015 Remi Collet # License: CC-BY-SA -# http://creativecommons.org/licenses/by-sa/3.0/ +# http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # @@ -22,13 +22,15 @@ Summary: Wrapper for the Sodium cryptographic library Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 0.1.1 -Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1 +Version: 0.1.2 +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: PHP Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Patch0: %{pecl_name}-build.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if "%{?vendor}" == "Remi Collet" # Ensure libsodium-last is used @@ -40,8 +42,6 @@ BuildRequires: libsodium-devel >= 0.6.0 BuildRequires: %{?scl_prefix}php-devel > 5.2 BuildRequires: %{?scl_prefix}php-pear -Requires(post): %{__pecl} -Requires(postun): %{__pecl} Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} @@ -53,17 +53,17 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} # 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} +Obsoletes: php53-pecl-%{pecl_name} <= %{version} +Obsoletes: php53u-pecl-%{pecl_name} <= %{version} +Obsoletes: php54-pecl-%{pecl_name} <= %{version} +Obsoletes: php54w-pecl-%{pecl_name} <= %{version} %if "%{php_version}" > "5.5" -Obsoletes: php55u-pecl-%{pecl_name} -Obsoletes: php55w-pecl-%{pecl_name} +Obsoletes: php55u-pecl-%{pecl_name} <= %{version} +Obsoletes: php55w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "5.6" -Obsoletes: php56u-pecl-%{pecl_name} -Obsoletes: php56w-pecl-%{pecl_name} +Obsoletes: php56u-pecl-%{pecl_name} <= %{version} +Obsoletes: php56w-pecl-%{pecl_name} <= %{version} %endif %endif @@ -85,9 +85,11 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO mv %{pecl_name}-%{version} NTS # Don't install tests -sed -e '/role="test"/d' -i package2.xml +sed -e '/role="test"/d' -i package.xml cd NTS +%patch0 -p1 -b .fix + # Sanity check, really often broken extver=$(sed -n '/#define PHP_LIBSODIUM_VERSION/{s/.* "//;s/".*$//;p}' php_libsodium.h) if test "x${extver}" != "x%{version}"; then @@ -133,7 +135,7 @@ make -C NTS install INSTALL_ROOT=%{buildroot} install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} # Install XML package description -install -D -m 644 package2.xml %{buildroot}%{pecl_xmldir}/%{name}.xml +install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %if %{with_zts} make -C ZTS install INSTALL_ROOT=%{buildroot} @@ -142,17 +144,25 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Documentation -for i in $(grep 'role="doc"' package2.xml | sed -e 's/^.*name="//;s/".*$//') +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 -%post -%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +# 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 ] ; then +if [ $1 -eq 0 -a -x %{__pecl} ] ; then %{pecl_uninstall} %{pecl_name} >/dev/null || : fi @@ -199,8 +209,8 @@ rm -rf %{buildroot} %defattr(-,root,root,-) %doc %{pecl_docdir}/%{pecl_name} %{?_licensedir:%license NTS/LICENSE} - %{pecl_xmldir}/%{name}.xml + %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so @@ -211,6 +221,11 @@ rm -rf %{buildroot} %changelog +* Thu Apr 02 2015 Remi Collet - 0.1.2-1 +- Update to 0.1.2 +- drop runtime dependency on pear, new scriptlets +- open https://github.com/jedisct1/libsodium-php/pull/22 + * Wed Dec 24 2014 Remi Collet - 0.1.1-1.1 - Fedora 21 SCL mass rebuild -- cgit