]> git.pld-linux.org Git - packages/php-pecl-mono.git/blob - php-pecl-mono.spec
- conf.d and php api macros
[packages/php-pecl-mono.git] / php-pecl-mono.spec
1 # TODO
2 # - doesn't compile
3 %define         _modname        mono
4 %define         _status         beta
5 %define         _sysconfdir     /etc/php
6 %define         extensionsdir   %(php-config --extension-dir 2>/dev/null)
7
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}
11 Version:        0.7
12 Release:        0.1
13 License:        PHP 2.02
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
23 Obsoletes:      php-mono
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 A C extension that interfaces with the mono library to allow access to
28 .NET assemblies.
29
30 In PECL status of this package is: %{_status}.
31
32 %description -l pl
33 Rozszerzenie w C, które jest interfejsem do biblioteki mono,
34 pozwalaj±cym na dostêp do wstawek w .NET.
35
36 To rozszerzenie ma w PECL status: %{_status}.
37
38 %prep
39 %setup -q -c
40
41 %build
42 cd %{_modname}-%{version}
43 phpize
44 %configure \
45         --with-%{_modname}
46
47 %{__make} \
48 CPPFLAGS="-DHAVE_CONFIG_H -I%{_prefix}/X11R6/include/X11/" \
49         CFLAGS_CLEAN="%{rpmcflags}"
50
51 %install
52 rm -rf $RPM_BUILD_ROOT
53 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
54
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
59 EOF
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %post
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
67
68 %postun
69 if [ "$1" = 0 ]; then
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
72 fi
73
74 %files
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
This page took 0.15065 seconds and 3 git commands to generate.