diff options
author | Douglas Chimento | 2022-01-14 14:33:59 +0200 |
---|---|---|
committer | Douglas Chimento | 2022-01-14 14:33:59 +0200 |
commit | 29e08448d7476e18fa7e31c9b21ed1fa71c03df8 (patch) | |
tree | 35d69d9d56334651a1d330118ad0aa7611da9c13 | |
download | aur-29e08448d7476e18fa7e31c9b21ed1fa71c03df8.tar.gz |
initial version
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 28 | ||||
-rw-r--r-- | btc-cirrus-reporter.env | 2 | ||||
-rw-r--r-- | btc-cirrus-reporter.service | 11 |
4 files changed, 59 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..fa3da2f337d2 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = btc-cirrus-reporter + pkgdesc = bitcoin core cirrus reporter + pkgver = db2b312 + pkgrel = 1 + url = https://github.com/pro-bitcoin/cirrus-ci-reporter + arch = any + license = MIT + makedepends = go + makedepends = make + backup = etc/default/btc-cirrus-reporter + source = btc-cirrus-reporter::git+https://github.com/pro-bitcoin/cirrus-ci-reporter.git + source = btc-cirrus-reporter.service + source = btc-cirrus-reporter.env + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + +pkgname = btc-cirrus-reporter diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..bcf339ce577e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,28 @@ +pkgname=btc-cirrus-reporter +pkgver=db2b312 +pkgrel=1 +pkgdesc='bitcoin core cirrus reporter' +arch=('any') +url="https://github.com/pro-bitcoin/cirrus-ci-reporter" +license=('MIT') +makedepends=('go' 'make') +source=("${pkgname}::git+https://github.com/pro-bitcoin/cirrus-ci-reporter.git" "btc-cirrus-reporter.service" "btc-cirrus-reporter.env") +sha256sums=('SKIP' 'SKIP' 'SKIP') +backup=('etc/default/btc-cirrus-reporter') + +pkgver() { + cd "$srcdir/${pkgname}" + git describe --long --tags --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "$pkgname" + make build +} + +package() { + cd "$pkgname" + install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname + install -Dm600 "$srcdir/btc-cirrus-reporter.env" "$pkgdir/etc/default/btc-cirrus-reporter" + install -Dm644 "$srcdir/btc-cirrus-reporter.service" -t "$pkgdir/usr/lib/systemd/system" +} diff --git a/btc-cirrus-reporter.env b/btc-cirrus-reporter.env new file mode 100644 index 000000000000..72fc2aba6073 --- /dev/null +++ b/btc-cirrus-reporter.env @@ -0,0 +1,2 @@ +BTC_CIRRUS_DSN="postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable" +CIRRUS_TOKEN="abc123" diff --git a/btc-cirrus-reporter.service b/btc-cirrus-reporter.service new file mode 100644 index 000000000000..58ab739b4dba --- /dev/null +++ b/btc-cirrus-reporter.service @@ -0,0 +1,11 @@ +[Unit] +Description=bitcoin core cirrus ci reporter +After=postgresql.service + +[Service] +Type=oneshot +EnvironmentFile=/etc/default/btc-cirrus-reporter +ExecStart=/usr/sbin/btc-cirrus-reporter sync --dsn $BTC_CIRRUS_DSN --token $CIRRUS_TOKEN + +[Install] +WantedBy=multi-user.target |