summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames An2018-03-17 06:03:53 -0400
committerJames An2018-03-17 06:03:53 -0400
commitf07541a71fbb52492d732f614d35d4bfffed2961 (patch)
tree531ea7a9f5cecbbb04858798e29637af76862c08
parentf6ea51850fd28b0e55a2a4f62fa54ff405f25b54 (diff)
downloadaur-f07541a71fbb52492d732f614d35d4bfffed2961.tar.gz
Updated to latest upstream release and added composer to manage dependencies.
Changed PKGBUILD to build phar archive from source using the upstream box.json file.
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD40
-rw-r--r--box.json19
3 files changed, 53 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 09d404865c4c..771af395f255 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,17 @@
pkgbase = php-behat
pkgdesc = An open source behavior-driven development framework for PHP 5.3 and 5.4
- pkgver = 3.0.15
+ pkgver = 3.4.3
pkgrel = 1
url = http://behat.org
arch = any
license = MIT
+ makedepends = composer
+ makedepends = php-box
depends = php
- source = https://github.com/downloads/Behat/Behat/behat.phar
- source = https://raw.githubusercontent.com/Behat/Behat/master/LICENSE
- md5sums = f0c9117837449fbfcfd32840a7bb66d4
- md5sums = bb73430c2c40651766d639dd4bf7f9e7
+ source = https://github.com/Behat/Behat/archive/v3.4.3.tar.gz
+ source = https://raw.githubusercontent.com/Behat/Behat/v3.4.3/box.json
+ md5sums = 975a437b022f6e58704f03d7ed714052
+ md5sums = 4fbe3a7e61f9e10e2beecd872bdb34a9
pkgname = php-behat
diff --git a/PKGBUILD b/PKGBUILD
index 84cc2afe3f05..04554dea7d52 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,38 @@
# Maintainer: James An <james@jamesan.ca>
-_pkgname=behat
-pkgname="php-$_pkgname"
-pkgver=3.0.15
+pkgname="php-behat"
+_pkgname=${pkgname#php-}
+pkgver=3.4.3
pkgrel=1
pkgdesc='An open source behavior-driven development framework for PHP 5.3 and 5.4'
arch=('any')
url="http://$_pkgname.org"
license=('MIT')
depends=('php')
-source=(
- "https://github.com/downloads/${_pkgname^}/${_pkgname^}/$_pkgname.phar"
- "https://raw.githubusercontent.com/${_pkgname^}/${_pkgname^}/master/LICENSE"
-)
-md5sums=('f0c9117837449fbfcfd32840a7bb66d4'
- 'bb73430c2c40651766d639dd4bf7f9e7')
+makedepends=('composer' 'php-box')
+source=("https://github.com/${_pkgname^}/${_pkgname^}/archive/v$pkgver.tar.gz"
+ "https://raw.githubusercontent.com/${_pkgname^}/${_pkgname^}/v$pkgver/box.json")
+md5sums=('975a437b022f6e58704f03d7ed714052'
+ '4fbe3a7e61f9e10e2beecd872bdb34a9')
+
+prepare() {
+ cd "${_pkgname^}-$pkgver"
+
+ composer install --no-dev --prefer-dist --optimize-autoloader
+ cp ../box.json .
+}
+
+build() {
+ cd "${_pkgname^}-$pkgver"
+
+ php -dphar.readonly=0 /usr/bin/php-box build
+}
package() {
- install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- install -D -m755 "$_pkgname.phar" "${pkgdir}/usr/share/webapps/bin/$_pkgname.phar"
- install -d "${pkgdir}/usr/bin"
- ln -s "/usr/share/webapps/bin/$_pkgname.phar" "${pkgdir}/usr/bin/$_pkgname"
+ cd "${_pkgname^}-$pkgver"
+
+ install -D -m644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -D -m755 "$_pkgname.phar" "$pkgdir/usr/share/webapps/bin/$pkgname.phar"
+ install -d "${pkgdir}/usr/bin"
+ ln -s "/usr/share/webapps/bin/$pkgname.phar" "$pkgdir/usr/bin/$_pkgname"
}
diff --git a/box.json b/box.json
new file mode 100644
index 000000000000..63118b841217
--- /dev/null
+++ b/box.json
@@ -0,0 +1,19 @@
+{
+ "chmod": "0755",
+ "directories": ["src"],
+ "files": [
+ "LICENSE",
+ "i18n.php"
+ ],
+ "finder": [
+ {
+ "name": ["*.php", "*.xsd", "LICENSE"],
+ "exclude": ["Tests", "tests", "sebastian", "phpunit", "phpspec", "process", "filesystem"],
+ "in": "vendor"
+ }
+ ],
+ "compactors": "Herrera\\Box\\Compactor\\Php",
+ "main": "bin/behat",
+ "output": "behat.phar",
+ "stub": true
+}