rpms/php-pear-HTTP/devel xml2changelog, NONE, 1.1 php-pear-HTTP.spec, 1.5, 1.6 PHP-LICENSE-3.01, 1.1, NONE
Remi Collet (remi)
fedora-extras-commits at redhat.com
Wed Aug 22 18:33:32 UTC 2007
Author: remi
Update of /cvs/extras/rpms/php-pear-HTTP/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5237
Modified Files:
php-pear-HTTP.spec
Added Files:
xml2changelog
Removed Files:
PHP-LICENSE-3.01
Log Message:
Spec cleanups + Fix License
--- NEW FILE xml2changelog ---
<?php
$prog=array_shift($_SERVER['argv']);
if ($_SERVER['argc']<2) die ("usage : " . $prog . " path_to_package.xml [ --debug ]\n");
$file=array_shift($_SERVER['argv']);
($xml=simplexml_load_file($file)) || die ($file . " not found !\n");
if (in_array("--debug", $_SERVER['argv'])) print_r($xml);
if ($xml['version'] >= "2"){ // Package.xml V 2.0
printf("* Version %s (%s) - API %s (%s) - %s\n\n%s\n\n",
$xml->version->release, $xml->stability->release,
$xml->version->api, $xml->stability->api,
$xml->date, $xml->notes);
if (is_array($xml->changelog->release)) foreach($xml->changelog->release as $rel)
printf("* Version %s (%s) - API %s (%s) - %s\n\n%s\n\n",
$rel->version->release, $rel->stability->release,
$rel->version->api, $rel->stability->api,
$rel->date, $rel->notes);
} else { // Package.xml V 1.0
printf("* Version %s (%s) - %s\n\n%s\n\n",
$xml->release->version, $xml->release->state, $xml->release->date, $xml->release->notes);
foreach($xml->changelog->release as $rel)
printf("* Version %s (%s) - %s\n\n%s\n\n",
$rel->version, $rel->state, $rel->date, $rel->notes);
}
?>
Index: php-pear-HTTP.spec
===================================================================
RCS file: /cvs/extras/rpms/php-pear-HTTP/devel/php-pear-HTTP.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- php-pear-HTTP.spec 8 Sep 2006 16:46:37 -0000 1.5
+++ php-pear-HTTP.spec 22 Aug 2007 18:33:00 -0000 1.6
@@ -1,29 +1,24 @@
-# default values when new /etc/rpm/macros.pear not present
-%{!?__pear: %define __pear %{_bindir}/pear}
-%{!?pear_phpdir: %define pear_phpdir %(%{__pear} config-get php_dir 2> /dev/null || echo undefined)}
-%{!?pear_docdir: %define pear_docdir %(%{__pear} config-get doc_dir 2> /dev/null || echo undefined)}
-%{!?pear_testdir: %define pear_testdir %(%{__pear} config-get test_dir 2> /dev/null || echo undefined)}
-%{!?pear_datadir: %define pear_datadir %(%{__pear} config-get data_dir 2> /dev/null || echo undefined)}
-%{!?pear_xmldir: %define pear_xmldir %{pear_phpdir}/.pkgxml}
+%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
+%define pear_name HTTP
-Summary: PEAR: Miscellaneous HTTP utilities
-Summary(fr): PEAR: Divers utilitaires HTTP
+Summary: Miscellaneous HTTP utilities
+Summary(fr): Divers utilitaires HTTP
Name: php-pear-HTTP
Version: 1.4.0
-Release: 7%{?dist}
-License: PHP License
+Release: 8%{?dist}
+License: PHP
Group: Development/Libraries
+URL: http://pear.php.net/package/HTTP
Source: http://pear.php.net/get/HTTP-%{version}.tgz
-Source1: PHP-LICENSE-3.01
+Source2: xml2changelog
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-URL: http://pear.php.net/package/HTTP
BuildArch: noarch
BuildRequires: php-pear(PEAR) >= 1.4.9
Requires(post): %{__pear}
Requires(postun): %{__pear}
Requires: php-pear(PEAR) >= 1.4.9, php >= 4.0.6
-Provides: php-pear(HTTP) = %{version}
+Provides: php-pear(%{pear_name}) = %{version}
%description
The HTTP class is a class with static methods for doing
@@ -38,9 +33,9 @@
%prep
%setup -c -q
-mv package.xml HTTP-%{version}/HTTP.xml
-
-%{__install} -m 644 -c %{SOURCE1} LICENSE
+%{__pear} convert package.xml package2.xml
+%{_bindir}/php -n %{SOURCE2} package2.xml >CHANGELOG
+mv package2.xml %{pear_name}-%{version}/%{pear_name}.xml
%build
# Empty build section
@@ -48,15 +43,15 @@
%install
rm -rf %{buildroot}
-cd HTTP-%{version}
-%{__pear} install --nodeps --packagingroot %{buildroot} HTTP.xml
+cd %{pear_name}-%{version}
+%{__pear} install --nodeps --packagingroot %{buildroot} %{pear_name}.xml
# Clean up unnecessary files
rm -rf %{buildroot}%{pear_phpdir}/.??*
# Install XML package description
%{__mkdir_p} %{buildroot}%{pear_xmldir}
-%{__install} -pm 644 HTTP.xml %{buildroot}%{pear_xmldir}
+%{__install} -pm 644 %{pear_name}.xml %{buildroot}%{pear_xmldir}
%check
# Sanity check
@@ -67,21 +62,26 @@
rm -rf %{buildroot}
%post
-%{__pear} install --nodeps --soft --force --register-only %{pear_xmldir}/HTTP.xml >/dev/null || :
+%{__pear} install --nodeps --soft --force --register-only %{pear_xmldir}/%{pear_name}.xml >/dev/null || :
%postun
# if refcount = 0 then package has been removed (not upgraded)
if [ "$1" -eq "0" ]; then
- %{__pear} uninstall --nodeps --ignore-errors --register-only HTTP >/dev/null || :
+ %{__pear} uninstall --nodeps --ignore-errors --register-only %{pear_name} >/dev/null || :
fi
%files
%defattr(-,root,root,-)
+%doc CHANGELOG
%{pear_phpdir}/HTTP.php
%{pear_xmldir}/HTTP.xml
-%doc LICENSE
%changelog
+* Wed Aug 22 2007 Remi Collet <Fedora at FamilleCollet.com> 1.4.0-8
+- remove PEAR from sumnary
+- SPEC Cleanups - Fix License
+- convert package.xml to package2.xml
+
* Thu Sep 07 2006 Remi Collet <Fedora at FamilleCollet.com> 1.4.0-7
- last template.spec
--- PHP-LICENSE-3.01 DELETED ---
More information about the scm-commits
mailing list