summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD40
2 files changed, 28 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9e52293d3c2b..8197f636fa9a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,23 +1,18 @@
-# Generated by mksrcinfo v8
-# Fri Jan 12 13:12:46 UTC 2018
pkgbase = synapse-bt-git
pkgdesc = Lightweight bittorrent daemon
- pkgver = r546.53eefbf
+ pkgver = 1.0.r71.352919b
pkgrel = 1
url = https://synapse-bt.org
- arch = i686
arch = x86_64
license = ISC
makedepends = cargo
makedepends = git
- depends = openssl
- depends = c-ares
+ depends = gcc-libs
provides = synapse-bt
conflicts = synapse-bt
- source = git+https://github.com/Luminarys/synapse
+ source = synapse-bt-git::git+https://github.com/Luminarys/synapse
source = synapse.service
sha256sums = SKIP
sha256sums = e21042763f6c56924a3063697d641855a0900285e6c7eacc6253e1c338cb2deb
pkgname = synapse-bt-git
-
diff --git a/PKGBUILD b/PKGBUILD
index 3d9e06e42d8b..91bbece8435d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,35 +1,45 @@
+# Maintainer: Stephen Gregoratto <dev@sgregoratto.me>
+# Contributor: Drew DeVault <sir@cmpwn.com>
pkgname=synapse-bt-git
provides=('synapse-bt')
conflicts=('synapse-bt')
-pkgver=r546.53eefbf
+pkgver=1.0.r71.352919b
pkgrel=1
pkgdesc='Lightweight bittorrent daemon'
arch=('x86_64')
url='https://synapse-bt.org'
license=('ISC')
-depends=('openssl' 'c-ares')
+depends=('gcc-libs')
makedepends=('cargo' 'git')
-source=(
- git+https://github.com/Luminarys/synapse
- synapse.service
-)
+source=("$pkgname::git+https://github.com/Luminarys/synapse" synapse.service)
sha256sums=('SKIP'
'e21042763f6c56924a3063697d641855a0900285e6c7eacc6253e1c338cb2deb')
pkgver() {
- cd synapse
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ cd "$pkgname"
+ printf "%s" "$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}
build() {
- cd synapse
- cargo build --release --all
+ cd "$pkgname"
+ RUSTUP_TOOLCHAIN=stable cargo build \
+ --release \
+ --all \
+ --locked \
+ --features="autobahn,mmap" \
+ --target-dir="target"
+}
+
+check() {
+ cd "$pkgname"
+ RUSTUP_TOOLCHAIN=stable cargo test \
+ --locked \
+ --target-dir="target"
}
package() {
- cd synapse
- mkdir -p "$pkgdir"/usr/lib/systemd/user/ "$pkgdir"/usr/bin
- install -Dm755 target/release/synapse "$pkgdir"/usr/bin
- install -Dm755 target/release/sycli "$pkgdir"/usr/bin
- install -Dm644 "$srcdir"/synapse.service "$pkgdir"/usr/lib/systemd/user/
+ install -Dm644 "$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 "synapse.service" "$pkgdir/usr/lib/systemd/user/synapse.service"
+ install -Dm755 "$pkgname/target/release/synapse" "$pkgdir/usr/bin/synapse"
+ install -Dm755 "$pkgname/target/release/sycli" "$pkgdir/usr/bin/sycli"
}