summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dd19f0df8e2d973eca05949e9f2cf0588f3b8ac5 (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
# Maintainer: jewelux <jewelux.aur@prejo.de>

_appname='firefox-syncstorage'
_srcname='syncstorage-rs'
pkgname="${_appname}"-git
pkgver=0.13.0.r10.gab5df9ba
pkgrel=1
pkgdesc='Sync storage with build-in token server for running a self-hosted firefox sync server.'
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
url='https://github.com/mozilla-services/'"${_srcname}"
license=('MPL2')
depends=('openssl' 'python-fxa' 'python-tokenlib')
makedepends=('git' 'rust' 'cmake' 'pkgconf' 'mariadb-libs')
optdepends=('mysql: to use a local DB server')
provides=("${_appname}")
conflicts=("${_appname}")
install="${_appname}.install"
source=("git+https://github.com/mozilla-services/${_srcname}.git"
	"${_appname}.service")
sha256sums=('SKIP'
	'609e057cd835ea54b06b32b98e210cd946255f652e7754c9160fd7c94379a83d')
backup=("etc/${_appname}.toml")

pkgver() {
	cd "${_srcname}"
	git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
	cd "${_srcname}"
	cargo build --release
}

package() {
	cd "${_srcname}"

	# Installing manually
	install -Dm 755 target/release/syncserver "${pkgdir}"/usr/bin/"${_appname}"
	install -Dm 644 config/local.example.toml "${pkgdir}"/etc/"${_appname}".toml
	install -Dm 644 "${srcdir}/${_appname}".service "${pkgdir}"/usr/lib/systemd/system/"${_appname}".service
}