diff options
| author | Shulhan <ms@kilabit.info> | 2022-08-19 00:45:02 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-08-19 01:01:19 +0700 |
| commit | 9b370e0e7fe8ec89bd588ae23a4223428383b814 (patch) | |
| tree | 73588ab68b6701f98b2f22d336cadb49b5746b25 | |
| parent | 7e7c491d186280ddaee508bd46ade6fa21058c78 (diff) | |
| download | haminer-9b370e0e7fe8ec89bd588ae23a4223428383b814.tar.xz | |
_AUR: add package build for Arch Linux
| -rw-r--r-- | .gitignore | 4 | ||||
| -rw-r--r-- | .reuse/dep5 | 4 | ||||
| -rw-r--r-- | _AUR/.SRCINFO | 14 | ||||
| -rw-r--r-- | _AUR/Makefile | 10 | ||||
| -rw-r--r-- | _AUR/PKGBUILD | 47 | ||||
| -rw-r--r-- | cmd/haminer/haminer.service | 4 |
6 files changed, 81 insertions, 2 deletions
@@ -2,5 +2,9 @@ ## SPDX-License-Identifier: GPL-3.0-or-later *.html +/_AUR/*.tar.zst +/_AUR/haminer-git +/_AUR/pkg +/_AUR/src /cover.out /haminer diff --git a/.reuse/dep5 b/.reuse/dep5 index 060156a..42b83d0 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -3,6 +3,10 @@ Upstream-Name: haminer Upstream-Contact: Shulhan <ms@kilabit.info> Source: https://git.sr.ht/~shulhan/haminer +Files: _AUR/* +Copyright: 2022 Shulhan <ms@kilabit.info> +License: GPL-3.0-or-later + Files: testdata/* Copyright: 2019 Shulhan <ms@kilabit.info> License: GPL-3.0-or-later diff --git a/_AUR/.SRCINFO b/_AUR/.SRCINFO new file mode 100644 index 0000000..ce40bd1 --- /dev/null +++ b/_AUR/.SRCINFO @@ -0,0 +1,14 @@ +pkgbase = haminer-git + pkgdesc = Library and program to parse and forward HAProxy logs. + pkgver = 0.1.0.r17.g7e7c491 + pkgrel = 1 + url = https://git.sr.ht/~shulhan/haminer + arch = x86_64 + license = GPL3 + makedepends = go + makedepends = git + provides = haminer + source = haminer-git::git+https://git.sr.ht/~shulhan/haminer + md5sums = SKIP + +pkgname = haminer-git diff --git a/_AUR/Makefile b/_AUR/Makefile new file mode 100644 index 0000000..8def7c2 --- /dev/null +++ b/_AUR/Makefile @@ -0,0 +1,10 @@ +## SPDX-FileCopyrightText: 2022 M. Shulhan <ms@kilabit.info> +## SPDX-License-Identifier: GPL-3.0-or-later + +.PHONY: all release + +all: + makepkg -s + +release: + makepkg --printsrcinfo > .SRCINFO diff --git a/_AUR/PKGBUILD b/_AUR/PKGBUILD new file mode 100644 index 0000000..1e5c1c4 --- /dev/null +++ b/_AUR/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: shulhan <ms@kilabit.info> + +pkgname=haminer-git +pkgver=0.1.0.r17.g7e7c491 +pkgrel=1 + +pkgdesc="Library and program to parse and forward HAProxy logs." +arch=(x86_64) +url='https://git.sr.ht/~shulhan/haminer' +license=('GPL3') + +makedepends=( + 'go' + 'git' +) + +provides=('haminer') + +source=( + "$pkgname::git+https://git.sr.ht/~shulhan/haminer" + #"$pkgname::git+file:///home/ms/go/src/git.sr.ht/~shulhan/haminer" +) +md5sums=( + 'SKIP' +) + +backup=( + 'etc/haminer.conf' +) + +pkgver() { + cd "$pkgname" + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "$pkgname" + make +} + +package() { + cd "$pkgname" + install -Dm644 ./cmd/haminer/haminer.conf $pkgdir/etc/haminer.conf + install -Dm755 ./haminer $pkgdir/usr/bin/haminer + install -Dm644 ./cmd/haminer/haminer.service $pkgdir/usr/lib/systemd/system/haminer.service + install -Dm644 COPYING $pkgdir/usr/share/licenses/haminer/COPYING +} diff --git a/cmd/haminer/haminer.service b/cmd/haminer/haminer.service index 3275b6d..dd1bcd7 100644 --- a/cmd/haminer/haminer.service +++ b/cmd/haminer/haminer.service @@ -6,9 +6,9 @@ Description=haminer After=syslog.target network.target [Service] -ExecStart=/usr/local/bin/haminer -User=centos +ExecStart=/usr/bin/haminer Restart=always +RestartSec=5s [Install] WantedBy=multi-user.target |
