]> git.pld-linux.org Git - packages/php-pecl-ssh2.git/blob - php-pecl-ssh2.spec
add patch from alpine to build for php 7.3/7.4
[packages/php-pecl-ssh2.git] / php-pecl-ssh2.spec
1 %define         php_name        php%{?php_suffix}
2 %define         modname ssh2
3 Summary:        %{modname} - bindings for the libssh2 library
4 Summary(pl.UTF-8):      %{modname} - dowiązania do biblioteki libssh2
5 Name:           %{php_name}-pecl-%{modname}
6 Version:        1.1.2
7 Release:        2
8 License:        PHP
9 Group:          Development/Languages/PHP
10 Source0:        https://pecl.php.net/get/%{modname}-%{version}.tgz
11 # Source0-md5:  0bb1b02ae6d1d1a86134959e9b45ae69
12 Patch0:         https://raw.githubusercontent.com/alpinelinux/aports/c2a8a93cc1e328aca81df7e284aceeacb23c78f5/community/php7-pecl-ssh2/fix-php-7x.patch
13 # Patch0-md5:   806cf16dd2fe4727f1922b4f30de9df0
14 URL:            https://pecl.php.net/package/ssh2
15 BuildRequires:  %{php_name}-devel >= 4:7.0.0
16 BuildRequires:  libssh2-devel >= 1.2.9
17 BuildRequires:  openssl-devel >= 0.9.7d
18 BuildRequires:  rpmbuild(macros) >= 1.650
19 %{?requires_php_extension}
20 Provides:       php(%{modname}) = %{version}
21 Obsoletes:      php-pecl-ssh2 < 0.12-4
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 Provides bindings to the functions of libssh2 which implements the
26 SSH2 protocol.
27
28 %description -l pl.UTF-8
29 Dostarcza dowiązań do różnych funkcji biblioteki libssh2
30 implementującej protokół SSH2.
31
32 %prep
33 %setup -qc
34 mv %{modname}-%{version}/* .
35 %patch0 -p1
36
37 %build
38 phpize
39 %configure
40 %{__make}
41
42 %install
43 rm -rf $RPM_BUILD_ROOT
44 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
45 install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
46 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/00_%{modname}.ini
47 ; Enable %{modname} extension module
48 extension=%{modname}.so
49 EOF
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %post
55 %php_webserver_restart
56
57 %postun
58 if [ "$1" = 0 ]; then
59         %php_webserver_restart
60 fi
61
62 %files
63 %defattr(644,root,root,755)
64 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/*_%{modname}.ini
65 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.198153 seconds and 3 git commands to generate.