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