Compare commits

...
Sign in to create a new pull request.

5 commits

Author SHA1 Message Date
Fedora Release Engineering
73ba434120 dist-git conversion 2010-07-29 08:57:38 +00:00
Bill Nottingham
31db7210d5 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:58:48 +00:00
Remi Collet
a2705aecec update to 1.7.5 (bugfix) 2009-01-29 06:03:05 +00:00
Remi Collet
0566df701e new package 2008-06-09 15:18:35 +00:00
Kevin Fenzi
20bde7b74f Initialize branch EL-5 for php-pear-Cache-Lite 2008-04-22 17:33:49 +00:00
5 changed files with 143 additions and 21 deletions

View file

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: php-pear-Cache-Lite
# $Id$
NAME := php-pear-Cache-Lite
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

108
php-pear-Cache-Lite.spec Normal file
View file

@ -0,0 +1,108 @@
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
%define pear_name Cache_Lite
Summary: Fast and Safe little cache system for PHP
Summary(fr): Méthode de cache rapide et sécurisée pour PHP
Name: php-pear-Cache-Lite
Version: 1.7.5
Release: 1%{?dist}
License: PHP
Group: Development/Libraries
Source: http://pear.php.net/get/%{pear_name}-%{version}.tgz
Source2: xml2changelog
URL: http://pear.php.net/package/Cache_Lite
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php-pear >= 1:1.4.9-1.2
Requires: php-pear(PEAR) >= 1.4.9
Requires(post): %{__pear}
Requires(postun): %{__pear}
Provides: php-pear(%{pear_name}) = %{version}
%description
This package is a little cache system optimized for file containers. It is
fast and safe (because it uses file locking and/or anti-corruption tests).
%description -l fr
Cette extension fournit une méthode de petit cache optimisé pour les fichiers.
Elle est rapide et sécurisée (parce qu'elle utilise les verrous de fichiers
et/ou des tests anti-corruption).
%prep
%setup -c -q
%{_bindir}/php -n %{SOURCE2} package.xml >CHANGELOG
mv package.xml %{pear_name}-%{version}/%{pear_name}.xml
%build
# Empty build section
%install
rm -rf %{buildroot} docdir
pushd %{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 %{pear_name}.xml %{buildroot}%{pear_xmldir}
popd
# Sort out documentation
%{__mkdir} docdir
mv %{buildroot}%{pear_docdir}/%{pear_name}/* docdir
%clean
rm -rf %{buildroot}
%check
lst=$(find %{buildroot}%{pear_phpdir} -exec grep -q %{buildroot} {} \; -print)
[ ! -z "$lst" ] && echo "Reference to BUILDROOT in $lst" && exit 1;
# For documentation purpose only
# After install, as root :
# pear run-tests -p Cache_Lite
# Should return
# 19 PASSED TESTS
# 0 SKIPPED TESTS
%post
%{__pear} install --nodeps --soft --force --register-only %{pear_xmldir}/%{pear_name}.xml >/dev/null || :
%postun
if [ "$1" -eq "0" ]; then
%{__pear} uninstall --nodeps --ignore-errors --register-only %{pear_name} >/dev/null || :
fi
%files
%defattr(-,root,root,-)
%doc CHANGELOG docdir/*
%{pear_phpdir}/Cache
%{pear_testdir}/%{pear_name}
%{pear_xmldir}/%{pear_name}.xml
%changelog
* Sat Jan 09 2009 Remi Collet <Fedora@FamilleCollet.com> 1.7.5-1
- update to 1.7.5
* Mon Jun 09 2008 Remi Collet <Fedora@FamilleCollet.com> 1.7.4-1
- update to 1.7.4
* Tue Apr 15 2008 Remi Collet <Fedora@FamilleCollet.com> 1.7.3-1
- initial RPM

View file

@ -0,0 +1 @@
085d095dc2bd92e546a8d6aa8dd748ba Cache_Lite-1.7.5.tgz

34
xml2changelog Normal file
View file

@ -0,0 +1,34 @@
<?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);
$new=$xml->version->release;
if (isset($xml->changelog->release) && count($xml->changelog->release))
foreach($xml->changelog->release as $rel) {
$old=$rel->version->release;
if ("$old" != "$new") {
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);
}
?>