nfpm: update to 2.1.0

This commit is contained in:
Nicola Murino 2020-12-26 19:14:12 +01:00
parent 3d2da88da9
commit 0c56b6d504
No known key found for this signature in database
GPG key ID: 2F1FB59433D5A8CB
2 changed files with 29 additions and 17 deletions

View file

@ -1,6 +1,6 @@
#!/bin/bash
NFPM_VERSION=1.10.3
NFPM_VERSION=2.1.0
NFPM_ARCH=${NFPM_ARCH:-amd64}
if [ -z ${SFTPGO_VERSION} ]
then
@ -38,8 +38,6 @@ release: 1
section: "net"
priority: "optional"
maintainer: "Nicola Murino <nicola.murino@gmail.com>"
provides:
- sftpgo
description: |
Fully featured and highly configurable SFTP server
SFTPGo has optional FTP/S and WebDAV support.
@ -48,17 +46,34 @@ description: |
vendor: "SFTPGo"
homepage: "https://github.com/drakkan/sftpgo"
license: "GPL-3.0"
files:
${BASE_DIR}/sftpgo${BIN_SUFFIX}: "/usr/bin/sftpgo"
./sftpgo-completion.bash: "/usr/share/bash-completion/completions/sftpgo"
./man1/*: "/usr/share/man/man1/"
${BASE_DIR}/init/sftpgo.service: "/lib/systemd/system/sftpgo.service"
./sftpgo_api_cli: "/usr/bin/sftpgo_api_cli"
${BASE_DIR}/templates/*: "/usr/share/sftpgo/templates/"
${BASE_DIR}/static/**/*: "/usr/share/sftpgo/static/"
provides:
- sftpgo
contents:
- src: "${BASE_DIR}/sftpgo${BIN_SUFFIX}"
dst: "/usr/bin/sftpgo"
- src: "./sftpgo-completion.bash"
dst: "/usr/share/bash-completion/completions/sftpgo"
- src: "./man1/*"
dst: "/usr/share/man/man1/"
- src: "${BASE_DIR}/init/sftpgo.service"
dst: "/lib/systemd/system/sftpgo.service"
- src: "./sftpgo_api_cli"
dst: "/usr/bin/sftpgo_api_cli"
- src: "${BASE_DIR}/templates/*"
dst: "/usr/share/sftpgo/templates/"
- src: "${BASE_DIR}/static/**/*"
dst: "/usr/share/sftpgo/static/"
- src: "./sftpgo.json"
dst: "/etc/sftpgo/sftpgo.json"
type: "config|noreplace"
config_files:
./sftpgo.json: "/etc/sftpgo/sftpgo.json"
empty_folders:
- /var/lib/sftpgo
@ -89,9 +104,6 @@ overrides:
rpm:
compression: lzma
config_noreplace_files:
./sftpgo.json: "/etc/sftpgo/sftpgo.json"
EOF
curl --retry 5 --retry-delay 2 --connect-timeout 10 -L -O \

View file

@ -26,7 +26,7 @@ if [ "$1" = "configure" ]; then
chown -R sftpgo:sftpgo /etc/sftpgo /var/lib/sftpgo /srv/sftpgo
chmod 750 /etc/sftpgo /var/lib/sftpgo /srv/sftpgo
chmod 640 /etc/sftpgo/sftpgo.json
echo "Please be sure to have the python3-requests package installed if you want to use the REST API CLI"
echo "Please be sure to have the python3-requests package installed if you want to use the REST API CLI"
fi
# we added /srv/sftpgo after 1.1.0, we should check if we are upgrading