[php-pear-PEAR-Command-Packaging/f14/master] doc in /usr/share/doc/pear
Remi Collet
remi at fedoraproject.org
Thu Apr 7 05:11:06 UTC 2011
commit 31228eab5bea219094d2343adc9bb5d147845c2b
Author: remi <fedora at famillecollet.com>
Date: Thu Apr 7 07:11:03 2011 +0200
doc in /usr/share/doc/pear
...ommand-Packaging-0.2.0-fedora-conventions.patch | 4 +-
...PEAR-Command-Packaging-fedora-template-specfile | 11 ++++++---
php-pear-PEAR-Command-Packaging.spec | 21 ++++++++++++++-----
3 files changed, 24 insertions(+), 12 deletions(-)
---
diff --git a/php-pear-PEAR-Command-Packaging-0.2.0-fedora-conventions.patch b/php-pear-PEAR-Command-Packaging-0.2.0-fedora-conventions.patch
index 8fb79da..3c1749c 100644
--- a/php-pear-PEAR-Command-Packaging-0.2.0-fedora-conventions.patch
+++ b/php-pear-PEAR-Command-Packaging-0.2.0-fedora-conventions.patch
@@ -6,7 +6,7 @@ diff -up package.xml.orig package.xml
<dir baseinstalldir="PEAR/Command" name="/">
<file baseinstalldir="PEAR/Command" md5sum="72a74194c78677dba2584098c3b53a2e" name="Packaging.xml" role="php" />
- <file baseinstalldir="PEAR/Command" md5sum="70509a4f539f3f8b219fccf38831a38b" name="Packaging.php" role="php">
-+ <file baseinstalldir="PEAR/Command" md5sum="f3bc9de503c39b4bf5952061cbcdd45a" name="Packaging.php" role="php">
++ <file baseinstalldir="PEAR/Command" md5sum="5f97e963109b46d09427c23b64a40155" name="Packaging.php" role="php">
<tasks:replace from="@DATA-DIR@" to="data_dir" type="pear-config" />
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
@@ -126,7 +126,7 @@ diff -up PEAR_Command_Packaging-0.2.0/Packaging.php.orig PEAR_Command_Packaging-
// Handle doc files
if (isset($file_list['doc'])) {
- $this->_output['doc_files'] = 'docs/' . $pf->getPackage() . '/*';
-+ $this->_output['doc_files'] = '%{pear_name}-%{version}/docdir/%{pear_name}/*';
++ $this->_output['doc_files'] = '%{pear_docdir}/%{pear_name}';
$this->_output['doc_files_statement'] = '%doc ' . $this->_output['doc_files'];
- $this->_output['doc_files_relocation_script'] = "mv %{buildroot}/docs .\n";
+ $this->_output['doc_files_relocation_script'] = "# Move documentation\nmkdir -p docdir\nmv \$RPM_BUILD_ROOT%{pear_docdir}/* docdir\n";
diff --git a/php-pear-PEAR-Command-Packaging-fedora-template-specfile b/php-pear-PEAR-Command-Packaging-fedora-template-specfile
index 731fd2e..ebd0b9d 100644
--- a/php-pear-PEAR-Command-Packaging-fedora-template-specfile
+++ b/php-pear-PEAR-Command-Packaging-fedora-template-specfile
@@ -26,6 +26,11 @@ Provides: php-pear(%{pear_name}) = %{version}
%setup -q -c
[ -f package2.xml ] || mv package.xml package2.xml
mv package2.xml %{pear_name}-%{version}/%{name}.xml
+
+# Create a "localized" php.ini to avoid build warning
+cp /etc/php.ini .
+echo "date.timezone=UTC" >>php.ini
+
cd %{pear_name}-%{version}
@@ -36,10 +41,8 @@ cd %{pear_name}-%{version}
%install
cd %{pear_name}-%{version}
-rm -rf $RPM_BUILD_ROOT docdir
-%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
-
- at doc_files_relocation_script@
+rm -rf $RPM_BUILD_ROOT
+PHPRC=../php.ini %{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
# Clean up unnecessary files
rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
diff --git a/php-pear-PEAR-Command-Packaging.spec b/php-pear-PEAR-Command-Packaging.spec
index 4e0c350..5e63c97 100644
--- a/php-pear-PEAR-Command-Packaging.spec
+++ b/php-pear-PEAR-Command-Packaging.spec
@@ -3,7 +3,7 @@
Name: php-pear-PEAR-Command-Packaging
Version: 0.2.0
-Release: 4%{?dist}
+Release: 6%{?dist}
Summary: Create RPM spec files from PEAR modules
Group: Development/System
@@ -27,12 +27,20 @@ command, and contains several enhancements that make it far more flexible.
Similar functions for other external packaging mechanisms may be added at
a later date.
+This package generate spec file closed to fedora PHP Guidelines:
+http://fedoraproject.org/wiki/Packaging:PHP
+
+
%prep
%setup -q -c
# Patches for Fedora conventions
%patch0 -p0 -b .fedora
+# Create a "localized" php.ini to avoid build warning
+cp /etc/php.ini .
+echo "date.timezone=UTC" >>php.ini
+
mv package.xml %{pear_name}-%{version}/%{name}.xml
cd %{pear_name}-%{version}
@@ -43,16 +51,13 @@ cd %{pear_name}-%{version}
%install
cd %{pear_name}-%{version}
rm -rf $RPM_BUILD_ROOT
-%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
+PHPRC=../php.ini %{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{pear_phpdir}/data/%{pear_name}/template.spec
# Clean up unnecessary files
rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
-# Remove doc; will be installed later
-rm -f $RPM_BUILD_ROOT%{pear_docdir}/%{pear_name}/LICENSE
-
# Install XML package description
mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
@@ -74,13 +79,17 @@ fi
%files
%defattr(-,root,root,-)
-%doc %{pear_name}-%{version}/LICENSE
+%doc %{pear_docdir}/%{pear_name}
%{pear_xmldir}/%{name}.xml
%{pear_datadir}/%{pear_name}
%{pear_phpdir}/PEAR/Command/Packaging.*
%changelog
+* Thu Mar 24 2011 Remi Collet <Fedora at FamilleCollet.com> 0.2.0-6
+- keep installed doc in %%{pear_docdir}
+- define date.timezone during build
+
* Sat Feb 20 2010 Remi Collet <Fedora at FamilleCollet.com> 0.2.0-4
- fix missing pear in dep name (#536756)
- replace %%define by %%global in template
More information about the scm-commits
mailing list