summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9d94ac26dbe0451f1080ac56ae77c41df0a8e0ef (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
# Maintainer: hcra <hcra at u53r dot space>

pkgname=weborf-git
_pkgname="weborf"
pkgver=0.15
pkgrel=6
pkgdesc="Minimal HTTP server to share your files"
arch=('any')
url="https://ltworf.github.io/weborf"
license=('GPL3')
depends=('openssl' 'file')
makedepends=('pacman>=5.1' 'git' 'sudo' 'findutils')
optdepends=('qweborf-git: graphical user interface')
conflicts=('weborf')
source=("git+https://github.com/ltworf/weborf.git#branch=master")
md5sums=("SKIP")

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

	git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

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

	autoreconf -f -i
	./configure --prefix=/usr --sysconfdir=/etc
	make VERSION="$pkgver"
}

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

	make DESTDIR="$pkgdir" VERSION="$pkgver" install

	cd "$pkgdir"
	find lib -type f -exec install -D {} usr/{} \;
	rm -r lib
}