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