summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-pecl-lua.spec44
1 files changed, 33 insertions, 11 deletions
diff --git a/php-pecl-lua.spec b/php-pecl-lua.spec
index 4eb02e2..3edc056 100644
--- a/php-pecl-lua.spec
+++ b/php-pecl-lua.spec
@@ -23,7 +23,7 @@
Summary: Embedded lua interpreter
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 1.1.0
-Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1
+Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: PHP
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
@@ -40,16 +40,16 @@ BuildRequires: lua-devel
BuildRequires: %{?scl_prefix}php-devel
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}}
-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_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}
# Other third party repo stuff
@@ -80,12 +80,17 @@ Lua is a powerful, fast, light-weight, embeddable scripting language.
This extension embeds the lua interpreter and offers an OO-API to lua
variables and functions.
+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 -q -c
-sed -e '/CREDITS/s/role="src"/role="doc"/' \
+# Don't install/register tests
+sed -e 's/role="test"/role="src"/' \
+ -e '/CREDITS/s/role="src"/role="doc"/' \
-e '/LICENSE/s/role="src"/role="doc"/' \
+ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
package2.xml >package.xml
mv %{pecl_name}-%{version} NTS
@@ -161,14 +166,24 @@ do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
-%post
-%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
+%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 ] ; then
+if [ $1 -eq 0 -a -x %{__pecl} ] ; then
%{pecl_uninstall} %{pecl_name} >/dev/null || :
fi
+%endif
%check
@@ -207,8 +222,8 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
+%{?_licensedir:%license NTS/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
-%doc %{pecl_testdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -220,6 +235,12 @@ rm -rf %{buildroot}
%changelog
+* Tue Mar 8 2016 Remi Collet <remi@fedoraproject.org> - - 1.1.0-6
+- adapt for F24
+- drop runtime dependency on pear, new scriptlets
+- fix license management
+- don't install/register tests
+
* Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 1.1.0-5.1
- Fedora 21 SCL mass rebuild
@@ -239,3 +260,4 @@ rm -rf %{buildroot}
* Wed Oct 23 2013 Remi Collet <remi@fedoraproject.org> - 1.1.0-1
- initial package, version 1.1.0 (beta)
- open https://github.com/laruence/php-lua/pull/6
+