summaryrefslogtreecommitdiff
path: root/pear
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@pardus.de>2008-09-10 13:31:31 (GMT)
committerGunnar Wrobel <wrobel@pardus.de>2008-09-10 13:31:31 (GMT)
commitb5fe98b36ea8c77e61baba2a53fbd84cde727b78 (patch)
tree6a95169127ffb9ff8fa3ad39e06becae6751f07b /pear
parent17d30355f762db67064712c6fb4ba80ee93e2094 (diff)
downloadserver-b5fe98b36ea8c77e61baba2a53fbd84cde727b78.tar.gz
Added the PHPUnit testing framework.
Diffstat (limited to 'pear')
-rw-r--r--pear/PEAR-PHPUnit-Channel/.cvsignore1
-rw-r--r--pear/PEAR-PHPUnit-Channel/Makefile41
-rw-r--r--pear/PEAR-PHPUnit-Channel/PEAR-PHPUnit-Channel.spec54
-rw-r--r--pear/PHPUnit/.cvsignore1
-rw-r--r--pear/PHPUnit/ChangeLog4
-rw-r--r--pear/PHPUnit/Makefile40
-rw-r--r--pear/PHPUnit/PHPUnit.spec52
7 files changed, 193 insertions, 0 deletions
diff --git a/pear/PEAR-PHPUnit-Channel/.cvsignore b/pear/PEAR-PHPUnit-Channel/.cvsignore
new file mode 100644
index 0000000..77fcdcb
--- /dev/null
+++ b/pear/PEAR-PHPUnit-Channel/.cvsignore
@@ -0,0 +1 @@
+*.src.rpm
diff --git a/pear/PEAR-PHPUnit-Channel/Makefile b/pear/PEAR-PHPUnit-Channel/Makefile
new file mode 100644
index 0000000..4bd2152
--- /dev/null
+++ b/pear/PEAR-PHPUnit-Channel/Makefile
@@ -0,0 +1,41 @@
+ifeq "x$(RPM)" "x"
+ RPM = $(HOME)/bin/openpkg rpm
+endif
+ifeq "x$(KOLABRPMSRC)" "x"
+ KOLABRPMSRC = $(HOME)/RPM/SRC
+endif
+ifeq "x$(KOLABRPMPKG)" "x"
+ KOLABRPMPKG = $(HOME)/RPM/PKG
+endif
+ifeq "x$(KOLABRPMTMP)" "x"
+ KOLABRPMTMP = $(HOME)/RPM/TMP
+endif
+
+PACKAGE = PEAR-PHPUnit-Channel
+VERSION = 1.0
+RELEASE = 1
+
+SOURCE_0=http://pear.phpunit.de/channel.xml
+
+.PHONY: all
+all: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
+
+.PHONY: dist
+dist: all
+ cp $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm ../../stage/
+
+.PHONY: clean
+clean:
+ rm -rf /kolab/RPM/TMP/$(PACKAGE)
+ rm -rf $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
+ rm -rf *~
+
+$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm: Makefile $(PACKAGE).spec
+ test -d $(KOLABRPMSRC)/$(PACKAGE) || mkdir $(KOLABRPMSRC)/$(PACKAGE)
+
+ cd $(KOLABRPMSRC)/$(PACKAGE) && wget "$(SOURCE_0)"
+ cp $(PACKAGE).spec $(KOLABRPMSRC)/$(PACKAGE)
+
+ cd $(KOLABRPMSRC)/$(PACKAGE) && $(RPM) -ba $(PACKAGE).spec
+
+ cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm .
diff --git a/pear/PEAR-PHPUnit-Channel/PEAR-PHPUnit-Channel.spec b/pear/PEAR-PHPUnit-Channel/PEAR-PHPUnit-Channel.spec
new file mode 100644
index 0000000..d2b123b
--- /dev/null
+++ b/pear/PEAR-PHPUnit-Channel/PEAR-PHPUnit-Channel.spec
@@ -0,0 +1,54 @@
+%define pear_xmldir %{l_prefix}/var/pear
+
+Name: PEAR-PHPUnit-Channel
+Version: 1.0
+Release: 1
+Summary: Adds pear.phpunit.de channel to PEAR
+
+Group: Development/Languages
+License: N/A
+URL: http://pear.phpunit.de/
+Source0: http://pear.phpunit.de/channel.xml
+
+# Build Info
+Prefix: %{l_prefix}
+BuildRoot: %{l_buildroot}
+
+BuildPreReq: php, php::with_pear = yes
+Requires: php, php::with_pear = yes
+
+%description
+This package adds the pear.phpunit.de channel which allows PEAR packages
+from this channel to be installed.
+
+
+%prep
+%setup -q -c -T
+
+%build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
+install -pm 644 %{SOURCE0} $RPM_BUILD_ROOT%{pear_xmldir}/pear.phpunit.de.xml
+%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+
+env PHP_PEAR_PHP_BIN="%{l_prefix}/bin/php -d safe_mode=off" \
+ %{l_prefix}/bin/pear -d php_dir=%{l_prefix}/lib/php channel-add %{pear_xmldir}/pear.phpunit.de.xml || \
+ echo "Channel already exists!" && sleep 1
+env PHP_PEAR_PHP_BIN="%{l_prefix}/bin/php -d safe_mode=off" \
+ %{l_prefix}/bin/pear -d php_dir=%{l_prefix}/lib/php channel-update %{pear_xmldir}/pear.phpunit.de.xml || \
+ echo "Could not update channel pear.phpunit.de!" && sleep 1
+
+%postun
+env PHP_PEAR_PHP_BIN="%{l_prefix}/bin/php -d safe_mode=off" \
+ %{l_prefix}/bin/pear -d php_dir=%{l_prefix}/lib/php channel-delete pear.phpunit.de || \
+ echo "Could not delete channel pear.phpunit.de!" && sleep 1
+
+%files -f files
+
diff --git a/pear/PHPUnit/.cvsignore b/pear/PHPUnit/.cvsignore
new file mode 100644
index 0000000..77fcdcb
--- /dev/null
+++ b/pear/PHPUnit/.cvsignore
@@ -0,0 +1 @@
+*.src.rpm
diff --git a/pear/PHPUnit/ChangeLog b/pear/PHPUnit/ChangeLog
new file mode 100644
index 0000000..5e5ecae
--- /dev/null
+++ b/pear/PHPUnit/ChangeLog
@@ -0,0 +1,4 @@
+2008-09-10 Gunnar Wrobel <p@rdus.de>
+
+ * Horde_DOM.spec: Added package to Kolab CVS.
+
diff --git a/pear/PHPUnit/Makefile b/pear/PHPUnit/Makefile
new file mode 100644
index 0000000..7fcc855
--- /dev/null
+++ b/pear/PHPUnit/Makefile
@@ -0,0 +1,40 @@
+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/")
+
+ifeq "x$(RPM)" "x"
+ RPM = $(HOME)/bin/openpkg rpm
+endif
+ifeq "x$(KOLABRPMSRC)" "x"
+ KOLABRPMSRC = $(HOME)/RPM/SRC
+endif
+ifeq "x$(KOLABRPMPKG)" "x"
+ KOLABRPMPKG = $(HOME)/RPM/PKG
+endif
+ifeq "x$(KOLABRPMTMP)" "x"
+ KOLABRPMTMP = $(HOME)/RPM/TMP
+endif
+
+SOURCE_0=http://pear.phpunit.de/get/$(PACKAGE)-$(VERSION).tgz
+
+.PHONY: all
+all: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
+
+.PHONY: dist
+dist: all
+ cp $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm ../../stage/
+
+.PHONY: clean
+clean:
+ rm -rf /kolab/RPM/TMP/$(PACKAGE)*
+ rm -rf $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
+ rm -rf *~
+
+$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm: Makefile $(PACKAGE).spec ChangeLog
+ test -d $(KOLABRPMSRC)/$(PACKAGE) || mkdir $(KOLABRPMSRC)/$(PACKAGE)
+ cd $(KOLABRPMSRC)/$(PACKAGE) && wget -c "$(SOURCE_0)"
+
+ cp $(PACKAGE).spec $(KOLABRPMSRC)/$(PACKAGE)
+ cd $(KOLABRPMSRC)/$(PACKAGE) && $(RPM) -ba $(PACKAGE).spec
+
+ cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm .
diff --git a/pear/PHPUnit/PHPUnit.spec b/pear/PHPUnit/PHPUnit.spec
new file mode 100644
index 0000000..4584318
--- /dev/null
+++ b/pear/PHPUnit/PHPUnit.spec
@@ -0,0 +1,52 @@
+# Variables
+%define V_package PHPUnit
+%define V_version 3.2.21
+%define V_release 1
+
+# Package Information
+Name: %{V_package}
+Summary: Regression testing framework for unit tests.
+URL: http://www.phpunit.de
+Packager: Gunnar Wrobel <wrobel@pardus.de> (p@rdus)
+Version: %{V_version}
+Release: %{V_release}
+License: BSD-Style
+Group: Development/Libraries
+Distribution: OpenPKG
+
+# List of Sources
+Source: http://pear.phpunit.de/get/%{V_package}-%{V_version}.tgz
+
+# Build Info
+Prefix: %{l_prefix}
+BuildRoot: %{l_buildroot}
+
+#Pre requisites
+BuildPreReq: OpenPKG, openpkg >= 20070603
+BuildPreReq: php, php::with_pear = yes
+BuildPreReq: PEAR-PHPUnit-Channel
+PreReq: OpenPKG, openpkg >= 20070603
+PreReq: php, php::with_pear = yes, php::with_spl = yes
+
+%description
+PHPUnit is a regression testing framework used by the developer who
+implements unit tests in PHP. This is the version to be used with PHP
+5.
+
+%prep
+ %setup -n %{V_package}-%{V_version}
+
+%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
+ 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}
+
+%clean
+ rm -rf $RPM_BUILD_ROOT
+
+%files -f files