diff options
author | Alexander Pohl | 2023-12-02 19:44:14 +0100 |
---|---|---|
committer | Alexander Pohl | 2023-12-02 19:44:14 +0100 |
commit | b3addba695943747acca310d0a166b4c99b3cabb (patch) | |
tree | 0ee7555df3177111bc5acfcad7e7468d8abf07b7 | |
download | aur-froniusd.tar.gz |
initial package upload to aur
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | PKGBUILD | 47 | ||||
-rw-r--r-- | froniusd.service | 17 | ||||
-rw-r--r-- | sysusers_froniusd.conf | 2 |
4 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a78658f96dbf --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +pkgbase = froniusd + pkgdesc = Read data from a Fronius inverter + pkgver = 0.1.1 + pkgrel = 1 + url = https://github.com/ahpohl/froniusd + arch = i686 + arch = x86_64 + arch = armv7h + arch = aarch64 + license = MIT + depends = mosquitto + depends = libsunspec + depends = libmodbus + optdepends = nodejs-node-red + optdepends = postgresql + optdepends = timescaledb + optdepends = pg_cron + optdepends = grafana-bin + backup = etc/froniusd.conf + source = froniusd-0.1.1::git+https://github.com/ahpohl/froniusd.git#tag=v0.1.1 + source = sysusers_froniusd.conf + source = froniusd.service + sha256sums = SKIP + sha256sums = 8c96a8c940a94b8b86312873ad93a2f2a01a2e1e9dbc52b074b04375189dc26b + sha256sums = 42e303760645ac8a393bda720304373abf3ce652f4c755d4a37f58a77447ba2f + +pkgname = froniusd diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..00c7cb248e14 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: Alexander Pohl <alex at ahpohl dot com> +pkgname=froniusd +pkgver=0.1.1 +pkgrel=1 +epoch= +pkgdesc="Read data from a Fronius inverter" +arch=('i686' 'x86_64' 'armv7h' 'aarch64') +url="https://github.com/ahpohl/froniusd" +license=('MIT') +groups=() +depends=('mosquitto' 'libsunspec' 'libmodbus') +makedepends=() +checkdepends=() +optdepends=('nodejs-node-red' 'postgresql' 'timescaledb' 'pg_cron' 'grafana-bin') +provides=() +conflicts=() +replaces=() +backup=('etc/froniusd.conf') +options=() +install= +changelog= +source=("$pkgname-$pkgver::git+https://github.com/ahpohl/froniusd.git#tag=v${pkgver}" + "sysusers_froniusd.conf" + "froniusd.service") +noextract=() +sha256sums=('SKIP' + '8c96a8c940a94b8b86312873ad93a2f2a01a2e1e9dbc52b074b04375189dc26b' + '42e303760645ac8a393bda720304373abf3ce652f4c755d4a37f58a77447ba2f') +validpgpkeys=() + +build() { + cd "$pkgname-$pkgver" + make +} + +package() { + cd "$pkgname-$pkgver" + make DESTDIR="$pkgdir" PREFIX="/usr" install + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + install -Dm644 README.md "$pkgdir"/usr/share/doc/$pkgname/README.md + install -Dm644 CHANGELOG.md "$pkgdir"/usr/share/doc/$pkgname/CHANGELOG.md + install -Dm644 "$srcdir"/sysusers_froniusd.conf "$pkgdir"/usr/lib/sysusers.d/froniusd.conf + install -Dm644 "$srcdir"/froniusd.service "$pkgdir"/usr/lib/systemd/system/froniusd.service + install -Dm644 resources/config/froniusd_example.conf "$pkgdir"/etc/froniusd.conf + install -d "$pkgdir"/usr/share/$pkgname + cp -r resources/* "$pkgdir"/usr/share/$pkgname/ +} diff --git a/froniusd.service b/froniusd.service new file mode 100644 index 000000000000..57bed825a941 --- /dev/null +++ b/froniusd.service @@ -0,0 +1,17 @@ +[Unit] +Description=Fronius SunSpec energy meter +After=network.target + +[Service] +ExecStart=/usr/bin/froniusd -c /etc/froniusd.conf +User=solarmeter +Group=solarmeter +NoNewPrivileges=yes +ProtectSystem=full +ProtectHome=true +PrivateTmp=true +Restart=always +RestartSec=3 + +[Install] +WantedBy=multi-user.target diff --git a/sysusers_froniusd.conf b/sysusers_froniusd.conf new file mode 100644 index 000000000000..dc884859d76f --- /dev/null +++ b/sysusers_froniusd.conf @@ -0,0 +1,2 @@ +u solarmeter - "Solarmeter" /var/empty +m solarmeter uucp |