]> git.pld-linux.org Git - packages/php-pear-PHP_Fork.git/blob - php-pear-PHP_Fork.spec
- updated deps with pearize.sh
[packages/php-pear-PHP_Fork.git] / php-pear-PHP_Fork.spec
1 %include        /usr/lib/rpm/macros.php
2 %define         _class          PHP
3 %define         _subclass       Fork
4 %define         _status         beta
5 %define         _pearname       %{_class}_%{_subclass}
6 Summary:        %{_pearname} - Wrapper for pcntl_fork() with Java-like API
7 Summary(pl.UTF-8):      %{_pearname} - Wrapper dla pcntl_fork() z API zbliżonym do Javy
8 Name:           php-pear-%{_pearname}
9 Version:        0.3.1
10 Release:        2
11 License:        PHP 2.02
12 Group:          Development/Languages/PHP
13 Source0:        http://pear.php.net/get/%{_pearname}-%{version}.tgz
14 # Source0-md5:  02717e50769164d9e51fe9e3efd89a3c
15 URL:            http://pear.php.net/package/PHP_Fork/
16 BuildRequires:  php-pear-PEAR
17 BuildRequires:  rpm-php-pearprov >= 4.4.2-11
18 BuildRequires:  rpmbuild(macros) >= 1.300
19 Requires:       php-pcntl
20 Requires:       php-pear >= 4:1.0-7
21 Requires:       php-posix
22 Requires:       php-shmop
23 BuildArch:      noarch
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 PHP_Fork class. Wrapper around the pcntl_fork() stuff with a API set
28 like Java language. Practical usage is done by extending this class,
29 and re-defining the run() method.
30
31 This way PHP developers can enclose logic into a class that extends
32 PHP_Fork, then execute the start() method that forks a child process.
33 Communications with the forked process is ensured by using a Shared
34 Memory Segment; by using a user-defined signal and this shared memory
35 developers can access to child process methods that returns a
36 serializable variable.
37
38 The shared variable space can be accessed with the two methods:
39 - void setVariable($name, $value)
40 - mixed getVariable($name)
41
42 $name must be a valid PHP variable name; $value must be a variable or
43 a serializable object.
44
45 Resources (db connections, streams, etc.) cannot be serialized and so
46 they're not correctly handled.
47
48 In PEAR status of this package is: %{_status}.
49
50 %description -l pl.UTF-8
51 Klasa PHP_Fork. Wrapper dla zbioru funkcji pcntl_fork() i pochodnych z
52 API zbliżonym do języka Javy. Praktyczne zastosowanie polega na
53 rozszerzeniu tej klasy i przedefiniowaniu metody run().
54
55 Dzięki temu deweloper PHP może zamknąć warstwę logiczną wewnątrz klasy
56 rozszerzającej PHP_Fork, a następnie uruchomić metodę start() która
57 wywoła proces potomny. Komunikacja z nowo powstałym procesem jest
58 zapewniona za pomocą Segmentu Współdzielonej Pamięci (Shared Memory
59 Segment); używając zdefiniowanych przez użytkownika sygnałów i tejże
60 dzielonej pamięci deweloperzy mają dostęp do metod procesu potomnego,
61 które zwraca zmienną dająca się zserializować.
62
63 Dostęp do dzielonej przestrzeni zmiennych jest możliwy poprzez dwie
64 metody:
65 - void setVariable($name, $value)
66 - mixed getVariable($name)
67
68 $name musi być poprawną zmienną PHP; $value musi być zmienną lub
69 obiektem możliwym do serializacji.
70
71 Zasoby (połączenia z bazami danych, strumienie, itp) nie mogą być
72 zserializowane i jako takie nie są poprawnie obsługiwane.
73
74 Ta klasa ma w PEAR status: %{_status}.
75
76 %prep
77 %pear_package_setup
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT%{php_pear_dir}
82 %pear_package_install
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %files
88 %defattr(644,root,root,755)
89 %doc install.log docs/%{_pearname}/examples
90 %{php_pear_dir}/.registry/*.reg
91 %{php_pear_dir}/%{_class}/*.php
This page took 0.042447 seconds and 3 git commands to generate.