summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 042c9ca5569577ef6f9a6c819371c6b9e1145e5e (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
42
43
# Maintainter: Woshiluo Luo <woshiluo.luo@outlook.com>
pkgname=webdav-server-rs-git
_pkgname=webdav-server-rs
pkgver=0.4.0.4.g547602e
pkgrel=1
pkgdesc="webdav server in rust"
arch=('x86_64')
url="https://github.com/miquels/webdav-server-rs"
license=('APACHE')
makedepends=('git' 'rust')
depends=('pam')
source=(git+https://github.com/woshiluo/webdav-server-rs 'webdav-server.service')
backup=('etc/webdav-server-rs/config.toml')

md5sums=('SKIP'
         '229822929b0b74460306fb0131b90db9')

pkgver() {
	cd "$srcdir/$_pkgname"

	echo $(git describe --tags | tail -c +2 | sed 's/-/./g')
}

build() {
	cd "$srcdir/$_pkgname"

	cargo build --release --no-default-features --features=pam
}

package() {
	cd $srcdir
	install -Dm644 webdav-server.service ${pkgdir}/usr/lib/systemd/system/webdav-server.service

	cd "$_pkgname"

	mkdir -p $pkgdir/usr/bin
	install -Dm644 webdav-server.toml ${pkgdir}/etc/webdav-server-rs/config.toml
	find target/release \
		-maxdepth 1 \
		-executable \
		-type f \
		-exec install -m 755 "{}" "$pkgdir"/usr/bin \;
}