aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2018-11-20 10:51:52 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2018-11-20 10:54:11 +0000
commita53f5fcadef433d30abf5adcd0783dda6dc404ad (patch)
treeb2b2a1ad072090e6544a1365d5ec7405b8b78534
parent431eea43cfa4d1d90aff3cbcc99227f645687363 (diff)
downloadaports-a53f5fcadef433d30abf5adcd0783dda6dc404ad.tar.bz2
aports-a53f5fcadef433d30abf5adcd0783dda6dc404ad.tar.xz
testing/speedtest: improve APKBUILD
- Correct license - Install a default test and move the others into a subpkg - Add depends
-rw-r--r--testing/speedtest/APKBUILD33
1 files changed, 23 insertions, 10 deletions
diff --git a/testing/speedtest/APKBUILD b/testing/speedtest/APKBUILD
index b234628044..ce8fe67738 100644
--- a/testing/speedtest/APKBUILD
+++ b/testing/speedtest/APKBUILD
@@ -1,25 +1,38 @@
-# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+_php=php7
pkgname=speedtest
pkgver=4.6.2
-pkgrel=0
-pkgdesc="Self-hosted HTML5 Speedtest."
+pkgrel=1
+pkgdesc="Self-hosted HTML5 Speedtest"
url="http://speedtest.fdossena.com"
arch="noarch"
-options="!check"
-license="LGPL"
+license="LGPL-3.0-only"
+depends="$_php"
+subpackages="$pkgname-doc $pkgname-examples"
source="$pkgname-$pkgver.tar.gz::https://github.com/adolfintel/speedtest/archive/$pkgver.tar.gz"
-builddir="$srcdir/$pkgname-$pkgver"
+options="!check" # no test suite
+builddir="$srcdir"/$pkgname-$pkgver
+
+_destdir="/usr/share/webapps/$pkgname"
+_docdir="/usr/share/doc/$pkgname"
+
build() {
- cd "$builddir"
return 0
}
package() {
- cd "$builddir"
- mkdir -p "$pkgdir"/usr/share/webapps/$pkgname
- cp -r "$builddir"/* "$pkgdir"/usr/share/webapps/$pkgname
+ mkdir -p "$pkgdir"/$_destdir "$pkgdir"/$_docdir
+ mv *.md "$pkgdir"/$_docdir
+ mv garbage.php getIP.php empty.php speedtest_worker.min.js speedtest_worker.js \
+ "$pkgdir"/$_destdir
+ mv example-gauges.html "$pkgdir"/$_destdir/index.html
+}
+
+examples() {
+ mkdir -p "$subpkgdir"/$_destdir
+ mv "$builddir"/example* "$subpkgdir"/$_destdir
}
sha512sums="24fef6d9e9b9428e145ac564a66effdfbd84630a9183cb5e1c568ec8bd18d3577920c7ba631103a2c3f27f35cd4e2637b0c2598d61b1afe40642f58a447b5bd4 speedtest-4.6.2.tar.gz"