blob: 9f0f64978a6e43ab2edea8c4a89516f411a837b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# Maintainer: Jonathan Neidel <aur@jneidel.com>
pkgname=phpactor
pkgver="2026.10.07.0"
pkgrel=1
_tmppkgver="${pkgver}"
pkgdesc="PHP completion, refactoring, introspection tool and language server"
arch=(any)
url="https://github.com/phpactor/phpactor"
license=(MIT)
depends=(php)
makedepends=(composer)
optdepends=('composer: faster class location and more features'
'git: faster refactorings in your repository scope')
provides=(phpactor)
source=("https://github.com/phpactor/phpactor/archive/refs/tags/${pkgver}.tar.gz")
sha256sums=("d30869c172cf9279b3e0018cf5fedd51fdb53bd4d36265e9a7233a20c3180baf")
check() {
if ! php -m | grep iconv >/dev/null; then
echo "The iconv extension is not installed for the php installation in use.
See: https://wiki.archlinux.org/title/PHP#Extensions
For the default php enable the extension in /etc/php/conf.d/extensions.ini with:
extension=iconv"
false
fi
}
package() {
cd "$srcdir/${pkgname}-${_tmppkgver}"
LIB_DIRECTORY="$pkgdir/usr/lib/$pkgname"
mkdir -p "$pkgdir/usr/bin" "$LIB_DIRECTORY"
rm -r "$LIB_DIRECTORY" 2>/dev/null
cp -r . "$LIB_DIRECTORY"
export COMPOSER_ALLOW_SUPERUSER=1 # allow su in fakeroot env
composer install --no-interaction --no-dev --optimize-autoloader --working-dir "$LIB_DIRECTORY"
mkdir "$LIB_DIRECTORY/extensions"
chmod 777 "$LIB_DIRECTORY/extensions" # allows to configure internal extensions while running on unpriviledged users
ln -s "/usr/lib/$pkgname/bin/phpactor" "$pkgdir/usr/bin/phpactor"
}
|