diff options
author | Gunnar Wrobel <wrobel@pardus.de> | 2010-11-22 05:49:41 (GMT) |
---|---|---|
committer | Gunnar Wrobel <wrobel@pardus.de> | 2010-11-22 05:49:41 (GMT) |
commit | b310634a4813f79ffb9e8941afada0769fa1438e (patch) | |
tree | e6d82b6088b7f423a71e960cd9e27e2ce414cc5f | |
parent | 9e6946b979e5e7a75ac6be6c1dadfc59f2343182 (diff) | |
download | server-b310634a4813f79ffb9e8941afada0769fa1438e.tar.gz |
Add "hash" module for PHP.
This is required for Horde4 and with Kolab-Server-2.3 delayed
Kolab-Server-2.2.4 will be the primary packaging target for Horde4.
-rw-r--r-- | apache-php-hash/Makefile | 28 | ||||
-rw-r--r-- | apache-php-hash/apache-php-hash.spec | 113 |
2 files changed, 141 insertions, 0 deletions
diff --git a/apache-php-hash/Makefile b/apache-php-hash/Makefile new file mode 100644 index 0000000..5f8ee6c --- /dev/null +++ b/apache-php-hash/Makefile @@ -0,0 +1,28 @@ +include ../kolab.mk + +PACKAGE=apache-php-hash +VERSION=5.2.13 +RELEASE=20081209 +KOLABRELEASE=20100624_kolab1 + +.PHONY: all +all: $(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm + +$(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).$(PLATTAG).rpm $(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm: Makefile + mkdir -p $(KOLABRPMSRC)/$(PACKAGE) + cp $(PACKAGE).spec $(KOLABRPMSRC)/$(PACKAGE) + cd $(KOLABRPMSRC)/$(PACKAGE) && wget http://museum.php.net/php5/php-$(VERSION).tar.bz2 && \ + $(RPM) -ba $(PACKAGE).spec + cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm $(CURSRCDIR) + +.PHONY: dist +dist: all + cp $(CURSRCDIR)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm ../stage/ + +.PHONY: clean +clean: + rm -f $(CURSRCDIR)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm + +.PHONY: install +install: $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).$(PLATTAG).rpm + $(RPM) -Uhv --force $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).$(PLATTAG).rpm diff --git a/apache-php-hash/apache-php-hash.spec b/apache-php-hash/apache-php-hash.spec new file mode 100644 index 0000000..bacf2d1 --- /dev/null +++ b/apache-php-hash/apache-php-hash.spec @@ -0,0 +1,113 @@ +## +## apache-php.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package versions +%define V_php 5.2.13 + +# package information +Name: apache-php-hash +Summary: Apache Extension: PHP Scripting Language +URL: http://www.php.net/ +Vendor: The PHP Project +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: BASE +Group: Web +License: PHP +Version: %{V_php} +Release: 20100624_kolab1 + +# list of sources +Source0: http://static.php.net/www.php.net/distributions/php-%{V_php}.tar.bz2 + +# build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20050615, gcc, flex, bison +PreReq: OpenPKG, openpkg >= 20050615 +BuildPreReq: apache-php +PreReq: apache-php +AutoReq: no +AutoReqProv: no + +%description + Hash module for PHP. + +%prep + %setup -q -n php-%{V_php} + %{l_shtool} subst \ + -e 's;-i -a -n php5;-i -n php5;' \ + configure + %{l_shtool} subst \ + -e 's;\(/include\)/freetype2;\1;' \ + configure \ + ext/gd/config.m4 + +%build + cd ext/hash + %{l_prefix}/bin/phpize + + # configure package + case "%{l_platform -t}" in + *-sunos5.10 ) cflags="%{l_cflags}" ;; + * ) cflags="%{l_cflags -O}" ;; + esac + cppflags="%{l_cppflags}" + ldflags="%{l_ldflags}" + libs="" + CC="%{l_cc}" \ + CFLAGS="$cflags" \ + CPPFLAGS="$cppflags" \ + LDFLAGS="$ldflags" \ + LIBS="$libs" \ + ./configure \ + --prefix=%{l_prefix} \ + --with-php-config=%{l_prefix}/bin/php-config + + # build package + %{l_make} %{l_mflags} + +%install + # install package + rm -rf $RPM_BUILD_ROOT + + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/lib/php/extensions/no-debug-non-zts-20060613 + + cp ext/hash/modules/hash.so $RPM_BUILD_ROOT%{l_prefix}/lib/php/extensions/no-debug-non-zts-20060613 + + # determine installation files + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT + +%post + # after upgrade, restart service + [ $1 -eq 2 ] || exit 0 + eval `%{l_rc} apache status 2>/dev/null` + [ ".$apache_active" = .yes ] && %{l_rc} apache restart + exit 0 + |