]> git.pld-linux.org Git - packages/php-pecl-yp.git/blob - php-pecl-yp.spec
- rel 2: add Provides: php(%{_modname})
[packages/php-pecl-yp.git] / php-pecl-yp.spec
1 %define         _snap           20060104
2 %define         _modname        yp
3 %define         _status         stable
4 %define         _sysconfdir     /etc/php
5 %define         extensionsdir   %(php-config --extension-dir 2>/dev/null)
6 Summary:        %{_modname} - a NIS client for PHP
7 Summary(pl):    %{_modname} - klient NIS dla PHP
8 Name:           php-pecl-%{_modname}
9 Version:        0.%{_snap}
10 Release:        2
11 License:        PHP
12 Group:          Development/Languages/PHP
13 Source0:        %{name}-%{_snap}.tar.gz
14 # Source0-md5:  ea77871191b0a32c4734964f7c02bc6c
15 URL:            http://cvs.php.net/pecl/yp/
16 BuildRequires:  php-devel >= 3:5.0.0
17 BuildRequires:  rpmbuild(macros) >= 1.322
18 %{?requires_php_extension}
19 Requires:       %{_sysconfdir}/conf.d
20 Provides:       php(yp)
21 Obsoletes:      php-yp
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 This is a dynamic shared object (DSO) for PHP that will add NIS
26 (Yellow Pages) support.
27
28 %description -l pl
29 Modu³ PHP dodaj±cy wsparcie dla NIS (Yellow Pages).
30
31 %prep
32 %setup -q -n %{name}-%{_snap}
33
34 %build
35 phpize
36 %configure
37 %{__make}
38
39 %install
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
42
43 install modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
44 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
45 ; Enable %{_modname} extension module
46 extension=%{_modname}.so
47 EOF
48
49 %clean
50 rm -rf $RPM_BUILD_ROOT
51
52 %post
53 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
54 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
55
56 %postun
57 if [ "$1" = 0 ]; then
58         [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
59         [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
60 fi
61
62 %files
63 %defattr(644,root,root,755)
64 %doc CREDITS
65 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
66 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
This page took 0.069516 seconds and 3 git commands to generate.