Raman Shukhau: 1 testing/php-ssh2: new aport 2 files changed, 34 insertions(+), 0 deletions(-)
Copy & paste the following snippet into your terminal to import this patchset into git:
curl -s https://lists.alpinelinux.org/~alpine/aports/patches/1124/mbox | git am -3Learn more about email & git
From: roman-shuhov <roman.shuhov@gmail.com> http://pecl.php.net/package/ssh2 SSH2 extension for PHP
Francesco Colista <fcolista@alpinelinux.org>Hello Raman, thanks for your contribution. Patch applies, but package does not build because libssh2-dev is missing. Besides that, there are some aspects that can be improved. Please see the inline comments:
--- testing/php-ssh2/APKBUILD | 33 +++++++++++++++++++++++++++++++++ testing/php-ssh2/ssh2.ini | 1 + 2 files changed, 34 insertions(+) create mode 100644 testing/php-ssh2/APKBUILD create mode 100644 testing/php-ssh2/ssh2.ini diff --git a/testing/php-ssh2/APKBUILD b/testing/php-ssh2/APKBUILD new file mode 100644 index 0000000..82527bd --- /dev/null +++ b/testing/php-ssh2/APKBUILD @@ -0,0 +1,33 @@ +# Contributor: Raman Shukhau <roman.shuhov@gmail.com> +# Maintainer: Raman Shukhau <roman.shuhov@gmail.com> +pkgname=php-ssh2 +pkgver=0.12 +pkgrel=0 +pkgdesc="PHP SSH2 extension" +url="http://pecl.php.net/package/ssh2" +arch="all" +license="PHP" +depends="php" +depends_dev="php-dev autoconf" +makedepends="$depends_dev" +subpackages="" +source="http://pecl.php.net/get/ssh2-0.12.tgz ssh2.ini"
Francesco Colista <fcolista@alpinelinux.org>Rather than using static name and version, is better to use variables. In this way, it's enough to change the package version only in one place. Specifically > pkgname=php-ssh2 > pkgver=0.12 This two variables can be used in the source entry. Just pay attention that the package is called "php-ssh2", while the link is ssh2. This can be also "optimized" by using: _pkgname=${pkgname/*-/} In this way, you can have the source file like: > +source="http://pecl.php.net/get/$_pkgname-$pkgver.tgz ssh2.ini"
+ +build() { + cd "$srcdir/ssh2-$pkgver"
Francesco Colista <fcolista@alpinelinux.org>This can be improved by using _builddir variable, by setting: _builddir = "$srcdir/"/$_pkgname-$pkgver and then in build() and prepare() function you can simply put: cd $_builddir Can you please resend the patch with the correct dependencies? Thanks! -- :: Francesco Colista :: Alpine Linux Infrstraucture :: http://www.alpinelinux.org --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---
+ phpize || return 1 + ./configure || return 1 + make || return 1 +} + +package() { + cd "$srcdir/ssh2-$pkgver" + make INSTALL_ROOT=$pkgdir install || return 1 + install -D -m644 "$srcdir"/ssh2.ini "$pkgdir"/etc/php/conf.d/ssh2.ini +} +md5sums="409b91678a842bb0ff56f2cf018b9160 ssh2-0.12.tgz +94d148ee907a13becea363a39e327ef6 ssh2.ini" +sha256sums="600c82d2393acf3642f19914f06a7afea57ee05cb8c10e8a5510b32188b97f99 ssh2-0.12.tgz +79f7d1777182b9a2059ad312a668221a4d944eec4fa289c53779d059edbf5ac5 ssh2.ini" +sha512sums="e48f8051f9234841bb0fc10594dcd90badf2d880d75c4bd59f847e3d4276e9fdd3fe71c1c01c07fb9f552cec470f3dbac6ae1db4d33e5793d3988ea5bac1d5bd ssh2-0.12.tgz +f5a03262770f4a65f2f85595b81e20da0f94fcabee2a89557a2a6777fd5d336de9d0b00bb533072338155d30ac521934c356145cb06fbcb1b78c7ed9678809c8 ssh2.ini" diff --git a/testing/php-ssh2/ssh2.ini b/testing/php-ssh2/ssh2.ini new file mode 100644 index 0000000..6b14d51 --- /dev/null +++ b/testing/php-ssh2/ssh2.ini @@ -0,0 +1 @@ +extension=ssh2.so -- 2.1.0 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---
Francesco Colista <fcolista@alpinelinux.org>Il 2015-09-05 20:31 Raman Shukhau ha scritto: