Improve packaging
All checks were successful
cacert-boardvoting/pipeline/head This commit looks good

- gzip the README.md before packaging
- just release the binary
This commit is contained in:
Jan Dittberner 2022-10-15 21:14:16 +02:00
parent 070bac6314
commit bb06fb95a2
3 changed files with 30 additions and 3 deletions

1
.gitignore vendored
View file

@ -7,6 +7,7 @@
*.sqlite-journal
.*.swp
.idea/
/debian/*.gz
/dist/
/ui/semantic/dist/
cacert-boardvoting

View file

@ -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 <jandd@cacert.org>
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

22
debian/copyright vendored Normal file
View file

@ -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 <jandd@cacert.org>
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`