]> git.pld-linux.org Git - packages/php-pecl-adodb.git/blob - php-pecl-adodb.spec
provide php(extname) to really be supporting multiple php versions
[packages/php-pecl-adodb.git] / php-pecl-adodb.spec
1 %define         php_name        php%{?php_suffix}
2 %define         modname adodb
3 %define         ver             %(echo %{version} | tr -d .)
4 Summary:        ADOdb PHP extension
5 Name:           %{php_name}-pecl-%{modname}
6 Version:        5.0.4
7 Release:        4
8 License:        BSD
9 Group:          Development/Languages/PHP
10 Source0:        http://phplens.com/lens/dl/adodb-ext-%{ver}.zip
11 # Source0-md5:  4efb3fc1f5a347f20be9222885779688
12 Patch0:         php53.patch
13 URL:            http://adodb.sourceforge.net/
14 BuildRequires:  %{php_name}-devel >= 3:5.0.0
15 BuildRequires:  rpmbuild(macros) >= 1.650
16 BuildRequires:  sed >= 4.0
17 BuildRequires:  unzip
18 %{?requires_php_extension}
19 Requires:       php(core) >= 5.0.4
20 Provides:       php(%{modname}) = %{version}
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 ADOdb PHP extension provides up to 100% speedup by replacing parts of
25 ADOdb with C code. ADOdb will auto-detect if this extension is
26 installed and use it automatically.
27
28 %prep
29 %setup -qc
30 mv %{modname}-%{ver}/* .
31 %undos -f c,txt
32 %patch0 -p1
33
34 %build
35 phpize
36 %configure
37 %{__make}
38
39 %install
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
42
43 %{__make} install \
44         EXTENSION_DIR=%{php_extensiondir} \
45         INSTALL_ROOT=$RPM_BUILD_ROOT
46
47 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
48 ; Enable %{modname} extension module
49 extension=%{modname}.so
50 EOF
51
52 %clean
53 rm -rf $RPM_BUILD_ROOT
54
55 %post
56 %php_webserver_restart
57
58 %postun
59 if [ "$1" = 0 ]; then
60         %php_webserver_restart
61 fi
62
63 %files
64 %defattr(644,root,root,755)
65 %doc CREDITS README.txt
66 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
67 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.070925 seconds and 3 git commands to generate.