[packages/php-pecl-syck] support building for multiple php versions
glen
glen at pld-linux.org
Fri Jun 21 19:27:16 CEST 2013
commit 25f0e7414d10b90f94e6c7d177cc66287289b6f7
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Fri Jun 21 20:18:41 2013 +0300
support building for multiple php versions
php-pecl-syck.spec | 43 +++++++++++++++++++++----------------------
1 file changed, 21 insertions(+), 22 deletions(-)
---
diff --git a/php-pecl-syck.spec b/php-pecl-syck.spec
index 05d4d5a..6b17f47 100644
--- a/php-pecl-syck.spec
+++ b/php-pecl-syck.spec
@@ -1,21 +1,22 @@
-%define _modname syck
-%define _status beta
-Summary: %{_modname} - YAML-1.0 parser and emitter
-Summary(pl.UTF-8): %{_modname} - analizator i emiter YAML-1.0
-Name: php-pecl-%{_modname}
+%define php_name php%{?php_suffix}
+%define modname syck
+%define status beta
+Summary: %{modname} - YAML-1.0 parser and emitter
+Summary(pl.UTF-8): %{modname} - analizator i emiter YAML-1.0
+Name: %{php_name}-pecl-%{modname}
Version: 0.9.3
Release: 1
License: PHP 3.01
Group: Development/Languages/PHP
-Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz
+Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
# Source0-md5: cbbe638b431f74eec71c76588cd14f7e
URL: http://pecl.php.net/package/syck/
-BuildRequires: php-devel >= 3:5.0.0
-BuildRequires: rpmbuild(macros) >= 1.344
+BuildRequires: %{php_name}-devel >= 3:5.0.0
+BuildRequires: rpmbuild(macros) >= 1.650
BuildRequires: syck-devel
%{?requires_php_extension}
-Requires: php-common >= 4:5.0.4
-Requires: php-pecl-hash
+Requires: %{php_name}-hash
+Requires: php(core) >= 5.0.4
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -27,7 +28,7 @@ interaction with scripting languages. YAML is optimized for data
serialization, configuration settings, log files, Internet messaging
and filtering.
-In PECL status of this extension is: %{_status}.
+In PECL status of this extension is: %{status}.
%description -l pl.UTF-8
Dowiązania do biblioteki Syck.
@@ -39,13 +40,13 @@ kątem wykorzystania w celu serializacji danych, przechowywania opcji
konfiguracyjnych, logów, komunikatorów internetowych czy różnorakich
filtrów.
-To rozszerzenie ma w PECL status: %{_status}.
+To rozszerzenie ma w PECL status: %{status}.
%prep
-%setup -q -c
+%setup -qc
+mv %{modname}-%{version}/* .
%build
-cd %{_modname}-%{version}
phpize
%configure
%{__make}
@@ -53,14 +54,12 @@ phpize
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
-
%{__make} install \
- -C %{_modname}-%{version} \
INSTALL_ROOT=$RPM_BUILD_ROOT \
EXTENSION_DIR=%{php_extensiondir}
-cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini
-; Enable %{_modname} extension module
-extension=%{_modname}.so
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
+; Enable %{modname} extension module
+extension=%{modname}.so
EOF
%clean
@@ -76,6 +75,6 @@ fi
%files
%defattr(644,root,root,755)
-%doc %{_modname}-%{version}/{CHANGELOG,TODO}
-%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini
-%attr(755,root,root) %{php_extensiondir}/%{_modname}.so
+%doc CHANGELOG TODO
+%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
+%attr(755,root,root) %{php_extensiondir}/%{modname}.so
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-syck.git/commitdiff/25f0e7414d10b90f94e6c7d177cc66287289b6f7
More information about the pld-cvs-commit
mailing list