summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormoson-mo2020-12-31 17:53:20 +0100
committermoson-mo2020-12-31 17:53:20 +0100
commita168813f411b52a87e61da9990b0d05e9eb42b6c (patch)
treecfeb975a701b71c5bee2fe2e7979883075c23aeb
downloadaur-a168813f411b52a87e61da9990b0d05e9eb42b6c.tar.gz
Initial commit
-rw-r--r--.SRCINFO13
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD38
3 files changed, 55 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5e59b924af21
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = rpms
+ pkgdesc = Renoir power metrics server
+ pkgver = 1.0.2
+ pkgrel = 1
+ url = https://github.com/moson-mo/rpms
+ arch = x86_64
+ license = MIT
+ makedepends = go
+ source = https://github.com/moson-mo/rpms/archive/v1.0.2.tar.gz
+ sha256sums = d488752a70a73b5db1558cc13607c1ecee7afc273f1787c0184f4099f215fc76
+
+pkgname = rpms
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..31d27563afeb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*
+!.gitignore
+!PKGBUILD
+!.SRCINFO \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2da3350e619e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Mario Oenning <mo-son at mailbox dot org>
+
+pkgname=rpms
+pkgver=1.0.2
+pkgrel=1
+pkgdesc='Renoir power metrics server'
+arch=('x86_64')
+url="https://github.com/moson-mo/$pkgname"
+license=('MIT')
+makedepends=('go')
+source=("$url/archive/v$pkgver.tar.gz")
+sha256sums=('d488752a70a73b5db1558cc13607c1ecee7afc273f1787c0184f4099f215fc76')
+
+prepare(){
+ cd "$pkgname-$pkgver"
+ mkdir -p build/
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath"
+ go build -o build -ldflags "-s -w"
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ install -Dm755 build/$pkgname-$pkgver "$pkgdir"/usr/bin/$pkgname
+ install -m755 -d ${pkgdir}/usr/lib/systemd/system
+ install -m644 assets/$pkgname.service "$pkgdir"/usr/lib/systemd/system
+}
+
+post_install() {
+ systemctl enable --now rpms.service
+} \ No newline at end of file