summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f1dddc9c08f0116883529280c6bbf37d9c0a1854 (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
pkgname=webdir-git
pkgver=0.1.0.114.gafe24ef
pkgrel=1
pkgdesc="A simple asynchronous static file server"
arch=('x86_64' 'i686')
url="https://github.com/Tyzzer/webdir"
license=('MIT')
depends=()
makedepends=('cargo' 'git')
optdepends=()
provides=('webdir')
conflicts=('webdir')
source=($pkgname::git+https://github.com/Tyzzer/webdir)
sha256sums=('SKIP')

pkgver() {
	cd $pkgname
	echo $(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2).$(git rev-list --count HEAD).g$(git describe --always)
}

build() {
	cd $pkgname
	cargo build --release
}

package() {
	cd $pkgname
	install -D -m755 "$srcdir/$pkgname/target/release/webdir" "$pkgdir/usr/bin/webdir"
}