diff --git a/README.md b/README.md index 5fe5bf1..55c9a45 100644 --- a/README.md +++ b/README.md @@ -63,22 +63,64 @@ you from V8 API utilizing to implement more amazing stuff. ### Requirements +#### V8 You will need some fresh v8 Google JavaScript enging version installed. At this time extension tested on 5.4.420. - For Ubuntu there are [pinepain/libv8-5.4](https://launchpad.net/~pinepain/+archive/ubuntu/libv8-5.4) PPA. To install fresh libv8 do: ``` - $ sudo add-apt-repository ppa:pinepain/libv8-5.4 -y - $ sudo apt-get update -q + $ sudo add-apt-repository -y ppa:pinepain/libv8-5.4 + $ sudo apt-get update -y $ sudo apt-get install -y libv8-5.4-dev ``` - For OS X there are [v8.rb](https://github.com/pinepain/php-v8/blob/master/scripts/homebrew/v8.rb) homebrew formula. - To install fresh libv8 do: + To install fresh libv8 do: + + ``` + $ brew install https://raw.githubusercontent.com/pinepain/php-v8/master/scripts/homebrew/v8.rb + ``` + +#### PHP 7 + + - For Ubuntu there are [ondrej/php](https://launchpad.net/~ondrej/+archive/ubuntu/php) PPA by [Ondřej Surý](https://deb.sury.org). + + To install fresh `php7.0` do: + + ``` + $ sudo add-apt-repository -y ppa:ondrej/php + $ sudo apt-get update -y + $ sudo apt-get install -y php7.0 + ``` + - For OS X there are [homebrew/homebrew-php](https://github.com/Homebrew/homebrew-php) tap with php70, php71 and large + variety extensions for them. + + To install fresh `php70` do: + + ``` + $ brew tap homebrew/homebrew-php + $ brew install php70 + ``` + + +### Installing from packages + + - For Ubuntu there are [pinepain/php-v8](https://launchpad.net/~pinepain/+archive/ubuntu/php-v8) PPA. - ``` - $ brew install https://raw.githubusercontent.com/pinepain/php-v8/master/scripts/homebrew/v8.rb - ``` + To install fresh `php7.0` do: + + ``` + $ sudo add-apt-repository -y ppa:pinepain/php-v8 + $ sudo apt-get update -y + $ sudo apt-get install -y php-v8 + ``` + - For OS X there are [php70-v8.rb][php70-v8.rb] and [php71-v8.rb][php71-v8.rb] homebrew formulas. + + To install fresh `php70-v8` do: + + ``` + $ brew install https://raw.githubusercontent.com/pinepain/php-v8/master/scripts/homebrew/php70-v8.rb + ``` ### Building from sources @@ -108,3 +150,7 @@ $ sudo make install Copyright (c) 2015-2016 Bogdan Padalko <pinepain@gmail.com> [php-v8](https://github.com/pinepain/php-v8) PHP extension is licensed under the [MIT license](http://opensource.org/licenses/MIT). + + +[php70-v8.rb]: https://github.com/pinepain/php-v8/blob/master/scripts/homebrew/php70-v8.rb +[php71-v8.rb]: https://github.com/pinepain/php-v8/blob/master/scripts/homebrew/php71-v8.rb diff --git a/scripts/deps.py b/scripts/deps.py index c3f7911..268685d 100755 --- a/scripts/deps.py +++ b/scripts/deps.py @@ -132,10 +132,15 @@ def __init__(self, deps_content, version, tpl_path, out_path): self.tpl_path = tpl_path self.out_path = out_path - def import_deps_fast(self): + def import_deps_fast(self, use_orig_repo=False): vars = {} - url = "https://chromium.googlesource.com/v8/v8.git/+archive/%s.tar.gz" % self.version + if use_orig_repo: + url = "https://chromium.googlesource.com/v8/v8.git/+archive/%s.tar.gz" % self.version + head = "https://chromium.googlesource.com/v8/v8.git" + else: + url = "https://github.com/v8/v8/archive/%s.tar.gz" % self.version + head = "https://github.com/v8/v8.git" f = urllib.urlopen(url) s = f.read() @@ -145,6 +150,7 @@ def import_deps_fast(self): vars['{{ URL }}'] = 'url "%s"' % url vars['{{ SHA256 }}'] = 'sha256 "%s"' % sha256 + vars['{{ HEAD }}'] = 'head "%s"' % head resources_def = [] resources_def.append(" # resources definition, do not edit, autogenerated") diff --git a/scripts/homebrew/gen_formulas.py b/scripts/homebrew/gen_formulas.py new file mode 100755 index 0000000..9f2d101 --- /dev/null +++ b/scripts/homebrew/gen_formulas.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python + +import sys +import os +import urllib +import hashlib +import argparse + + +parser = argparse.ArgumentParser() +parser.add_argument('--libv8-version', help='Specify required libv8 formula dependency') +parser.add_argument('version', help='php-v8 version to generate formulas for') +args = parser.parse_args() + + +class HomebrewPhpV8(object): + def __init__(self, tpl_path, out_path): + self.tpl_path = tpl_path + self.out_path = out_path + + def generate(self, version, libv8_version, php_versions): + vars = {} + + url = "https://github.com/pinepain/php-v8/archive/v%s.tar.gz" % version + + f = urllib.urlopen(url) + s = f.read() + f.close() + + sha256 = hashlib.sha256(s).hexdigest() + + vars['{{ URL }}'] = 'url "%s"' % url + vars['{{ SHA256 }}'] = 'sha256 "%s"' % sha256 + + if libv8_version: + vars['{{ LIBV8_DEPENDENCY }}'] = 'depends_on "libv8-%s"' % libv8_version + else: + vars['{{ LIBV8_DEPENDENCY }}'] = '# NOTE: This formula depends on libv8, but actual "depends_on" dependency is not set yet' + + for php in php_versions: + vars['{{ PHP_VERSION }}'] = php + + tpl = "" + with open(self.tpl_path) as f: + tpl = f.read() + + for k, v in vars.iteritems(): + tpl = tpl.replace(k, v) + + out_path = self.out_path + for k, v in vars.iteritems(): + out_path = out_path.replace(k, v) + + with open(out_path, 'w') as f: + f.write(tpl) + + +dir_path = os.path.dirname(os.path.realpath(__file__)) + +deps_resolver = HomebrewPhpV8(dir_path +'/php-v8.rb.in', dir_path + '/php{{ PHP_VERSION }}-v8.rb') +deps_resolver.generate(args.version, args.libv8_version, ['70', '71']) diff --git a/scripts/homebrew/load_deps.py b/scripts/homebrew/load_deps.py index f9792e1..eb5d7ce 100755 --- a/scripts/homebrew/load_deps.py +++ b/scripts/homebrew/load_deps.py @@ -2,24 +2,24 @@ import sys import os +import argparse parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) os.sys.path.insert(0, parentdir) import deps -if len(sys.argv) != 2: - # print("Usage: %s " % sys.argv[0]) - print("Usage: %s " % sys.argv[0]) - exit(1) +parser = argparse.ArgumentParser() +parser.add_argument('--use-orig-repo', action='store_true', help='Use original repo rather then github mirror (use at your own risk)') +parser.add_argument('version', help='V8 version to build') +args = parser.parse_args() -version = sys.argv[1] -deps_loader = deps.V8DepsRemoteFileLoader(version) +deps_loader = deps.V8DepsRemoteFileLoader(args.version) deps_content = deps_loader.load() dir_path = os.path.dirname(os.path.realpath(__file__)) -deps_resolver = deps.HomebrewDepsResolver(deps_content, version, dir_path +'/v8.rb.in', dir_path + '/v8.rb') +deps_resolver = deps.HomebrewDepsResolver(deps_content, args.version, dir_path +'/v8.rb.in', dir_path + '/v8.rb') -deps_resolver.import_deps_fast() +deps_resolver.import_deps_fast(args.use_orig_repo) diff --git a/scripts/homebrew/php-v8.rb.in b/scripts/homebrew/php-v8.rb.in new file mode 100644 index 0000000..f257e3c --- /dev/null +++ b/scripts/homebrew/php-v8.rb.in @@ -0,0 +1,29 @@ +require "/usr/local/Library/Taps/homebrew/homebrew-php/Abstract/abstract-php-extension" + +class Php{{ PHP_VERSION }}V8 < AbstractPhp71Extension + init + desc "PHP extension for V8 JavaScript engine" + homepage "https://github.com/pinepain/php-v8" + {{ URL }} + {{ SHA256 }} + head "https://github.com/pinepain/php-v8.git" + + bottle do + end + + {{ LIBV8_DEPENDENCY }} + + # NOTE: this dependency is not valid as it takes core homebrew v8 formula, while own v8 already installed. + # It looks like vanilla v8 should be managed in a way like with PPA: libv8-x.y + #depends_on "v8" + + def install + ENV.universal_binary if build.universal? + + safe_phpize + system "./configure", "--prefix=#{prefix}", phpconfig + system "make" + prefix.install "modules/v8.so" + write_config_file if build.with? "config-file" + end +end diff --git a/scripts/homebrew/php70-v8.rb b/scripts/homebrew/php70-v8.rb new file mode 100644 index 0000000..c1bf8fd --- /dev/null +++ b/scripts/homebrew/php70-v8.rb @@ -0,0 +1,29 @@ +require "/usr/local/Library/Taps/homebrew/homebrew-php/Abstract/abstract-php-extension" + +class Php70V8 < AbstractPhp71Extension + init + desc "PHP extension for V8 JavaScript engine" + homepage "https://github.com/pinepain/php-v8" + url "https://github.com/pinepain/php-v8/archive/v0.1.0.tar.gz" + sha256 "b203da5b7fc72ef0cd71af26b409e2a1977c7e9a1c48648b33882c325ab755a3" + head "https://github.com/pinepain/php-v8.git" + + bottle do + end + + # NOTE: This formula depends on libv8, but actual "depends_on" dependency is not set yet + + # NOTE: this dependency is not valid as it takes core homebrew v8 formula, while own v8 already installed. + # It looks like vanilla v8 should be managed in a way like with PPA: libv8-x.y + #depends_on "v8" + + def install + ENV.universal_binary if build.universal? + + safe_phpize + system "./configure", "--prefix=#{prefix}", phpconfig + system "make" + prefix.install "modules/v8.so" + write_config_file if build.with? "config-file" + end +end diff --git a/scripts/homebrew/php71-v8.rb b/scripts/homebrew/php71-v8.rb new file mode 100644 index 0000000..c7f3196 --- /dev/null +++ b/scripts/homebrew/php71-v8.rb @@ -0,0 +1,29 @@ +require "/usr/local/Library/Taps/homebrew/homebrew-php/Abstract/abstract-php-extension" + +class Php71V8 < AbstractPhp71Extension + init + desc "PHP extension for V8 JavaScript engine" + homepage "https://github.com/pinepain/php-v8" + url "https://github.com/pinepain/php-v8/archive/v0.1.0.tar.gz" + sha256 "b203da5b7fc72ef0cd71af26b409e2a1977c7e9a1c48648b33882c325ab755a3" + head "https://github.com/pinepain/php-v8.git" + + bottle do + end + + # NOTE: This formula depends on libv8, but actual "depends_on" dependency is not set yet + + # NOTE: this dependency is not valid as it takes core homebrew v8 formula, while own v8 already installed. + # It looks like vanilla v8 should be managed in a way like with PPA: libv8-x.y + #depends_on "v8" + + def install + ENV.universal_binary if build.universal? + + safe_phpize + system "./configure", "--prefix=#{prefix}", phpconfig + system "make" + prefix.install "modules/v8.so" + write_config_file if build.with? "config-file" + end +end diff --git a/scripts/homebrew/v8.rb b/scripts/homebrew/v8.rb index 106bbec..567095d 100644 --- a/scripts/homebrew/v8.rb +++ b/scripts/homebrew/v8.rb @@ -1,11 +1,12 @@ # Track Chrome stable. # https://omahaproxy.appspot.com/ +# This formula is auto-generated by load_deps.py script. Do not edit it manually. class V8 < Formula desc "Google's JavaScript engine" homepage "https://code.google.com/p/v8/" - url "https://chromium.googlesource.com/v8/v8.git/+archive/5.4.420.tar.gz" - sha256 "b62a9735443cc391c3404eaa0480de40cc0d72ae0645704b5f9c261e42ef8dfc" - head "https://chromium.googlesource.com/v8/v8.git" + url "https://github.com/v8/v8/archive/5.4.420.tar.gz" + sha256 "14f430e99f695ea632b60c946b222bfeac383ce7d205759530bc062cc58b565a" + head "https://github.com/v8/v8.git" bottle do cellar :any diff --git a/scripts/homebrew/v8.rb.in b/scripts/homebrew/v8.rb.in index 04de2dd..9aed446 100644 --- a/scripts/homebrew/v8.rb.in +++ b/scripts/homebrew/v8.rb.in @@ -6,7 +6,7 @@ class V8 < Formula homepage "https://code.google.com/p/v8/" {{ URL }} {{ SHA256 }} - head "https://chromium.googlesource.com/v8/v8.git" + {{ HEAD }} bottle do cellar :any diff --git a/scripts/ppa-packaging/libv8/debian/control b/scripts/ppa-packaging/libv8/debian/control index bffc0b1..0020fb0 100644 --- a/scripts/ppa-packaging/libv8/debian/control +++ b/scripts/ppa-packaging/libv8/debian/control @@ -1,40 +1,21 @@ Source: libv8-5.4 Priority: optional -Maintainer: Debian Javascript Maintainers -Uploaders: Jérémy Lal , - Jonas Smedegaard +Maintainer: Bogdan Padalko Build-Depends: cdbs, - autotools-dev, devscripts, debhelper, dh-buildinfo, - libicu-dev, - abi-compliance-checker -Standards-Version: 3.9.6 + libicu-dev +Standards-Version: 3.9.8 Section: libs -Homepage: http://code.google.com/p/v8/ -Vcs-Browser: http://anonscm.debian.org/git/collab-maint/libv8.git -Vcs-Git: git://anonscm.debian.org/collab-maint/libv8.git - -Package: libv8-dev -Section: libdevel -Architecture: i386 kfreebsd-i386 hurd-i386 amd64 kfreebsd-amd64 armel armhf mipsel mips -Depends: libv8-5.4.420 (= ${binary:Version}), ${misc:Depends} -Conflicts: libv8-legacy-dev, libv8-3.14-dev -Replaces: libv8-legacy-dev, libv8-3.14-dev -Description: V8 JavaScript engine - development files for latest branch - V8 is a high performance JavaScript engine written in C++. It is used - in the web browser Chromium. - . - This package provide development headers for latest V8 branch. +Homepage: https://developers.google.com/v8/ +Vcs-Browser: https://github.com/pinepain/php-v8 +Vcs-Git: https://github.com/pinepain/php-v8.git Package: libv8-5.4-dev Section: libdevel Architecture: i386 kfreebsd-i386 hurd-i386 amd64 kfreebsd-amd64 armel armhf mipsel mips Depends: libv8-5.4.420 (= ${binary:Version}), ${misc:Depends} -Provides: libv8-legacy-dev, libv8-dev -Conflicts: libv8-dev -Replaces: libv8-dev Description: V8 JavaScript engine - development files for 5.4 branch V8 is a high performance JavaScript engine written in C++. It is used in the web browser Chromium. diff --git a/scripts/ppa-packaging/libv8/debian/control.in b/scripts/ppa-packaging/libv8/debian/control.in index 62a2664..8372d52 100644 --- a/scripts/ppa-packaging/libv8/debian/control.in +++ b/scripts/ppa-packaging/libv8/debian/control.in @@ -1,36 +1,18 @@ Source: libv8-5.4 Priority: optional -Maintainer: Debian Javascript Maintainers -Uploaders: Jérémy Lal , - Jonas Smedegaard +Maintainer: Bogdan Padalko Build-Depends: @cdbs@, - libicu-dev, - abi-compliance-checker -Standards-Version: 3.9.6 + libicu-dev +Standards-Version: 3.9.8 Section: libs -Homepage: http://code.google.com/p/v8/ -Vcs-Browser: http://anonscm.debian.org/git/collab-maint/libv8.git -Vcs-Git: git://anonscm.debian.org/collab-maint/libv8.git - -Package: libv8-dev -Section: libdevel -Architecture: i386 kfreebsd-i386 hurd-i386 amd64 kfreebsd-amd64 armel armhf mipsel mips -Depends: libv8-5.4.420 (= ${binary:Version}), ${misc:Depends} -Conflicts: libv8-legacy-dev, libv8-3.14-dev -Replaces: libv8-legacy-dev, libv8-3.14-dev -Description: V8 JavaScript engine - development files for latest branch - V8 is a high performance JavaScript engine written in C++. It is used - in the web browser Chromium. - . - This package provide development headers for latest V8 branch. +Homepage: https://developers.google.com/v8/ +Vcs-Browser: https://github.com/pinepain/php-v8 +Vcs-Git: https://github.com/pinepain/php-v8.git Package: libv8-5.4-dev Section: libdevel Architecture: i386 kfreebsd-i386 hurd-i386 amd64 kfreebsd-amd64 armel armhf mipsel mips Depends: libv8-5.4.420 (= ${binary:Version}), ${misc:Depends} -Provides: libv8-legacy-dev, libv8-dev -Conflicts: libv8-dev -Replaces: libv8-dev Description: V8 JavaScript engine - development files for 5.4 branch V8 is a high performance JavaScript engine written in C++. It is used in the web browser Chromium. diff --git a/scripts/ppa-packaging/libv8/debian/control.in.in b/scripts/ppa-packaging/libv8/debian/control.in.in index b4b7e72..d5f6cd1 100644 --- a/scripts/ppa-packaging/libv8/debian/control.in.in +++ b/scripts/ppa-packaging/libv8/debian/control.in.in @@ -6,8 +6,8 @@ Build-Depends: @cdbs@, Standards-Version: 3.9.8 Section: libs Homepage: https://developers.google.com/v8/ -Vcs-Browser: https://github.com/pinepain/ppa-packaging -Vcs-Git: https://github.com/pinepain/ppa-packaging.git +Vcs-Browser: https://github.com/pinepain/php-v8 +Vcs-Git: https://github.com/pinepain/php-v8.git Package: libv8-__API__-dev Section: libdevel diff --git a/scripts/ppa-packaging/package.xml b/scripts/ppa-packaging/package.xml new file mode 100644 index 0000000..1285556 --- /dev/null +++ b/scripts/ppa-packaging/package.xml @@ -0,0 +1,7 @@ + + + NAME + + VERSION + + diff --git a/scripts/ppa-packaging/packaging-pecl.mk b/scripts/ppa-packaging/packaging-pecl.mk new file mode 100644 index 0000000..4897e60 --- /dev/null +++ b/scripts/ppa-packaging/packaging-pecl.mk @@ -0,0 +1,112 @@ +# PPA archive +#PPA=ppa:username/ppa-name + +# List of target distributions +DISTROS=trusty wily xenial + +DEBUILD=debuild -S + +all: _phony + +_phony: + +distro: work/${NAME}_${VERSION} + +PECL_FULL_NAME=${PECL_NAME}-${VERSION} + +work/${NAME}_${VERSION}: + \ + mkdir work || true ; \ + cd work ; \ + mkdir ${NAME}_${VERSION} || true ; \ + cd ${NAME}_${VERSION} ; \ + if test -z "${GIT_FAST}"; then \ + git clone "${GIT_URL}" "${PECL_FULL_NAME}" ; \ + cd "${PECL_FULL_NAME}" ; \ + git fetch origin "${GIT_VERSION}"; \ + git checkout "${GIT_VERSION}" ; \ + else \ + git clone --depth=1 --branch="${GIT_VERSION}" "${GIT_URL}" "${PECL_FULL_NAME}" ; \ + cd "${PECL_FULL_NAME}" ; \ + fi; \ + \ + git submodule init ; git submodule update; \ + \ + if test -n "${GIT_POST_HOOK}"; then \ + ../../../${GIT_POST_HOOK} ${GIT_VERSION}; \ + fi; \ + \ + cd .. ; \ + cp ../../../package.xml package.xml ;\ + sed -i -e "s/NAME/${PECL_NAME}/g" package.xml ; \ + sed -i -e "s/VERSION/${VERSION}/g" package.xml ; \ + cd .. ; \ + tar --exclude .git --exclude '*.pyc' -cf - ${NAME}_${VERSION} | gzip -n9c > ${NAME}_${VERSION}.orig.tar.gz + +source-build: + $(MAKE) _build DEBUILD="debuild -S -sa" + +source-clean: + DEB_MAINTAINER_MODE=1 debuild clean + +build: + $(MAKE) _build DEBUILD=debuild + +install: build + sudo dpkg -i work/*.deb + +_build: distro + \ +if test -z "$$DEBEMAIL" -o -z "$$DEBFULLNAME"; then \ + echo "DEBFULLNAME and DEBEMAIL environmental variable should be set" ; \ + echo "For example:" ; \ + echo "export DEBEMAIL=\"my@emailaddress.com\"" ; \ + echo "export DEBFULLNAME=\"Full Name\"" ;\ + exit 1; \ +fi + \ +cd "work/${NAME}_${VERSION}" ; \ +for distro in ${DISTROS}; do \ + NEW_VER="${VERSION}-ppa${PPA_VERSION}~$$distro"; \ + rm -Rf debian ; cp -r ../../debian . ; \ + sed -i -e "s/DISTRO/$$distro/g" debian/changelog ; \ + for file in debian/*.$$distro; do \ + if [ -f $$file ]; then \ + rename -f "s/\.$$distro$$//" $$file ; \ + fi ; \ + done ; \ + CUR_NAME=`dpkg-parsechangelog | grep '^Source: ' | awk '{print $$2}'`; \ + CUR_VER=`dpkg-parsechangelog | grep '^Version: ' | awk '{print $$2}'`; \ + if dpkg --compare-versions $$NEW_VER gt $$CUR_VER; then \ + echo "New version. Will update changelog and build source package" ; \ + dch -v $$NEW_VER --package="${NAME}" -D $$distro --force-distribution \ + "New version based on ${GIT_VERSION} (${GIT_URL})" ; \ + DEB_MAINTAINER_MODE=1 debuild clean ; \ + else \ + if dpkg --compare-versions $$NEW_VER ne $$CUR_VER; then \ + echo "ERROR: Cannot rebuild source package, because new version is earlier \ +than the one specified in changelog ($$NEW_VER < $$CUR_VER)" ; \ + exit 1; \ + fi ; \ + echo "Same version, just rebuild source package" ; \ + fi ; \ + ${DEBUILD} ; \ +done + +dput: source-build + \ +cd "work" ; \ +for distro in ${DISTROS}; do \ + dput -f "${PPA}" "${NAME}_${VERSION}-ppa${PPA_VERSION}~$$distro""_source.changes" ; \ +done ; \ +\ +cd .. ; \ +NEW_VER="${VERSION}-ppa${PPA_VERSION}~DISTRO"; \ +CUR_VER=`dpkg-parsechangelog | grep '^Version: ' | awk '{print $$2}'`; \ +if dpkg --compare-versions $$NEW_VER gt $$CUR_VER; then \ + dch -v $$NEW_VER --package="${NAME}" -D DISTRO --force-distribution \ + "New version based on ${GIT_VERSION} (${GIT_URL})" ; \ +fi + +clean: + @rm -Rf work diff --git a/scripts/ppa-packaging/packaging.mk b/scripts/ppa-packaging/packaging.mk index 21d85c8..82641a7 100644 --- a/scripts/ppa-packaging/packaging.mk +++ b/scripts/ppa-packaging/packaging.mk @@ -5,7 +5,6 @@ DISTROS=trusty wily xenial DEBUILD=debuild -S -DEBUILD="echo ok" all: _phony @@ -39,6 +38,9 @@ work/${NAME}_${VERSION}: source-build: $(MAKE) _build DEBUILD="debuild -S -sa" +source-clean: + DEB_MAINTAINER_MODE=1 debuild clean + build: $(MAKE) _build DEBUILD=debuild diff --git a/scripts/ppa-packaging/php-v8/debian/changelog b/scripts/ppa-packaging/php-v8/debian/changelog new file mode 100644 index 0000000..cd18ed0 --- /dev/null +++ b/scripts/ppa-packaging/php-v8/debian/changelog @@ -0,0 +1,5 @@ +php-v8 (0.1.0-ppa1~DISTRO) DISTRO; urgency=medium + + * New version based on v0.1.0 (https://github.com/pinepain/php-v8.git) + + -- Bogdan Padalko Sat, 20 Aug 2016 20:18:39 +0000 diff --git a/scripts/ppa-packaging/php-v8/debian/compat b/scripts/ppa-packaging/php-v8/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/scripts/ppa-packaging/php-v8/debian/compat @@ -0,0 +1 @@ +9 diff --git a/scripts/ppa-packaging/php-v8/debian/control b/scripts/ppa-packaging/php-v8/debian/control new file mode 100644 index 0000000..eb15210 --- /dev/null +++ b/scripts/ppa-packaging/php-v8/debian/control @@ -0,0 +1,23 @@ +Source: php-v8 +Section: php +Priority: optional +Maintainer: Bogdan Padalko +Build-Depends: debhelper (>= 9), + dh-php (>= 0.12~), + libv8-5.4-dev (>= 5.4.420), + php-all-dev +Standards-Version: 3.9.8 +Homepage: https://github.com/pinepain/php-v8 +Vcs-Browser: https://github.com/pinepain/php-v8 +Vcs-Git: https://github.com/pinepain/php-v8.git + +Package: php-v8 +Architecture: any +Depends: ${misc:Depends}, + ${php:Depends}, + ${shlibs:Depends} +Provides: ${php:Provides} +Description: PHP extension for V8 JavaScript engine + This extension brings V8 JavaScript engine API to PHP with some + abstraction in mind and provides an accurate native V8 C++ API + implementation available from PHP. diff --git a/scripts/ppa-packaging/php-v8/debian/php-v8.php b/scripts/ppa-packaging/php-v8/debian/php-v8.php new file mode 100644 index 0000000..dea6bd3 --- /dev/null +++ b/scripts/ppa-packaging/php-v8/debian/php-v8.php @@ -0,0 +1 @@ +mod debian/v8.ini diff --git a/scripts/ppa-packaging/php-v8/debian/rules b/scripts/ppa-packaging/php-v8/debian/rules new file mode 100755 index 0000000..d2b1a8c --- /dev/null +++ b/scripts/ppa-packaging/php-v8/debian/rules @@ -0,0 +1,3 @@ +#!/usr/bin/make -f +DH_PHP_VERSIONS_OVERRIDE=7.0 7.1 +include /usr/share/dh-php/pkg-pecl.mk diff --git a/scripts/ppa-packaging/php-v8/debian/source/format b/scripts/ppa-packaging/php-v8/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/scripts/ppa-packaging/php-v8/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/scripts/ppa-packaging/php-v8/debian/v8.ini b/scripts/ppa-packaging/php-v8/debian/v8.ini new file mode 100644 index 0000000..1a0d894 --- /dev/null +++ b/scripts/ppa-packaging/php-v8/debian/v8.ini @@ -0,0 +1,2 @@ +; configuration for php v8 module +extension=v8.so