[php-pear-XML-Beautifier] clean spec
Remi Collet
remi at fedoraproject.org
Mon Aug 23 17:11:58 UTC 2010
commit 6c4b866cbfedb37ff64952c31684092408dc0c56
Author: remi <fedora at famillecollet.com>
Date: Mon Aug 23 19:11:50 2010 +0200
clean spec
.gitignore | 2 ++
php-pear-XML-Beautifier.spec | 25 +++++++++++++++++--------
2 files changed, 19 insertions(+), 8 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 156fd61..cd04771 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
XML_Beautifier-1.2.0.tgz
+package.xml
+package2.xml
diff --git a/php-pear-XML-Beautifier.spec b/php-pear-XML-Beautifier.spec
index 9a09144..33b66e5 100644
--- a/php-pear-XML-Beautifier.spec
+++ b/php-pear-XML-Beautifier.spec
@@ -1,9 +1,9 @@
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
-%define pear_name XML_Beautifier
+%global pear_name XML_Beautifier
Name: php-pear-XML-Beautifier
Version: 1.2.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Class to format XML documents
Group: Development/Libraries
@@ -39,9 +39,13 @@ will follow soon.
%prep
%setup -qc
-[ -f package2.xml ] || mv package.xml package2.xml
-mv package2.xml %{pear_name}-%{version}/%{pear_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}
+# package.xml is V1 - package2.xml is V2
+mv ../package2.xml %{name}.xml
%build
@@ -52,7 +56,7 @@ cd %{pear_name}-%{version}
%install
cd %{pear_name}-%{version}
rm -rf $RPM_BUILD_ROOT docdir
-%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{pear_name}.xml
+PHPRC=../php.ini %{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
# Move documentation
mkdir -p docdir
@@ -63,7 +67,7 @@ rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
# Install XML package description
install -d $RPM_BUILD_ROOT%{pear_xmldir}
-install -pm 644 %{pear_name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
+install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
%clean
@@ -72,7 +76,7 @@ rm -rf $RPM_BUILD_ROOT
%post
%{__pear} install --nodeps --soft --force --register-only \
- %{pear_xmldir}/%{pear_name}.xml >/dev/null || :
+ %{pear_xmldir}/%{name}.xml >/dev/null || :
%postun
if [ $1 -eq 0 ] ; then
@@ -84,11 +88,16 @@ fi
%files
%defattr(-,root,root,-)
%doc %{pear_name}-%{version}/docdir/%{pear_name}/*
-%{pear_xmldir}/%{pear_name}.xml
+%{pear_xmldir}/%{name}.xml
%{pear_phpdir}/XML/Beautifier*
%changelog
+* Mon Aug 23 2010 Remi Collet <Fedora at FamilleCollet.com> - 1.2.0-4
+- clean define
+- rename XML_Beautifier.xml to php-pear-XML-Beautifier.xml
+- set date.timezone during build
+
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
More information about the scm-commits
mailing list