packaging
This commit is contained in:
parent
8b8049df2f
commit
4940ced069
|
@ -2,6 +2,15 @@
|
||||||
name = "homekit-exporter"
|
name = "homekit-exporter"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
license = "Apache-2.0"
|
||||||
|
description = "Prometheus exporter for HomeKit sensors"
|
||||||
|
authors = ["Alex Janka"]
|
||||||
|
|
||||||
|
[package.metadata.deb]
|
||||||
|
maintainer-scripts = "packaging/service/"
|
||||||
|
systemd-units = { enable = false }
|
||||||
|
depends = ""
|
||||||
|
assets = [["target/release/homekit-exporter", "usr/bin/", "755"]]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tokio = { version = "1.36", features = ["full"] }
|
tokio = { version = "1.36", features = ["full"] }
|
||||||
|
|
26
homekit-exporter/packaging/PKGBUILD
Normal file
26
homekit-exporter/packaging/PKGBUILD
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# Maintainer: Alex Janka <alex@alexjanka.com>
|
||||||
|
|
||||||
|
pkgname=homekit-logger
|
||||||
|
pkgver=0.1.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Prometheus exporter for HomeKit sensors"
|
||||||
|
arch=('x86_64' 'aarch64')
|
||||||
|
url="https://git.alexjanka.com/alex/homekit-logger"
|
||||||
|
license=('custom')
|
||||||
|
depends=('gcc-libs')
|
||||||
|
makedepends=('cargo')
|
||||||
|
source=("homekit-logger::git+https://git.alexjanka.com/alex/homekit-logger")
|
||||||
|
sha512sums=('SKIP')
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "homekit-logger"
|
||||||
|
|
||||||
|
cargo build --release --locked
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "homekit-logger"
|
||||||
|
|
||||||
|
install -Dm755 "target/release/homekit-exporter" "$pkgdir/usr/bin/homekit-exporter"
|
||||||
|
install -D -m 0644 packaging/service/service "${pkgdir}/usr/lib/systemd/system/homekit-exporter.service"
|
||||||
|
}
|
15
homekit-exporter/packaging/service/service
Normal file
15
homekit-exporter/packaging/service/service
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[Unit]
|
||||||
|
Description=HomeKit Logger
|
||||||
|
After=network.target
|
||||||
|
StartLimitIntervalSec=0
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
Restart=always
|
||||||
|
RestartSec=10s
|
||||||
|
Environment="RUST_LOG=error,warn"
|
||||||
|
Environment="LOG_TIMESTAMP=false"
|
||||||
|
ExecStart=/usr/bin/homekit-logger
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in a new issue