Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
Add ev, event, oauth, pq, rdkafka extensions (#230)
Browse files Browse the repository at this point in the history
* Add download_from_tarball function to the extension builders.

If an extension's source is not available from PECL, you can use this
function to download and unzip the tarball from an arbitrary url.

Usage:
download_from_tarball <url> <version>
downlaod_from_tarball https://github.com/phalcon/cphalcon/archive/v3.0.4.tar.gz 3.0.4

* Can build the phalcon PHP extension

* Add ability to specify which extensions you wish to build.

The parameter after the comma separated list of php versions can be a
comma separated list of extension names you wish to build.

Also, we copy the .deb packages out of the working directory into the
artifact directory instead of working in the artifact directory. We also
will not rebuild the php package if it already exists in the artifact
directory.

Fix README

* Fix handling of beta packages from PECL

* Add ev, event, oauth, pq, raphf, rdkafka

* Fix default order of extension building. pq depends on raphf.

Add ev, event, oauth, pq, raphf, rdkafka extensions to README.

* Fix apcu_bc name

* Fix jsonc package name

* Fix upstream contact for raphf extension

* Fix maintainer author for debian packages
  • Loading branch information
chingor13 authored Mar 13, 2017
1 parent 17619a4 commit 2ff0c11
Show file tree
Hide file tree
Showing 44 changed files with 721 additions and 1 deletion.
6 changes: 6 additions & 0 deletions deb-package-builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,20 @@ We currently support the latest patch version of 5.6, 7.0, and 7.1. See

* apcu
* apcu_bc
* ev
* event
* gprc
* imagick
* jsonc
* mailparse
* memcache
* memcached
* mongodb
* oauth
* phalcon
* pq
* raphf
* rdkafka
* redis
* suhosin

Expand Down
3 changes: 2 additions & 1 deletion deb-package-builder/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ PHP_VERSIONS=${1}

EXTENSIONS=${2}
if [ -z "$EXTENSIONS" ]; then
EXTENSIONS=$(find extensions -name 'build.sh' -printf '%h\n' | sort -u | cut -d/ -f2)
# Explicitly declaring because some extenions depend on others (pq depends on raphf)
EXTENSIONS="apcu,apcu_bc,ev,event,grpc,imagick,jsonc,mailparse,memcache,memcached,mongodb,oauth,phalcon,raphf,pq,rdkafka,redis,suhosin"
fi


Expand Down
16 changes: 16 additions & 0 deletions deb-package-builder/extensions/ev/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -ex

source ${DEB_BUILDER_DIR}/extensions/functions.sh

echo "Building ev for gcp-php${SHORT_VERSION}"

apt-get install -y libev-dev

PNAME="gcp-php${SHORT_VERSION}-ev"

# Download the source
download_from_pecl ev

build_package ev
1 change: 1 addition & 0 deletions deb-package-builder/extensions/ev/debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
12 changes: 12 additions & 0 deletions deb-package-builder/extensions/ev/debian/control.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Source: gcp-php${SHORT_VERSION}-ev
Section: php
Priority: optional
Maintainer: Jeff Ching <[email protected]>
Build-Depends: debhelper (>= 9), gcp-php${SHORT_VERSION}
Standards-Version: 3.9.5
Homepage: http://pecl.php.net/package/ev

Package: gcp-php${SHORT_VERSION}-ev
Architecture: any
Depends: imagemagick (>= 6.5.4), gcp-php${SHORT_VERSION}
Description: ev extension module for gcp-php${SHORT_VERSION}
72 changes: 72 additions & 0 deletions deb-package-builder/extensions/ev/debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ev
Upstream-Contact: Ruslan Osmanov <[email protected]>
Source: http://pecl.php.net/package/ev/

Files: *
Copyright: 1999-2014, The PHP Group
License: PHP-3.0.1
This software is subject to version 3.01 of the PHP
license, as shown below.
.
--------------------------------------------------------------------
The PHP License, version 3.01
Copyright (c) 1999 - 2010 The PHP Group. All rights reserved.
--------------------------------------------------------------------
.
Redistribution and use in source and binary forms, with or without
modification, is permitted provided that the following conditions
are met:
.
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
.
3. The name "PHP" must not be used to endorse or promote products
derived from this software without prior written permission. For
written permission, please contact [email protected].
.
4. Products derived from this software may not be called "PHP", nor
may "PHP" appear in their name, without prior written permission
from [email protected]. You may indicate that your software works in
conjunction with PHP by saying "Foo for PHP" instead of calling
it "PHP Foo" or "phpfoo"
.
5. The PHP Group may publish revised and/or new versions of the
license from time to time. Each version will be given a
distinguishing version number.
Once covered code has been published under a particular version
of the license, you may always continue to use it under the terms
of that version. You may also choose to use such covered code
under the terms of any subsequent version of the license
published by the PHP Group. No one other than the PHP Group has
the right to modify the terms applicable to covered code created
under this License.
.
6. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes PHP software, freely available from
<http://www.php.net/software/>".
.
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``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 PHP
DEVELOPMENT TEAM OR ITS 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.
.
--------------------------------------------------------------------

Files: debian/*
Copyright: 2016 Google, Inc.
License: Apache-2.0
1 change: 1 addition & 0 deletions deb-package-builder/extensions/ev/debian/ext-ev.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extension=ev.so
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debian/ext-ev.ini opt/php${SHORT_VERSION}/lib/ext.available
14 changes: 14 additions & 0 deletions deb-package-builder/extensions/ev/debian/rules.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/make -f

%:
dh $@

override_dh_auto_configure:
phpize && \
./configure

override_dh_auto_test:

override_dh_auto_install:
INSTALL_ROOT=$(CURDIR)/debian/gcp-php${SHORT_VERSION}-ev \
dh_auto_install
16 changes: 16 additions & 0 deletions deb-package-builder/extensions/event/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -ex

source ${DEB_BUILDER_DIR}/extensions/functions.sh

echo "Building event for gcp-php${SHORT_VERSION}"

apt-get install -y libevent-dev

PNAME="gcp-php${SHORT_VERSION}-event"

# Download the source
download_from_pecl event

build_package event
1 change: 1 addition & 0 deletions deb-package-builder/extensions/event/debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
12 changes: 12 additions & 0 deletions deb-package-builder/extensions/event/debian/control.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Source: gcp-php${SHORT_VERSION}-event
Section: php
Priority: optional
Maintainer: Jeff Ching <[email protected]>
Build-Depends: debhelper (>= 9), gcp-php${SHORT_VERSION}
Standards-Version: 3.9.5
Homepage: http://pecl.php.net/package/event

Package: gcp-php${SHORT_VERSION}-event
Architecture: any
Depends: imagemagick (>= 6.5.4), gcp-php${SHORT_VERSION}
Description: event extension module for gcp-php${SHORT_VERSION}
72 changes: 72 additions & 0 deletions deb-package-builder/extensions/event/debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: event
Upstream-Contact: Ruslan Osmanov <[email protected]>
Source: http://pecl.php.net/package/event/

Files: *
Copyright: 1999-2014, The PHP Group
License: PHP-3.0.1
This software is subject to version 3.01 of the PHP
license, as shown below.
.
--------------------------------------------------------------------
The PHP License, version 3.01
Copyright (c) 1999 - 2010 The PHP Group. All rights reserved.
--------------------------------------------------------------------
.
Redistribution and use in source and binary forms, with or without
modification, is permitted provided that the following conditions
are met:
.
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
.
3. The name "PHP" must not be used to endorse or promote products
derived from this software without prior written permission. For
written permission, please contact [email protected].
.
4. Products derived from this software may not be called "PHP", nor
may "PHP" appear in their name, without prior written permission
from [email protected]. You may indicate that your software works in
conjunction with PHP by saying "Foo for PHP" instead of calling
it "PHP Foo" or "phpfoo"
.
5. The PHP Group may publish revised and/or new versions of the
license from time to time. Each version will be given a
distinguishing version number.
Once covered code has been published under a particular version
of the license, you may always continue to use it under the terms
of that version. You may also choose to use such covered code
under the terms of any subsequent version of the license
published by the PHP Group. No one other than the PHP Group has
the right to modify the terms applicable to covered code created
under this License.
.
6. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes PHP software, freely available from
<http://www.php.net/software/>".
.
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``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 PHP
DEVELOPMENT TEAM OR ITS 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.
.
--------------------------------------------------------------------

Files: debian/*
Copyright: 2016 Google, Inc.
License: Apache-2.0
1 change: 1 addition & 0 deletions deb-package-builder/extensions/event/debian/ext-event.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extension=event.so
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debian/ext-event.ini opt/php${SHORT_VERSION}/lib/ext.available
14 changes: 14 additions & 0 deletions deb-package-builder/extensions/event/debian/rules.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/make -f

%:
dh $@

override_dh_auto_configure:
phpize && \
./configure

override_dh_auto_test:

override_dh_auto_install:
INSTALL_ROOT=$(CURDIR)/debian/gcp-php${SHORT_VERSION}-event \
dh_auto_install
18 changes: 18 additions & 0 deletions deb-package-builder/extensions/oauth/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -ex

source ${DEB_BUILDER_DIR}/extensions/functions.sh

echo "Building oauth for gcp-php${SHORT_VERSION}"

PNAME="gcp-php${SHORT_VERSION}-oauth"

# Download the source
if [ ${SHORT_VERSION} == "56" ]; then
download_from_pecl oauth 1.2.3
else
download_from_pecl oauth
fi

build_package oauth
1 change: 1 addition & 0 deletions deb-package-builder/extensions/oauth/debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
12 changes: 12 additions & 0 deletions deb-package-builder/extensions/oauth/debian/control.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Source: gcp-php${SHORT_VERSION}-oauth
Section: php
Priority: optional
Maintainer: Jeff Ching <[email protected]>
Build-Depends: debhelper (>= 9), gcp-php${SHORT_VERSION}
Standards-Version: 3.9.5
Homepage: http://pecl.php.net/package/oauth

Package: gcp-php${SHORT_VERSION}-oauth
Architecture: any
Depends: imagemagick (>= 6.5.4), gcp-php${SHORT_VERSION}
Description: oauth extension module for gcp-php${SHORT_VERSION}
72 changes: 72 additions & 0 deletions deb-package-builder/extensions/oauth/debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: oauth
Upstream-Contact: John Jawed <[email protected]>
Source: http://pecl.php.net/package/oauth/

Files: *
Copyright: 1999-2014, The PHP Group
License: PHP-3.0.1
This software is subject to version 3.01 of the PHP
license, as shown below.
.
--------------------------------------------------------------------
The PHP License, version 3.01
Copyright (c) 1999 - 2010 The PHP Group. All rights reserved.
--------------------------------------------------------------------
.
Redistribution and use in source and binary forms, with or without
modification, is permitted provided that the following conditions
are met:
.
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
.
3. The name "PHP" must not be used to endorse or promote products
derived from this software without prior written permission. For
written permission, please contact [email protected].
.
4. Products derived from this software may not be called "PHP", nor
may "PHP" appear in their name, without prior written permission
from [email protected]. You may indicate that your software works in
conjunction with PHP by saying "Foo for PHP" instead of calling
it "PHP Foo" or "phpfoo"
.
5. The PHP Group may publish revised and/or new versions of the
license from time to time. Each version will be given a
distinguishing version number.
Once covered code has been published under a particular version
of the license, you may always continue to use it under the terms
of that version. You may also choose to use such covered code
under the terms of any subsequent version of the license
published by the PHP Group. No one other than the PHP Group has
the right to modify the terms applicable to covered code created
under this License.
.
6. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes PHP software, freely available from
<http://www.php.net/software/>".
.
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``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 PHP
DEVELOPMENT TEAM OR ITS 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.
.
--------------------------------------------------------------------

Files: debian/*
Copyright: 2016 Google, Inc.
License: Apache-2.0
1 change: 1 addition & 0 deletions deb-package-builder/extensions/oauth/debian/ext-oauth.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extension=oauth.so
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debian/ext-oauth.ini opt/php${SHORT_VERSION}/lib/ext.available
Loading

0 comments on commit 2ff0c11

Please sign in to comment.