blob: 25d96a790488c1465b873cca2d54402f1a32697d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# Maintainer: drakkan <nicola.murino at gmail dot com>
# Contributor: drakkan <nicola.murino at gmail dot com>
pkgname=sftpgo-bin
_pkgname=sftpgo
pkgver=2.6.4
pkgrel=1
pkgdesc='Full-featured and highly configurable SFTP, HTTP/S, FTP/S and WebDAV server - S3, Google Cloud Storage, Azure Blob'
arch=('x86_64')
url="https://github.com/drakkan/${_pkgname}"
license=('AGPLv3')
depends=('libcap')
optdepends=(
"postgresql: to use PostgreSQL provider"
"mariadb: to use MySQL provider"
"cockroachdb: to use CockroachDB provider"
)
conflicts=('sftpgo')
provides=('sftpgo')
backup=(
"etc/${_pkgname}/sftpgo.json"
"var/lib/${_pkgname}/sftpgo.db"
)
install=${pkgname}.install
source=("https://github.com/drakkan/sftpgo/releases/download/v${pkgver}/sftpgo_v${pkgver}_linux_x86_64.tar.xz"
"sftpgo.json"
"sftpgo.sysusers")
sha256sums=('e5f316823a5d2f42b2a6bd589defafaacee9308a6db114d053d2f1887023165c'
'9137b31f66ae0400029472e39f53cadb8acd6644bebf921d1a4c4d1ef94408eb'
'44658210043f805057c2e4b473653637a91204e4da17954b08081292c72edcb8')
_uid_sftpgo=315
_gid_sftpgo=315
package() {
install -Dm 755 sftpgo "$pkgdir/usr/bin/${_pkgname}"
install -Dm 644 init/${_pkgname}.service -t "${pkgdir}/usr/lib/systemd/system"
install -dm750 -o ${_uid_sftpgo} -g ${_gid_sftpgo} "${pkgdir}/etc/${_pkgname}"
install -dm750 -o ${_uid_sftpgo} -g ${_gid_sftpgo} "${pkgdir}/etc/${_pkgname}/env.d"
install -Dm 640 -o ${_uid_sftpgo} -g ${_gid_sftpgo} "$srcdir/sftpgo.json" -t "${pkgdir}/etc/${_pkgname}"
install -dm750 -o ${_uid_sftpgo} -g ${_gid_sftpgo} "${pkgdir}/var/lib/${_pkgname}"
install -Dm 600 -o ${_uid_sftpgo} -g ${_gid_sftpgo} sqlite/sftpgo.db -t "${pkgdir}/var/lib/${_pkgname}"
install -dm750 -o ${_uid_sftpgo} -g ${_gid_sftpgo} "${pkgdir}/srv/${_pkgname}"
install -d "${pkgdir}/usr/share/${_pkgname}"
cp -r templates "${pkgdir}/usr/share/${_pkgname}/"
cp -r static "${pkgdir}/usr/share/${_pkgname}/"
cp -r openapi "${pkgdir}/usr/share/${_pkgname}/"
install -d "${pkgdir}/usr/share/doc/${_pkgname}"
install -Dm 644 "$srcdir/sftpgo.json" "${pkgdir}/usr/share/doc/${_pkgname}/sftpgo.json.default"
install -Dm 644 README.txt "${pkgdir}"/usr/share/doc/${_pkgname}/README
install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/${_pkgname}/LICENSE
install -Dm 644 NOTICE "$pkgdir"/usr/share/licenses/${_pkgname}/NOTICE
install -Dm 644 bash_completion/sftpgo "${pkgdir}/usr/share/bash-completion/completions/sftpgo"
install -d "${pkgdir}/usr/share/man"
cp -r man/man1 "${pkgdir}/usr/share/man/"
install -Dm 644 "$srcdir/${_pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${_pkgname}.conf"
}
# vim:set ts=2 sw=2 et:
|