diff options
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | sftpgo.install | 6 |
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..775b46981dd8 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = sftpgo + pkgdesc = Full featured and highly configurable SFTP server + pkgver = 0.9.1 + pkgrel = 1 + url = https://github.com/giltene/sftpgo + install = sftpgo.install + arch = i686 + arch = x86_64 + license = GPL3 + makedepends = gcc + makedepends = git + makedepends = go + depends = glibc + optdepends = sqlite: to use SQLite provider + optdepends = postgresql: to use PostgreSQL provider + optdepends = mariadb: to use MySQL provider + backup = etc/sftpgo/sftpgo.json + source = git+https://github.com/drakkan/sftpgo#tag=0.9.1 + sha256sums = SKIP + +pkgname = sftpgo + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1d6cf9609b34 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: drakkan <nicola.murino at gmail dot com> +# Contributor: drakkan <nicola.murino at gmail dot com> +pkgname=sftpgo +pkgver=0.9.1 +pkgrel=1 +pkgdesc='Full featured and highly configurable SFTP server' +arch=('i686' 'x86_64') +url="https://github.com/giltene/${pkgname}" +license=('GPL3') +depends=('glibc') +makedepends=('gcc' 'git' 'go') +optdepends=( + "sqlite: to use SQLite provider" + "postgresql: to use PostgreSQL provider" + "mariadb: to use MySQL provider" +) +backup=("etc/${pkgname}/sftpgo.json") +install=${pkgname}.install + +source=("git+https://github.com/drakkan/${pkgname}#tag=${pkgver}") +sha256sums=('SKIP') + +build() { + cd "${pkgname}" + go build -i -ldflags "-s -w -X github.com/drakkan/sftpgo/utils.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/utils.date=`date --utc +%FT%TZ`" -o sftpgo +} + +package() { + cd "${pkgname}" + install -Dm755 sftpgo "$pkgdir/usr/bin/${pkgname}" + install -Dm 644 init/${pkgname}.service -t "${pkgdir}/usr/lib/systemd/system" + install -Dm 644 sftpgo.json -t "${pkgdir}/etc/${pkgname}" + install -d "${pkgdir}/usr/share/doc/${pkgname}" + cp -r sql "${pkgdir}/usr/share/doc/${pkgname}/" + install -Dm 644 README.md "${pkgdir}"/usr/share/doc/${pkgname}/README.md + install -Dm 755 scripts/sftpgo_api_cli.py "${pkgdir}"/usr/share/doc/${pkgname}/scripts/sftpgo_api_cli.py + install -Dm 644 scripts/README.md "${pkgdir}"/usr/share/doc/${pkgname}/scripts/README.md + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE +} + +# vim:set ts=2 sw=2 et: diff --git a/sftpgo.install b/sftpgo.install new file mode 100644 index 000000000000..1afd4e1c5214 --- /dev/null +++ b/sftpgo.install @@ -0,0 +1,6 @@ +#!/bin/sh + +post_install() { + echo ":: You need to initialize a data provider prior to starting the service." + echo " This can be done using the scripts in /usr/share/doc/sftpgo/sql" +} |