aboutsummaryrefslogtreecommitdiffstats
path: root/community/php7
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-05-01 20:02:14 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-05-02 01:04:52 +0200
commit3741aecdd90ee7239edb39a64ebfe94a1107c546 (patch)
treed87c06ec40d8547e48dbc2eb626868b132e0e6da /community/php7
parent89cd70e777e2328a6ec7f49b36709ffa9f0d66b2 (diff)
downloadaports-3741aecdd90ee7239edb39a64ebfe94a1107c546.tar.bz2
aports-3741aecdd90ee7239edb39a64ebfe94a1107c546.tar.xz
community/php7: add unsuffixed symlinks for executables in /usr/bin
Diffstat (limited to 'community/php7')
-rw-r--r--community/php7/APKBUILD33
1 files changed, 28 insertions, 5 deletions
diff --git a/community/php7/APKBUILD b/community/php7/APKBUILD
index 2fcb595c3e..8b729efc15 100644
--- a/community/php7/APKBUILD
+++ b/community/php7/APKBUILD
@@ -23,6 +23,8 @@ pkgver=7.1.4
pkgrel=0
_apiver=20160303
_suffix=${pkgname#php}
+# Is this package the default (latest) PHP version?
+_default_php="yes"
pkgdesc="The PHP$_suffix language runtime engine"
url="http://www.php.net/"
arch="all"
@@ -74,6 +76,7 @@ makedepends="
unixodbc-dev
zlib-dev
"
+provides="$pkgname-cli" # for backward compatibility
subpackages="$pkgname-dev $pkgname-doc $pkgname-apache2 $pkgname-phpdbg
$pkgname-embed $pkgname-litespeed $pkgname-cgi $pkgname-fpm
$pkgname-pear::noarch
@@ -373,6 +376,9 @@ package() {
find "$pkgdir" -name '.*' | xargs rm -rf
rmdir "$pkgdir"/var/run
+
+ [ "$_default_php" = yes ] \
+ && ln -s php$_suffix "$pkgdir"/usr/bin/php
}
dev() {
@@ -388,8 +394,10 @@ dev() {
_mv ./$_libdir/build "$subpkgdir"/$_libdir/
- ln -s phpize$_suffix "$subpkgdir"/usr/bin/phpize
- ln -s php-config$_suffix "$subpkgdir"/usr/bin/php-config
+ if [ "$_default_php" = yes ]; then
+ ln -s phpize$_suffix "$subpkgdir"/usr/bin/phpize
+ ln -s php-config$_suffix "$subpkgdir"/usr/bin/php-config
+ fi
}
doc() {
@@ -419,6 +427,9 @@ phpdbg() {
install -Dm755 "$builddir"/sapi/phpdbg/phpdbg \
"$subpkgdir"/usr/bin/phpdbg$_suffix
+
+ [ "$_default_php" = yes ] \
+ && ln -s phpdbg$_suffix "$subpkgdir"/usr/bin/phpdbg
}
embed() {
@@ -432,13 +443,18 @@ litespeed() {
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/lsphp "$subpkgdir"/usr/bin/lsphp$_suffix
+
+ [ "$_default_php" = yes ] \
+ && ln -s lsphp$_suffix "$subpkgdir"/usr/bin/lsphp
}
cgi() {
pkgdesc="PHP$_suffix Common Gateway Interface"
_mv "$pkgdir"/usr/bin/php-cgi$_suffix "$subpkgdir"/usr/bin/
- ln -s php-cgi$_suffix "$subpkgdir"/usr/bin/php-cgi
+
+ [ "$_default_php" = yes ] \
+ && ln -s php-cgi$_suffix "$subpkgdir"/usr/bin/php-cgi
}
fpm() {
@@ -478,6 +494,8 @@ pear() {
mkdir -p "$subpkgdir"/usr/bin
local file; for file in pecl pear peardev; do
mv usr/bin/$file "$subpkgdir"/usr/bin/$file$_suffix
+ [ "$_default_php" = yes ] \
+ && ln -s $file$_suffix "$subpkgdir"/usr/bin/$file
done
_mv etc/$pkgname/pear.conf "$subpkgdir"/etc/$pkgname/
@@ -500,11 +518,16 @@ phar() {
cd "$pkgdir"
- _mv usr/bin/phar.phar \
- "$subpkgdir"/usr/bin/phar.phar$_suffix
+ mkdir -p "$subpkgdir"/usr/bin
+ mv usr/bin/phar.phar "$subpkgdir"/usr/bin/phar.phar$_suffix
rm usr/bin/phar
ln -s phar.phar$_suffix "$subpkgdir"/usr/bin/phar$_suffix
+
+ if [ "$_default_php" = yes ]; then
+ ln -s phar.phar$_suffix "$subpkgdir"/usr/bin/phar.phar
+ ln -s phar.phar$_suffix "$subpkgdir"/usr/bin/phar
+ fi
}
_extension() {