diff options
author | Adam S Levy | 2019-10-28 16:48:50 -0800 |
---|---|---|
committer | Adam S Levy | 2019-10-28 16:48:50 -0800 |
commit | c658266502ff725c00dba655e1f92592a9e2d088 (patch) | |
tree | 5d00f8c6cd8d77f6452b9b682409ee704533feb3 | |
download | aur-c658266502ff725c00dba655e1f92592a9e2d088.tar.gz |
Initial upload: fatd 1.0.0-1
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 55 | ||||
-rw-r--r-- | fatd.install | 8 |
3 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d9d48bd065d5 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = fatd + pkgdesc = Factom Asset Tokens Daemon + pkgver = 1.0.0 + pkgrel = 1 + url = https://github.com/Factom-Asset-Tokens/fatd + install = fatd.install + arch = x86_64 + license = MIT + makedepends = go-pie + makedepends = git + depends = glibc + optdepends = factomd + options = emptydirs + source = git+https://github.com/Factom-Asset-Tokens/fatd#tag=v1.0.0 + md5sums = SKIP + +pkgname = fatd + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..bbd0afc61f17 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer: Adam Levy <adam@canonical-ledgers.com> +pkgname=fatd +pkgver=1.0.0 +pkgrel=1 +pkgdesc="Factom Asset Tokens Daemon" +url="https://github.com/Factom-Asset-Tokens/fatd" +license=(MIT) + +options=(emptydirs) + +install=fatd.install + +arch=('x86_64') +depends=("glibc") +optdepends=("factomd") +makedepends=("go-pie" "git") +source=("git+https://github.com/Factom-Asset-Tokens/fatd#tag=v${pkgver}") +md5sum=('skip') + +prepare() { + # Generate completion files. Each cmd is its own completion program. + cd "$srcdir" + mkdir -p completions + rm -f completions/fatd + for cmd in fatd fat-cli; do + echo "complete -C /usr/bin/$cmd $cmd" >> completions/fatd + done +} + +build() { + export LDFLAGS + export CGO_LDFLAGS=$LDFLAGS + cd "$srcdir/fatd" + make +} + +package() { + install -Dm644 "$srcdir/completions/fatd" \ + "$pkgdir/usr/share/bash-completion/completions/fatd" + + cd "$srcdir/fatd" + + bin_dir="$pkgdir/usr/bin" + install -dm755 "$bin_dir" + install -m755 fatd fat-cli "$bin_dir" + + install -dm755 "$pkgdir/var/lib/fatd" + + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/fatd/LICENSE" + + install -Dm644 fatd@.service "$pkgdir/usr/lib/systemd/system/fatd@.service" + install -Dm644 sysusers-fatd.conf "$pkgdir/usr/lib/sysusers.d/fatd.conf" + +} +md5sums=('SKIP') diff --git a/fatd.install b/fatd.install new file mode 100644 index 000000000000..6fd9b9fc851e --- /dev/null +++ b/fatd.install @@ -0,0 +1,8 @@ +post_install() { + post_upgrade +} + +post_upgrade() { + systemd-sysusers + chown fatd:fatd -R /var/lib/fatd +} |