]> git.pld-linux.org Git - SPECS.git/blob - php-pecl-dio.spec
SPECS updated Sun 1 Aug 11:02:02 CEST 2021
[SPECS.git] / php-pecl-dio.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 %define         php_name        php%{?php_suffix}
6 %define         modname dio
7 Summary:        %{modname} - Direct I/O functions
8 Summary(pl.UTF-8):      %{modname} - funkcje bezpośredniego we/wy
9 Name:           %{php_name}-pecl-%{modname}
10 Version:        0.0.7
11 Release:        4
12 License:        PHP 2.02
13 Group:          Development/Languages/PHP
14 Source0:        http://pecl.php.net/get/%{modname}-%{version}.tgz
15 # Source0-md5:  a1a4df428a17dbe1ab4277b492dfa052
16 URL:            http://pecl.php.net/package/dio/
17 BuildRequires:  %{php_name}-devel >= 3:5.0.4
18 BuildRequires:  rpmbuild(macros) >= 1.650
19 %{?requires_php_extension}
20 Provides:       php(%{modname}) = %{version}
21 Obsoletes:      php-dio
22 Obsoletes:      php-pecl-dio < 0.0.7-3
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 PHP supports the direct I/O functions as described in the Posix
27 Standard (Section 6) for performing I/O functions at a lower level
28 than the C-Language stream I/O functions (fopen(), fread(),..). The
29 use of the DIO functions should be considered only when direct control
30 of a device is needed. In all other cases, the standard filesystem
31 functions are more than adequate.
32
33 %description -l pl.UTF-8
34 PHP obsługuje funkcje bezpośredniego we/wy wg opisu w standardzie
35 POSIX (sekcji 6) do wykonywania operacji we/wy na poziomie niższym niż
36 funkcje strumieni we/wy w języku C (fopen(), fread()...). Użycie
37 funkcji DIO powinno być rozważane tylko jeśli potrzebna jest
38 bezpośrednia kontrola nad urządzeniem. We wszystkich innych
39 przypadkach odpowiedniejsze są standardowe funkcje operacji na
40 systemie plików.
41
42 %prep
43 %setup -qc
44 mv %{modname}-%{version}*/* .
45 # all files with 1970 timestamp
46 find -newer php_dio_stream_wrappers.h -o -print | xargs touch --reference %{SOURCE0}
47
48 %build
49 phpize
50 %configure
51 %{__make}
52
53 %if %{with tests}
54 export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
55 unset TZ LANG LC_ALL || :
56 %{__make} test
57 %endif
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
62
63 %{__make} install \
64         EXTENSION_DIR=%{php_extensiondir} \
65         INSTALL_ROOT=$RPM_BUILD_ROOT
66 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
67 ; Enable %{modname} extension module
68 extension=%{modname}.so
69 EOF
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74 %post
75 %php_webserver_restart
76
77 %postun
78 if [ "$1" = 0 ]; then
79         %php_webserver_restart
80 fi
81
82 %files
83 %defattr(644,root,root,755)
84 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
85 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.123448 seconds and 3 git commands to generate.