Mail archive
alpine-aports

Re: [alpine-aports] [PATCH] testing/php-ssh2: new aport

From: Francesco Colista <fcolista_at_alpinelinux.org>
Date: Mon, 07 Sep 2015 10:15:56 +0200

Il 2015-09-05 20:31 Raman Shukhau ha scritto:
> From: roman-shuhov <roman.shuhov_at_gmail.com>
>
> http://pecl.php.net/package/ssh2
> SSH2 extension for PHP

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:

> +source="http://pecl.php.net/get/ssh2-0.12.tgz ssh2.ini"

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"


> + cd "$srcdir/ssh2-$pkgver"

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_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Sep 07 2015 - 10:15:56 GMT