Debian packaging
This commit is contained in:
parent
2b86e83bb6
commit
43241991c0
9 changed files with 61 additions and 1 deletions
4
Makefile
Normal file
4
Makefile
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
build:
|
||||||
|
cd cmd/fermentord && GOARCH=arm GOARM=6 GOOS=linux go build
|
||||||
|
|
||||||
|
.PHONY: build
|
5
debian/changelog
vendored
Normal file
5
debian/changelog
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
fermentord (1.0.0) bullseye; urgency=medium
|
||||||
|
|
||||||
|
* Initial packaging
|
||||||
|
|
||||||
|
-- Søren Rasmussen <sr@jondahl.net> Tue, 08 Mar 2022 06:29:00 +0100
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
9
|
15
debian/control
vendored
Normal file
15
debian/control
vendored
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
Source: fermentord
|
||||||
|
Section: main
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Søren Rasmussen <sr@jondahl.net>
|
||||||
|
Standards-Version: 3.6.1
|
||||||
|
|
||||||
|
Package: fermentord
|
||||||
|
Architecture: armhf
|
||||||
|
Depends: bash
|
||||||
|
Description: Beer fermentation controller software
|
||||||
|
fermentord is a beer fermentation controller software that allows a converted
|
||||||
|
fridge to function as a beer fermentation chamber.
|
||||||
|
Configuring the system in /etc/fermentord.toml is mandatory.
|
||||||
|
The system controls mains voltage. Ensure correct configuration before
|
||||||
|
starting the daemon, as wrong configuration may damage the hardware.
|
1
debian/fermentord.dirs
vendored
Normal file
1
debian/fermentord.dirs
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
var/lib/fermentord
|
17
debian/fermentord.postinst
vendored
Normal file
17
debian/fermentord.postinst
vendored
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
install)
|
||||||
|
groupadd --system --force w1
|
||||||
|
adduser --system --group --no-create-home --add_extra_groups gpio,w1,spi --home /var/lib/fermentord --shell /sbin/nologin fermentor
|
||||||
|
;;
|
||||||
|
|
||||||
|
configure)
|
||||||
|
systemctl try-reload-or-restart fermentord
|
||||||
|
esac
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
1
debian/fermentord.rules
vendored
Normal file
1
debian/fermentord.rules
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
KERNEL=="w1_bus_master1", SUBSYSTEM=="w1", DRIVER=="w1_master_driver", GROUP="w1", MODE="0660"
|
|
@ -1,11 +1,16 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Fermentor daemon
|
Description=Fermentor daemon
|
||||||
After=network.target
|
Wants=network-online.target local-fs.target
|
||||||
|
After=network-online.target local-fs.target
|
||||||
ConditionPathExists=!/etc/fermentord_not_to_be_run
|
ConditionPathExists=!/etc/fermentord_not_to_be_run
|
||||||
|
ConditionKernelCommandLine=dtoverlay=w1-gpio,gpiopin=4,pullup=0
|
||||||
|
ConditionPathExists=/etc/fermentord.toml
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/local/bin/fermentord
|
ExecStart=/usr/local/bin/fermentord
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
User=fermentor
|
||||||
|
Group=fermentor
|
||||||
KillMode=process
|
KillMode=process
|
||||||
TimeoutStopSec=15
|
TimeoutStopSec=15
|
||||||
Restart=always
|
Restart=always
|
||||||
|
@ -17,5 +22,6 @@ CPUSchedulingPriority=49
|
||||||
IOSchedulingClass=realtime
|
IOSchedulingClass=realtime
|
||||||
IOSchedulingPriority=3
|
IOSchedulingPriority=3
|
||||||
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
10
debian/rules
vendored
Executable file
10
debian/rules
vendored
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
# Uncomment this to turn on verbose mode.
|
||||||
|
#export DH_VERBOSE=1
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@ --with systemd
|
||||||
|
|
||||||
|
override_dh_strip:
|
||||||
|
override_dh_makeshlibs:
|
Loading…
Reference in a new issue