summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2021-03-07 22:28:54 +0100
committerJan Dittberner <jandd@cacert.org>2021-04-14 18:37:17 +0200
commit4d87e35ec2eeb740853e8ae79a4cc5c9f565cd08 (patch)
tree01257851c7c155c9c7223e06a5dfe7bb15799ec2
parent806d706d4fa8131a137330766aabb7f467fbf5c6 (diff)
downloadcacert-boardvoting-4d87e35ec2eeb740853e8ae79a4cc5c9f565cd08.tar.gz
cacert-boardvoting-4d87e35ec2eeb740853e8ae79a4cc5c9f565cd08.tar.xz
cacert-boardvoting-4d87e35ec2eeb740853e8ae79a4cc5c9f565cd08.zip
Add nfpms configuration
-rw-r--r--.goreleaser.yml17
-rw-r--r--cacert-boardvoting.service12
2 files changed, 29 insertions, 0 deletions
diff --git a/.goreleaser.yml b/.goreleaser.yml
index 6e0f8a8..cfa465d 100644
--- a/.goreleaser.yml
+++ b/.goreleaser.yml
@@ -27,3 +27,20 @@ changelog:
exclude:
- '^docs:'
- '^test:'
+nfpms:
+ -
+ package_name: cacert-boardvoting
+ file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Arch }}"
+ maintainer: Jan Dittberner <jandd@cacert.org>
+ formats:
+ - deb
+ dependencies:
+ - libsqlite3-0
+ - adduser
+ priority: optional
+ bindir: /src/cacert-boardvoting
+ contents:
+ - src: config.yaml.example
+ dst: /usr/share/doc/cacert-boardvoting/examples/config.yaml.example
+ - src: cacert-boardvoting.service
+ dst: /lib/systemd/system/cacert-boardvoting.service
diff --git a/cacert-boardvoting.service b/cacert-boardvoting.service
new file mode 100644
index 0000000..ad92db0
--- /dev/null
+++ b/cacert-boardvoting.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=CAcert board voting software
+Documentation=file:/usr/share/doc/cacert-boardvoting/README.md.gz
+After=network.target
+ConditionPathExists=/srv/cacert-boardvoting/config.yaml
+
+[Service]
+ExecStart=/srv/cacert-boardvoting/cacert-boardvoting -config /srv/cacert-boardvoting/config.yaml
+User=cacert-boardvoting
+
+[Install]
+WantedBy=multi-user.target