Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6701ccdc11 | ||
|
|
80a96797b0 | ||
|
|
a532201896 | ||
|
|
7478e2a54f |
5 changed files with 140 additions and 21 deletions
0
.cvsignore → .gitignore
vendored
0
.cvsignore → .gitignore
vendored
21
Makefile
21
Makefile
|
|
@ -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)
|
||||
105
php-pear-Cache-Lite.spec
Normal file
105
php-pear-Cache-Lite.spec
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
%{!?__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.4
|
||||
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
|
||||
* 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
|
||||
|
||||
1
sources
1
sources
|
|
@ -0,0 +1 @@
|
|||
93a7a2a40d85a16725f02937ee5c9b88 Cache_Lite-1.7.4.tgz
|
||||
34
xml2changelog
Normal file
34
xml2changelog
Normal 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);
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue