[php-pear-File-Passwd] clean spec
Remi Collet
remi at fedoraproject.org
Thu Aug 26 18:05:02 UTC 2010
commit 17b1848db9ab4e172467b18d521472b4ead29826
Author: remi <fedora at famillecollet.com>
Date: Thu Aug 26 20:04:09 2010 +0200
clean spec
.gitignore | 1 +
PHP-LICENSE-3.01 | 68 ---------------------------------------------
php-pear-File-Passwd.spec | 36 ++++++++++++++----------
3 files changed, 22 insertions(+), 83 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 46eb51a..e41bdb3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
File_Passwd-1.1.7.tgz
+package.xml
diff --git a/php-pear-File-Passwd.spec b/php-pear-File-Passwd.spec
index beb1456..2d495f6 100644
--- a/php-pear-File-Passwd.spec
+++ b/php-pear-File-Passwd.spec
@@ -1,29 +1,27 @@
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
-%define pear_name File_Passwd
+%global pear_name File_Passwd
Name: php-pear-File-Passwd
Version: 1.1.7
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Manipulate many kinds of password files
Group: Development/Languages
License: PHP
URL: http://pear.php.net/package/File_Passwd
Source0: http://pear.php.net/get/%{pear_name}-%{version}.tgz
-Source1: PHP-LICENSE-3.01
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
+
BuildRequires: php-pear >= 1:1.4.9-1.2
Requires: php-pear(PEAR)
Requires(post): %{__pear}
Requires(postun): %{__pear}
Provides: php-pear(%{pear_name}) = %{version}
-# Samba not required for RHEL
-%if !0%{?rhel}
Requires: php-pear(Crypt_CHAP) >= 1.0.0
-%endif
+
%description
Provides methods to manipulate and authenticate against standard Unix,
@@ -33,10 +31,13 @@ and custom formatted password files.
%prep
%setup -qc
-[ -f package2.xml ] || mv package.xml package2.xml
-mv package2.xml %{pear_name}-%{version}/%{pear_name}.xml
-install -pm 644 -c %{SOURCE1} LICENSE
+# 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 V2
+mv ../package.xml %{name}.xml
%build
@@ -47,14 +48,14 @@ 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
# Clean up unnecessary files
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}
# Remove samba extension for RHEL
%if 0%{?rhel}
@@ -69,7 +70,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
@@ -80,14 +81,19 @@ fi
%files
%defattr(-,root,root,-)
-%doc LICENSE
-%{pear_xmldir}/%{pear_name}.xml
+%{pear_xmldir}/%{name}.xml
%{pear_testdir}/%{pear_name}
%dir %{pear_phpdir}/File
%{pear_phpdir}/File/Passwd*
%changelog
+* Thu Aug 26 2010 Remi Collet <Fedora at FamilleCollet.com> - 1.1.7-2
+- clean define
+- remove LICENSE (not provided by upstream)
+- rename File_Passwd.xml to php-pear-File-Passwd.xml
+- set date.timezone during build
+
* Sat Sep 05 2009 Christopher Stone <chris.stone at gmail.com> 1.1.7-1
- Upstream sync
More information about the scm-commits
mailing list