mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-24 19:55:26 +03:00
testing/speedtest-go: new aport
This commit is contained in:
parent
88fcb746e0
commit
e2556fbdb6
3 changed files with 72 additions and 0 deletions
31
testing/speedtest-go/APKBUILD
Normal file
31
testing/speedtest-go/APKBUILD
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Contributor: Sean McAvoy <seanmcavoy@gmail.com>
|
||||
# Maintainer: Sean McAvoy <seanmcavoy@gmail.com>
|
||||
pkgname=speedtest-go
|
||||
pkgver=1.1.2
|
||||
pkgrel=0
|
||||
pkgdesc="web page based speed test, written in go"
|
||||
url="https://librespeed.org"
|
||||
arch="all"
|
||||
license="LGPL-3.0-only"
|
||||
makedepends="go"
|
||||
options="!check" # no check suite
|
||||
subpackages="$pkgname-doc $pkgname-openrc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/librespeed/speedtest-go/archive/v$pkgver.tar.gz
|
||||
speedtest-go.initd
|
||||
settings-change.patch"
|
||||
|
||||
build() {
|
||||
go build -ldflags "-w -s" -trimpath -o speedtest main.go
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm755 "$srcdir"/speedtest-go.initd "$pkgdir"/etc/init.d/speedtest-go
|
||||
install -Dm644 settings.toml "$pkgdir"/etc/speedtest-go/settings.toml
|
||||
install -Dm755 speedtest "$pkgdir"/usr/bin/speedtest
|
||||
install -Dm644 -t "$pkgdir"/usr/share/$pkgname/assets assets/*
|
||||
install -Dm644 -t "$pkgdir"/usr/share/doc/$pkgname/ ./*.md
|
||||
}
|
||||
|
||||
sha512sums="fe9f0ec552275c3350a86349d6a4b2ceedee88ab6c43ae5beee30d48f64671c4ec0b87d34cff6fb321ef5d1732f94db6576e5d5287ec36904aa6264120d0e510 speedtest-go-1.1.2.tar.gz
|
||||
197efb6f98bed3a09c1c71e520265b48671c8e4dddabf3f9d7f16e8384e1ef84b800a115d5c656fb47e48d07a92cfe387f2dba5b9801fa03e720f762c6394ff7 speedtest-go.initd
|
||||
f63b3a0a0073693d39a49a406602a88c1127bebe41a6668607ea8fa8adbca51eaeb8e6825fc4ae663516737aaae38d8e95a523914d580713f5da44fc5d2f8be5 settings-change.patch"
|
27
testing/speedtest-go/settings-change.patch
Normal file
27
testing/speedtest-go/settings-change.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
diff --git a/settings.toml b/settings.toml
|
||||
index 8e04b4a2c6..4cfaaf69ae 100644
|
||||
--- a/settings.toml
|
||||
+++ b/settings.toml
|
||||
@@ -11,7 +11,7 @@ server_lng=0
|
||||
ipinfo_api_key=""
|
||||
|
||||
# assets directory path, defaults to `assets` in the same directory
|
||||
-assets_path="./assets"
|
||||
+assets_path="/usr/share/speedtest-go/assets"
|
||||
|
||||
# password for logging into statistics page
|
||||
statistics_password="PASSWORD"
|
||||
@@ -19,11 +19,11 @@ statistics_password="PASSWORD"
|
||||
redact_ip_addresses=false
|
||||
|
||||
# database type for statistics data, currently supports: bolt, mysql, postgresql
|
||||
-database_type="bolt"
|
||||
+database_type=""
|
||||
database_hostname=""
|
||||
database_name=""
|
||||
database_username=""
|
||||
database_password=""
|
||||
|
||||
# if you use `bolt` as database, set database_file to database file location
|
||||
-database_file="speedtest.db"
|
||||
+database_file=""
|
14
testing/speedtest-go/speedtest-go.initd
Normal file
14
testing/speedtest-go/speedtest-go.initd
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
name="speedtest-go"
|
||||
description="HTML5 Speedtest, written in go"
|
||||
|
||||
command="/usr/bin/speedtest"
|
||||
command_args="-c /etc/speedtest-go/settings.toml"
|
||||
command_user="nobody:nobody"
|
||||
command_background="true"
|
||||
pidfile="/var/run/${name}.pid"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue