Go service (nasmon/) plus nfpm packaging (packaging/), carried over from the home_nas monorepo. Adds rpm packaging alongside the existing deb build (Fedora/RHEL/Rocky dependency names via nfpm overrides, per-format systemd unit path, dpkg+rpm-compatible maintainer scripts) and a Gitea Actions workflow that builds both formats on every push. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
79 lines
1.9 KiB
YAML
79 lines
1.9 KiB
YAML
# nfpm packaging config — build with build.ps1/build.sh
|
|
# (or directly: nfpm package -f packaging/nfpm.yaml -p deb|rpm)
|
|
name: nasmon
|
|
arch: amd64
|
|
platform: linux
|
|
version: ${NASMON_VERSION}
|
|
section: admin
|
|
priority: optional
|
|
maintainer: home_nas <nas@localhost>
|
|
description: |
|
|
Lightweight NAS health monitor.
|
|
Web dashboard (CPU, memory, temperatures, disks with SMART, ZFS pools)
|
|
and periodic SMART/ZFS checks with e-mail alerts.
|
|
homepage: https://gitea.virtlab.space/a.gritsenko/nasmon
|
|
license: MIT
|
|
|
|
# Debian/Ubuntu package names by default; overrides.rpm below swaps in the
|
|
# Fedora/RHEL/Rocky names. ZFS has no native package on RHEL-family distros
|
|
# (needs the OpenZFS third-party repo), so it's intentionally left out of the
|
|
# rpm depends — see packaging/README.md.
|
|
depends:
|
|
- smartmontools
|
|
- zfsutils-linux
|
|
- util-linux
|
|
# file sharing is optional: the /shares page works once these are present
|
|
recommends:
|
|
- samba
|
|
- nfs-kernel-server
|
|
- wsdd
|
|
|
|
overrides:
|
|
rpm:
|
|
depends:
|
|
- smartmontools
|
|
- util-linux
|
|
recommends:
|
|
- samba
|
|
- nfs-utils
|
|
- wsdd
|
|
|
|
contents:
|
|
- src: ../dist/nasmon
|
|
dst: /usr/bin/nasmon
|
|
file_info:
|
|
mode: 0755
|
|
- src: ./nasmon.service
|
|
dst: /lib/systemd/system/nasmon.service
|
|
packager: deb
|
|
file_info:
|
|
mode: 0644
|
|
- src: ./nasmon.service
|
|
dst: /usr/lib/systemd/system/nasmon.service
|
|
packager: rpm
|
|
file_info:
|
|
mode: 0644
|
|
- src: ./wsdd.service
|
|
dst: /etc/systemd/system/wsdd.service
|
|
type: config
|
|
file_info:
|
|
mode: 0644
|
|
- src: ./config.json
|
|
dst: /etc/nasmon/config.json
|
|
type: config|noreplace
|
|
file_info:
|
|
mode: 0600
|
|
- dst: /var/lib/nasmon
|
|
type: dir
|
|
file_info:
|
|
mode: 0750
|
|
- src: ./README.md
|
|
dst: /usr/share/doc/nasmon/README.md
|
|
file_info:
|
|
mode: 0644
|
|
|
|
scripts:
|
|
postinstall: ./postinst.sh
|
|
preremove: ./prerm.sh
|
|
postremove: ./postrm.sh
|