]>
Commit | Line | Data |
---|---|---|
47fc9518 | 1 | %define php_name php%{?php_suffix} |
0f92866c | 2 | %define modname ssh2 |
93ebbc61 | 3 | %define status beta |
0f92866c ER |
4 | Summary: %{modname} - bindings for the libssh2 library |
5 | Summary(pl.UTF-8): %{modname} - dowiązania do biblioteki libssh2 | |
47fc9518 | 6 | Name: %{php_name}-pecl-%{modname} |
8fae05b2 | 7 | Version: 0.12 |
fd4940c0 | 8 | Release: 5 |
2903db35 | 9 | License: PHP |
45ecaa2e | 10 | Group: Development/Languages/PHP |
0f92866c | 11 | Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz |
8fae05b2 JR |
12 | # Source0-md5: 409b91678a842bb0ff56f2cf018b9160 |
13 | Patch0: branch.diff | |
2903db35 | 14 | URL: http://pecl.php.net/package/ssh2/ |
2db4ed43 | 15 | BuildRequires: %{php_name}-devel >= 4:5.0.4 |
8fae05b2 | 16 | BuildRequires: libssh2-devel >= 1.2.9 |
2903db35 | 17 | BuildRequires: openssl-devel >= 0.9.7d |
47fc9518 | 18 | BuildRequires: rpmbuild(macros) >= 1.650 |
5486253a | 19 | %{?requires_php_extension} |
2db4ed43 | 20 | Provides: php(%{modname}) = %{version} |
fd4940c0 | 21 | Obsoletes: php-pecl-ssh2 < 0.12-4 |
45ecaa2e AG |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
45ecaa2e AG |
24 | %description |
25 | Provides bindings to the functions of libssh2 which implements the | |
26 | SSH2 protocol. | |
27 | ||
0f92866c | 28 | In PECL status of this extension is: %{status}. |
45ecaa2e | 29 | |
0313d4ea JR |
30 | %description -l pl.UTF-8 |
31 | Dostarcza dowiązań do różnych funkcji biblioteki libssh2 | |
32 | implementującej protokół SSH2. | |
45ecaa2e | 33 | |
0f92866c | 34 | To rozszerzenie ma w PECL status: %{status}. |
45ecaa2e AG |
35 | |
36 | %prep | |
0f92866c ER |
37 | %setup -qc |
38 | mv %{modname}-%{version}/* . | |
8fae05b2 | 39 | #%patch0 -p0 |
45ecaa2e AG |
40 | |
41 | %build | |
45ecaa2e AG |
42 | phpize |
43 | %configure | |
44 | %{__make} | |
45 | ||
46 | %install | |
47 | rm -rf $RPM_BUILD_ROOT | |
890c59dd | 48 | install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}} |
0f92866c ER |
49 | install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir} |
50 | cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini | |
51 | ; Enable %{modname} extension module | |
52 | extension=%{modname}.so | |
5486253a | 53 | EOF |
45ecaa2e AG |
54 | |
55 | %clean | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %post | |
890c59dd | 59 | %php_webserver_restart |
45ecaa2e | 60 | |
5486253a ER |
61 | %postun |
62 | if [ "$1" = 0 ]; then | |
890c59dd | 63 | %php_webserver_restart |
45ecaa2e AG |
64 | fi |
65 | ||
66 | %files | |
67 | %defattr(644,root,root,755) | |
0f92866c ER |
68 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini |
69 | %attr(755,root,root) %{php_extensiondir}/%{modname}.so |