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