From bb06fb95a210f23377f8da490659f40f31b92528 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Sat, 15 Oct 2022 21:14:16 +0200 Subject: [PATCH] Improve packaging - gzip the README.md before packaging - just release the binary --- .gitignore | 1 + .goreleaser.yml | 10 +++++++--- debian/copyright | 22 ++++++++++++++++++++++ 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 debian/copyright diff --git a/.gitignore b/.gitignore index ca0c831..b98ab79 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.sqlite-journal .*.swp .idea/ +/debian/*.gz /dist/ /ui/semantic/dist/ cacert-boardvoting diff --git a/.goreleaser.yml b/.goreleaser.yml index f569718..420c721 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -3,8 +3,8 @@ project_name: cacert-boardvoting before: hooks: - # You may remove this if you don't use go modules. - go mod tidy + - sh -c "gzip < README.md > debian/README.md.gz" builds: - env: - CGO_ENABLED=1 @@ -21,6 +21,7 @@ archives: - replacements: linux: Linux amd64: x86_64 + format: binary checksum: name_template: 'checksums.txt' snapshot: @@ -36,6 +37,7 @@ nfpms: package_name: cacert-boardvoting file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Arch }}" maintainer: Jan Dittberner + section: misc formats: - deb dependencies: @@ -44,8 +46,10 @@ nfpms: priority: optional bindir: /srv/cacert-boardvoting contents: - - src: README.md - dst: /usr/share/doc/cacert-boardvoting/README.md + - src: debian/README.md.gz + dst: /usr/share/doc/cacert-boardvoting/README.md.gz + - src: debian/copyright + dst: /usr/share/doc/cacert-boardvoting/copyright - src: config.yaml.example dst: /usr/share/doc/cacert-boardvoting/examples/config.yaml.example - src: cacert-boardvoting.service diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..5dcf085 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,22 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: CAcert board voting software +Upstream-Contact: Jan Dittberner +Source: https://git.cacert.org/gitweb/?p=cacert-boardvoting.git + +Files: * +Copyright: 2017-2022 Jan Dittberner +License: Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this program except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian systems, the full text of the Apache License, Version 2.0 can be + found in the file `/usr/share/common-licenses/Apache-2.0`