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

pkgname=qweborf-git
_pkgname="weborf"
pkgver=0.15
pkgrel=9
pkgdesc="Minimal HTTP server to share your files - Qt frontend"
arch=(any)
url="https://ltworf.github.io/weborf"
license=('GPL3')
depends=('python' 'python-pyqt5' 'weborf-git' 'desktop-file-utils')
makedepends=('pacman>=5.1' 'git' 'sudo')
conflicts=('qweborf')
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"

	pyuic5 qweborf/qweborf/main.ui > qweborf/main.py
	python qweborf/setup.py build
}

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

	python qweborf/setup.py install --root="$pkgdir"
	install -Dm 0755 qweborf/qweborf/qweborf "$pkgdir/usr/bin/qweborf"
	install -Dm 0755 qweborf/integration/qweborf.desktop "$pkgdir/usr/share/applications/qweborf.desktop"
}