[packages/php-pecl-mono] support building for multiple php versions
glen
glen at pld-linux.org
Fri Jun 21 19:24:25 CEST 2013
commit 0457940e01aca676ad56102191f8e1f0fb7495f7
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Fri Jun 21 20:18:39 2013 +0300
support building for multiple php versions
php-pecl-mono.spec | 44 +++++++++++++++++++++++---------------------
1 file changed, 23 insertions(+), 21 deletions(-)
---
diff --git a/php-pecl-mono.spec b/php-pecl-mono.spec
index 5f4866c..1eba257 100644
--- a/php-pecl-mono.spec
+++ b/php-pecl-mono.spec
@@ -1,22 +1,24 @@
# TODO
# - doesn't compile
# - php-pecl-mono-0.7/mono-0.7/php_mono.c:33:37: mono/metadata/tabledefs.h: No such file or directory
+# - add missing -I: php52-pecl-mono-0.7/php_mono.h:25:26: fatal error: mono/jit/jit.h: No such file or directory
# - package examples into examplesdir
-%define _modname mono
-%define _status beta
-Summary: %{_modname} - allows you to access .NET assemblies from PHP
-Summary(pl.UTF-8): %{_modname} - pozwala na dostęp do wstawek .NET w PHP
-Name: php-pecl-%{_modname}
+%define php_name php%{?php_suffix}
+%define modname mono
+%define status beta
+Summary: %{modname} - allows you to access .NET assemblies from PHP
+Summary(pl.UTF-8): %{modname} - pozwala na dostęp do wstawek .NET w PHP
+Name: %{php_name}-pecl-%{modname}
Version: 0.7
Release: 0.2
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: 23639443898018a743250a62b1873a89
URL: http://pecl.php.net/package/mono/
BuildRequires: mono-devel
-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
%{?requires_php_extension}
Requires: php-common >= 4:5.0.4
Obsoletes: php-mono
@@ -26,35 +28,35 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
A C extension that interfaces with the mono library to allow access to
.NET assemblies.
-In PECL status of this package is: %{_status}.
+In PECL status of this package is: %{status}.
%description -l pl.UTF-8
Rozszerzenie w C, które jest interfejsem do biblioteki mono,
pozwalającym na dostęp do wstawek w .NET.
-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 \
- --with-%{_modname}
+ --with-%{modname}
%{__make} \
-CPPFLAGS="-DHAVE_CONFIG_H -I/usr/X11R6/include/X11/" \
+ CPPFLAGS="-DHAVE_CONFIG_H -I/usr/X11R6/include/X11/" \
CFLAGS_CLEAN="%{rpmcflags}"
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
-install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
-cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini
-; Enable %{_modname} extension module
-extension=%{_modname}.so
+install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
+; Enable %{modname} extension module
+extension=%{modname}.so
EOF
%clean
@@ -70,6 +72,6 @@ fi
%files
%defattr(644,root,root,755)
-%doc %{_modname}-%{version}/examples/{*.php,*.jpg,*.gif}
-%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini
-%attr(755,root,root) %{php_extensiondir}/%{_modname}.so
+%doc examples/{*.php,*.jpg,*.gif}
+%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-mono.git/commitdiff/0457940e01aca676ad56102191f8e1f0fb7495f7
More information about the pld-cvs-commit
mailing list