gunnar: server/php-kolab/Kolab_Storage Kolab_Storage_0.4.0_p1.patch, NONE, 1.1 ChangeLog, 1.4, 1.5 Kolab_Storage.spec, 1.7, 1.8 Makefile, 1.6, 1.7
cvs at kolab.org
cvs at kolab.org
Fri Apr 24 11:08:14 CEST 2009
Author: gunnar
Update of /kolabrepository/server/php-kolab/Kolab_Storage
In directory doto:/tmp/cvs-serv16040
Modified Files:
ChangeLog Kolab_Storage.spec Makefile
Added Files:
Kolab_Storage_0.4.0_p1.patch
Log Message:
Update Makefile and spec for the new PEAR package layout. Added a patch from upstream to fix unit testing the package.
--- NEW FILE: Kolab_Storage_0.4.0_p1.patch ---
From: Gunnar Wrobel <wrobel at pardus.de>
Subject: [PATCH] Kolab_Storage_0.4.0_p1.patch
Fixes a unit test.
STATUS: MERGED
http://cvs.horde.org/diff.php/framework/Kolab_Storage/test/Horde/Kolab/Storage/FolderTest.php?r1=1.2.2.8&r2=1.2.2.9
Signed-off-by: Gunnar Wrobel <wrobel at pardus.de>
Index: test/Horde/Kolab/Storage/FolderTest.php
===================================================================
RCS file: /repository/framework/Kolab_Storage/test/Horde/Kolab/Storage/FolderTest.php,v
retrieving revision 1.2.2.8
diff -u -B -r1.2.2.8 FolderTest.php
--- test/Horde/Kolab/Storage/FolderTest.php 6 Jan 2009 15:23:18 -0000 1.2.2.8
+++ test/Horde/Kolab/Storage/FolderTest.php 24 Apr 2009 07:51:45 -0000
@@ -162,7 +162,7 @@
*/
public function testGetImapFailNoServer()
{
- $session = &new Horde_Kolab_Session();
+ $session = Horde_Kolab_Session::singleton('anonymous', null, true);
$imap = $session->getImapParams();
$this->assertEquals('localhost', $imap['hostspec']);
}
Index: ChangeLog
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Storage/ChangeLog,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- ChangeLog 24 Feb 2009 11:57:46 -0000 1.4
+++ ChangeLog 24 Apr 2009 09:08:12 -0000 1.5
@@ -1,3 +1,7 @@
+2009-04-24 Gunnar Wrobel <p at rdus.de>
+
+ * Kolab_Storage.spec: Fixed unit testing.
+
2009-02-24 Gunnar Wrobel <p at rdus.de>
* Kolab_Storage.spec: Update to 0.4.0.
Index: Kolab_Storage.spec
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Storage/Kolab_Storage.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Kolab_Storage.spec 24 Feb 2009 11:57:46 -0000 1.7
+++ Kolab_Storage.spec 24 Apr 2009 09:08:12 -0000 1.8
@@ -2,6 +2,7 @@
%define V_package Kolab_Storage
%define V_version 0.4.0
%define V_release 20090224
+%define V_sourceurl http://pear.horde.org/get
# Package Information
Name: %{V_package}
@@ -15,7 +16,10 @@
Distribution: OpenPKG
# List of Sources
-Source: http://pear.horde.org/get/%{V_package}-%{V_version}.tgz
+Source: %{V_sourceurl}/%{V_package}-%{V_version}.tgz
+
+# List of patches
+Patch0: Kolab_Storage_0.4.0_p1.patch
# Build Info
Prefix: %{l_prefix}
@@ -50,12 +54,16 @@
%prep
%setup -n %{V_package}-%{V_version}
+ %patch -p0 -P 0
+
+ cat ../package.xml | sed -e 's/md5sum="[^"]*"//' > package.xml
+
%build
%install
env PHP_PEAR_PHP_BIN="%{l_prefix}/bin/php -d safe_mode=off -d memory_limit=40M" \
PHP_PEAR_CACHE_DIR="/tmp/pear/cache" \
- %{l_prefix}/bin/pear install --offline --force --nodeps -P $RPM_BUILD_ROOT $RPM_SOURCE_DIR/%{V_package}-%{V_version}.tgz
+ %{l_prefix}/bin/pear install --offline --force --nodeps -P $RPM_BUILD_ROOT package.xml
rm -rf $RPM_BUILD_ROOT/%{l_prefix}/lib/php/{.filemap,.lock,.channels,.depdb,.depdblock}
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
Index: Makefile
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Storage/Makefile,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- Makefile 24 Feb 2009 11:57:46 -0000 1.6
+++ Makefile 24 Apr 2009 09:08:12 -0000 1.7
@@ -1,50 +1,111 @@
-PACKAGE = $(shell grep "%define[ ]*V_package" *.spec | sed -e "s/.*V_package \([A-Za-z\-\_]*\).*/\1/")
-VERSION = $(shell grep "%define[ ]*V_version" *.spec | sed -e "s/.*V_version\s*\([0-9.]*\).*/\1/")
-RELEASE = $(shell grep "%define[ ]*V_release" *.spec | sed -e "s/.*V_release\s*\([0-9]*\).*/\1/")
+# If home is unset this Makefile assumes the Kolab server installation
+# resides in /kolab. If this is not the case this Makefile must be
+# called using
+#
+# HOME="/mykolabroot" make TARGET
+#
+ifeq "x$(HOME)" "x"
+ HOME = /kolab
+endif
+# If HOME is set to /root it is likely that somebody is calling this
+# Makefile as root user. In this case this Makefile assumes that the
+# Kolab server installation resides in /kolab.
+#
+# In the (hopefully) unlikely event that somebody really installed the
+# Kolab server in /root this Makefile will fail.
+ifeq "x$(HOME)" "x/root"
+ HOME = /kolab
+endif
+
+# Set the location of the rpm binary
ifeq "x$(RPM)" "x"
RPM = $(HOME)/bin/openpkg rpm
endif
+
+# Set the location for rpm source package installations
ifeq "x$(KOLABRPMSRC)" "x"
KOLABRPMSRC = $(HOME)/RPM/SRC
endif
+
+# Set the location for rpm packages
ifeq "x$(KOLABRPMPKG)" "x"
KOLABRPMPKG = $(HOME)/RPM/PKG
endif
+
+# Set the location for the rpm temporary directory
ifeq "x$(KOLABRPMTMP)" "x"
KOLABRPMTMP = $(HOME)/RPM/TMP
endif
+# Determine the suffix for binary packages on this system
ifeq "x$(PLATTAG)" "x"
PLATTAG = $(shell $(RPM) -q --qf="%{ARCH}-%{OS}" openpkg)-$(HOME:/%=%)
endif
-SOURCE_URL=http://pear.horde.org/get
+# Determine the staging area for collecting new source rpms
+ifeq "x$(STAGING)" "x"
+ STAGING = ../../stage
+endif
+
+# Determine the package name from the *.spec file
+PACKAGE = $(shell grep "%define[ ]*V_package" *.spec | sed -e "s/.*V_package \([A-Za-z\-\_]*\).*/\1/")
+
+# Determine the package version from the *.spec file
+VERSION = $(shell grep "%define[ ]*V_version" *.spec | sed -e "s/.*V_version\s*\([0-9.]*\).*/\1/")
+
+# Determine the release number from the *.spec file
+RELEASE = $(shell grep "%define[ ]*V_release" *.spec | sed -e "s/.*V_release\s*\([0-9]*\).*/\1/")
+
+# Determine the download url for the PEAR package from the *.spec file
+SOURCE_URL=$(shell grep "%define[ ]*V_sourceurl" *.spec | sed -e "s/.*V_sourceurl\s*\(.*\)/\1/")
+
+# Get the list of patches if there are any in this directory
+PATCHES = $(shell ls *.patch 2> /dev/null)
+
+# Generate the full package name
SOURCE_0=$(PACKAGE)-$(VERSION).tgz
+# Generate a list of extra files for the package
+EXTRA=ChangeLog $(PATCHES)
+
+
+# Default target to generate the source rpm package
.PHONY: all
all: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
+# Target for placing the source rpm in the staging area
.PHONY: dist
dist: all
- cp $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm ../../stage/
+ test -d $(STAGING) || mkdir $(STAGING)
+ cp $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm $(STAGING)
-.PHONY: clean
-clean:
- rm -rf /kolab/RPM/TMP/$(PACKAGE)*
- rm -rf $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
- rm -rf *~
+# Target for installing the binary rpm package in our current Kolab
+# server installation
+.PHONY: install
+install: $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).$(PLATTAG).rpm
+ $(RPM) -Uhv --force $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).$(PLATTAG).rpm
-$(KOLABRPMSRC)/$(PACKAGE)/$(SOURCE_0):
+# Target for retrieving the source package
+$(KOLABRPMSRC)/$(PACKAGE)/$(SOURCE_0):
test -d $(KOLABRPMSRC)/$(PACKAGE) || mkdir $(KOLABRPMSRC)/$(PACKAGE)
cd $(KOLABRPMSRC)/$(PACKAGE) && wget -c "$(SOURCE_URL)/$(SOURCE_0)"
-$(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).$(PLATTAG).rpm $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm: Makefile $(PACKAGE).spec ChangeLog $(KOLABRPMSRC)/$(PACKAGE)/$(SOURCE_0)
- cp $(PACKAGE).spec $(KOLABRPMSRC)/$(PACKAGE)
+# Target for preparing the source area and building the package
+$(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).$(PLATTAG).rpm: Makefile $(PACKAGE).spec $(EXTRA) $(KOLABRPMSRC)/$(PACKAGE)/$(SOURCE_0)
+ cp $(PACKAGE).spec $(EXTRA) $(KOLABRPMSRC)/$(PACKAGE)
cd $(KOLABRPMSRC)/$(PACKAGE) && $(RPM) -ba $(PACKAGE).spec
+# Target for fetching the source rpm into the current directory
+$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm: $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).$(PLATTAG).rpm
cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm .
-.PHONY: install
-install: $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).$(PLATTAG).rpm
- $(RPM) -Uhv --force $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).$(PLATTAG).rpm
+# Target for cleaning up the files that can be generated with this Makefile
+.PHONY: clean
+clean:
+ rm -rf $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).$(PLATTAG).rpm
+ rm -rf $(KOLABRPMSRC)/$(PACKAGE)
+ rm -rf $(KOLABRPMTMP)/$(PACKAGE)*
+ rm -rf $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
+ rm -rf *~
+
More information about the commits
mailing list