1 %define _modname docblock
3 %define _sysconfdir /etc/php4
4 %define extensionsdir %(php-config --extension-dir 2>/dev/null)
5 Summary: %{_modname} - phpDocumentor-style DocBlock tokenizer
6 Summary(pl.UTF-8): %{_modname} - tokenizer DocBlock podobny do phpDocumentora
7 Name: php4-pecl-%{_modname}
11 Group: Development/Languages/PHP
12 Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz
13 # Source0-md5: 678a888b8110a3d31ddcedd03d93bb0c
14 URL: http://pecl.php.net/package/docblock/
15 BuildRequires: php4-devel >= 3:4.0.0
16 BuildRequires: rpmbuild(macros) >= 1.344
17 Requires: php4-common >= 3:4.4.0-3
18 %{?requires_php_extension}
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 This extension is like the tokenizer extension for PHP. It takes a
23 document comment (docblock) like this one:
26 - information {@inlinetag}
30 and parses it into tokens.
32 The primary function is docblock_tokenize(), which accepts a string,
33 and returns an array of arrays of array(TOKEN, "token"). TOKEN is one
34 of DOCBLOCK_* constants.
36 docblock_tokenize() has an optional second bool parameter that
37 determine whether to output non-essential tokens like the /** * stuff.
39 docblock_token_name() takes a DOCBLOCK_* constant and returns its name
41 In PECL status of this extension is: %{_status}.
43 %description -l pl.UTF-8
44 Rozszerzenie to jest odpowienikiem rozszerzenia tokenizer. Przyjmuje
45 blok komentarza podobny do:
48 - information {@inlinetag}
52 i przetwarza go w tokeny.
54 Podstawową funkcją jest docblock_tokenize(), która jako argument
55 przyjmuje string, a zwraca tablicę tablic (TOKEN, "token"). TOKEN to
56 jedna ze stałych DOCBLOCK_*.
58 docblock_tokenize() może także przyjąć opcjonalnie drugi argument
59 (typu boolean), która okresla czy funkcja ma wypisać nieistotne tokeny
60 takie jak /** * (znaczniki komentarza).
62 docblock_token_name() jako argument przyjmuje stałą DOCBLOCK_* i
65 To rozszerzenie ma w PECL status: %{_status}.
71 cd %{_modname}-%{version}
77 rm -rf $RPM_BUILD_ROOT
78 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
80 install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
81 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
82 ; Enable %{_modname} extension module
83 extension=%{_modname}.so
87 rm -rf $RPM_BUILD_ROOT
90 %php4_webserver_restart
94 %php4_webserver_restart
98 %defattr(644,root,root,755)
99 %doc %{_modname}-%{version}/{CREDITS,EXPERIMENTAL,tests}
100 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
101 %attr(755,root,root) %{extensionsdir}/%{_modname}.so