Home » PEAR » PEAR_Command_Packaging » Bug #7118
Remove "doc hack" from template spec file
Details
| Submitted | 2006-03-14 16:29 UTC |
|---|---|
| From | timj at php dot net |
| Assigned | timj |
| Status | Closed |
| Package | PEAR_Command_Packaging |
| PHP Version | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2006-03-14 16:29 UTC] timj at php dot net
Description:
------------
The template spec file has a "doc hack" which compares the string containing the list of documents against an empty string, to decide if stuff needs to be done with them:
# Sort out documentation
if [ "@doc_files@" != "" ]; then
mv %{buildroot}/docs/@package@/* .
rm -rf %{buildroot}/docs
fi
This is a messy hack and needs tidying.
Test script:
---------------
# Test1: this is a package with docs
pear make-rpm-spec Net_SMTP-1.2.8.tgz
(grep out the paragraph following "# Sort out documentation")
# Test2: this is a package without docs
pear make-rpm-spec PEAR_Command_Packaging-0.1.0.tgz
(grep out the paragraph following "# Sort out documentation")
Expected result:
----------------
Test1:
mv %{buildroot}/docs/Net_SMTP/* .
rm -rf %{buildroot}/docs
Test2:
[nothing]
Actual result:
--------------
Test1:
if [ " docs/examples/basic.php docs/guide.txt" != "" ]; then
mv %{buildroot}/docs/Net_SMTP/* .
rm -rf %{buildroot}/docs
fi
Test2:
if [ "" != "" ]; then
mv %{buildroot}/docs/PEAR_Command_Packaging/* .
rm -rf %{buildroot}/docs
fi
[2006-04-14 22:40 UTC] timj at php dot net
Fixed in CVS using some changes based on:
http://cvs.pld-linux.org/cgi-bin/cvsweb/SOURCES/php-pear-PEAR-rpmvars.patch?rev=1.25