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