blob: 9b500b8610d41e0b88f61e9df2d9bbd4edc9ac02 (
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
|
# Maintainer: Jonathan Neidel <aur@jneidel.com>
pkgname=phpactor
pkgver="2024.11.05.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=("4bd527c2733dbf50c18db4a87d0f5c1f62e246efcaa0d399d0d3ca00af20a93e")
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"
}
|