summaryrefslogtreecommitdiffstats
path: root/php-pear-PhpDocumentor.spec
blob: 2cf779a06c0264bb4603ede425a2d7282b675972 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
%global pear_name PhpDocumentor

Summary:          The complete documentation solution for PHP
Name:             php-pear-PhpDocumentor
Version:          1.4.4
Release:          5%{?dist}
License:          LGPLv2+
Group:            Development/Libraries
URL:              http://www.phpdoc.org/
Source0:          http://pear.php.net/get/%{pear_name}-%{version}.tgz
BuildRoot:        %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:        noarch
BuildRequires:    php-pear >= 1:1.4.9
# to run test suite
BuildRequires:    php-pear(pear.phpunit.de/PHPUnit) >= 3.6.0

Requires:         php-pear(PEAR)
Requires:         php-Smarty2 >= 2.6.0
Requires:         php-pear(XML_Beautifier) >= 1.1
Requires(post):   %{__pear}
Requires(postun): %{__pear}
Provides:         php-pear(%{pear_name}) = %{version}

Provides:         phpdoc = %{version}
Obsoletes:        phpdoc < %{version}
Provides:         php-pear-PhpDocumentor-docs = %{version}
Obsoletes:        php-pear-PhpDocumentor-docs < %{version}


%description
phpDocumentor is the current standard auto-documentation tool for the 
php language. phpDocumentor has support for linking between documentation, 
incorporating user level documents like tutorials and creation of 
highlighted source code with cross referencing to php general 
documentation.

phpDocumentor uses an extensive templating system to change your source 
code comments into human readable, and hence useful, formats. This system 
allows the creation of easy to read documentation in 15 different 
pre-designed HTML versions, PDF format, Windows Helpfile CHM format, and 
in Docbook XML. 


%prep
%setup -q -c
cd %{pear_name}-%{version}
mv ../package.xml %{name}.xml

# don't install our own php-Smarty
# don't install scripts in bin, but in doc
sed -e '/Smarty-2/d' \
    -e '/name="scripts/s/role="php"/role="doc"/' \
    -i %{name}.xml


%build


%install
cd %{pear_name}-%{version}
rm -rf $RPM_BUILD_ROOT
%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml

# Clean up unnecessary files
rm -rf $RPM_BUILD_ROOT%{pear_metadir}/.??*

# Install XML package description
mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}

# Point to the system php-Smarty
sed -i -e "s|phpDocumentor/Smarty-2.6.0/libs|Smarty2|" \
    $RPM_BUILD_ROOT%{pear_phpdir}/%{pear_name}/phpDocumentor/Converter.inc


%check
cd %{pear_name}-%{version}/tests

# quick hack for phpunit 3.6.0 compatibility
for i in *php
do
  sed -i -e '/PHPUnit\/Framework.php/d' $i
done

# Version 1.4.4 : OK (125 tests, 244 assertions)
%{_bindir}/phpunit \
  -d date.timezone=UTC \
  AllTests.php


%clean
rm -rf $RPM_BUILD_ROOT


%post
%{__pear} install --nodeps --soft --force --register-only \
    %{pear_xmldir}/%{name}.xml >/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    %{__pear} uninstall --nodeps --ignore-errors --register-only \
        %{pear_name} >/dev/null || :
fi


%files
%defattr(-,root,root,-)
%doc %{pear_docdir}/%{pear_name}
%{pear_phpdir}/%{pear_name}
%{pear_datadir}/%{pear_name}
%{pear_testdir}/%{pear_name}
%{pear_xmldir}/%{name}.xml
%{_bindir}/phpdoc


%changelog
* Sat Oct  6 2012 Remi Collet <RPMS@FamilleCollet.com> - 1.4.4-5
- use Smart2 (broken with Smarty3)
- rename PhpDocumentor.xml  to php-pear-PhpDocumentor.xml

* Sun Aug 19 2012 Remi Collet <remi@fedoraproject.org> - 1.4.4-4
- rebuilt for new pear_datadir

* Tue Aug 14 2012 Remi Collet <remi@fedoraproject.org> - 1.4.4-3
- rebuilt for new pear_testdir

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Thu Feb 23 2012 Remi Collet <RPMS@FamilleCollet.com> - 1.4.4-2
- run test suite during build

* Thu Feb 23 2012 Remi Collet <RPMS@FamilleCollet.com> - 1.4.4-1
- update to 1.4.4
- merge in a single package
- doc in /usr/share/doc/pear

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Feb 3 2010 Christof Damian <christof@damian.net> 1.4.3-2
- use global instead of define
- use pear download url
- add php-pear-XML-Beautifier dependency
- use pear_testdir and pear_datadir macros
- make example script in docdir non executeable

* Fri Sep 18 2009 Christof Damian <christof@damian.net> - 1.4.3-1
- Upstream 1.4.3

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Jun 30 2008 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.4.2-1
- Upstream 1.4.2.

* Fri Mar 21 2008 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.4.1-2
- Use system php-Smarty.

* Sun Feb 17 2008 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.4.1-1
- Upstream 1.4.1.

* Fri Aug 17 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.4.0-1
- New major upstream release 1.4.0
- Drop explicit requirements on php -- let php-pear pull in what is necessary

* Tue Jun 12 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.3.2-2
- Require parent n-v-r instead of php-pear(pear-name) in phpdoc for simplicity

* Sun Jun 10 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.3.2-1
- Upstream 1.3.2
- Update the spec to the latest php-pear spec standards
- Drop obsoleted patch

* Wed Jan 17 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.3.1-1
- Upstream 1.3.1
- Patch for bug with php-5.2 (http://pear.php.net/bugs/bug.php?id=9151)

* Tue Jan 02 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.3.0-1
- Remove bogus scripts dir in _bindir
- Require version-release instead of just version in phpdoc

* Mon Aug 28 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.3.0-0.3
- Version 1.3.0 stable
- Drop Source1
- Move documentation into -docs subpackage
- Use an updated pear template from #198706

* Sun Aug 06 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.3.0-0.2.RC6
- Split command-line stuff into a phpdoc package.
- Rename the package to conform to the php-pear naming standard.
- Create a php.ini with limit overrides (builds in mock were failing)

* Thu Jul 27 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.3.0-0.1.RC6
- Initial packaging (merci, Remi!)