5 %define _sysconfdir /etc/php
6 %define extensionsdir %(php-config --extension-dir 2>/dev/null)
7 Summary: Allows you to access .NET assemblies from PHP
8 Summary(pl): Pozwala na dostêp do wstawek .NET w PHP
9 Name: php-pecl-%{_modname}
13 Group: Development/Languages/PHP
14 Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz
15 # Source0-md5: 23639443898018a743250a62b1873a89
16 URL: http://pecl.php.net/package/mono/
17 BuildRequires: mono-devel
18 BuildRequires: php-devel >= 3:5.0.0
19 BuildRequires: rpmbuild(macros) >= 1.254
20 %{?requires_php_extension}
21 Requires: %{_sysconfdir}/conf.d
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 A C extension that interfaces with the mono library to allow access to
29 In PECL status of this package is: %{_status}.
32 Rozszerzenie w C, które jest interfejsem do biblioteki mono,
33 pozwalaj±cym na dostêp do wstawek w .NET.
35 To rozszerzenie ma w PECL status: %{_status}.
41 cd %{_modname}-%{version}
47 CPPFLAGS="-DHAVE_CONFIG_H -I%{_prefix}/X11R6/include/X11/" \
48 CFLAGS_CLEAN="%{rpmcflags}"
51 rm -rf $RPM_BUILD_ROOT
52 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
54 install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
55 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
56 ; Enable %{_modname} extension module
57 extension=%{_modname}.so
61 rm -rf $RPM_BUILD_ROOT
64 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
65 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
69 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
70 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
74 %defattr(644,root,root,755)
75 %doc %{_modname}-%{version}/examples/{*.php,*.jpg,*.gif}
76 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
77 %attr(755,root,root) %{extensionsdir}/%{_modname}.so