]> git.pld-linux.org Git - SPECS.git/blob - php4-pecl-docblock.spec
SPECS updated Tue 30 Apr 15:13:02 CEST 2024
[SPECS.git] / php4-pecl-docblock.spec
1 %define         _modname        docblock
2 %define         _status         alpha
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}
8 Version:        0.2.0
9 Release:        1
10 License:        PHP 2.02
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)
20
21 %description
22 This extension is like the tokenizer extension for PHP. It takes a
23 document comment (docblock) like this one:
24
25 /**
26  - information {@inlinetag}
27  - @tags
28  - */
29
30 and parses it into tokens.
31
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.
35
36 docblock_tokenize() has an optional second bool parameter that
37 determine whether to output non-essential tokens like the /** * stuff.
38
39 docblock_token_name() takes a DOCBLOCK_* constant and returns its name
40
41 In PECL status of this extension is: %{_status}.
42
43 %description -l pl.UTF-8
44 Rozszerzenie to jest odpowienikiem rozszerzenia tokenizer. Przyjmuje
45 blok komentarza podobny do:
46
47 /**
48  - information {@inlinetag}
49  - @tags
50  - */
51
52 i przetwarza go w tokeny.
53
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_*.
57
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).
61
62 docblock_token_name() jako argument przyjmuje stałą DOCBLOCK_* i
63 zwraca jej nazwę.
64
65 To rozszerzenie ma w PECL status: %{_status}.
66
67 %prep
68 %setup -q -c
69
70 %build
71 cd %{_modname}-%{version}
72 phpize
73 %configure
74 %{__make}
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
79
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
84 EOF
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %post
90 %php4_webserver_restart
91
92 %postun
93 if [ "$1" = 0 ]; then
94         %php4_webserver_restart
95 fi
96
97 %files
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
This page took 0.600454 seconds and 3 git commands to generate.