summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 11fd7326c67b95bcbfffae444063e91e24da90f2 (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
pkgname='ubdsrv-git'
pkgver=1.1.rc1.r106.gf8304e5
pkgrel=1
pkgdesc="The userspace part of the ublk framework."
arch=('x86_64' 'i686' 'i486' 'pentium4' 'aarch64' 'armv7h') # Archlinux, Archlinux 32 Bit, Archlinux ARM
url='https://github.com/ming1/ubdsrv'
license=('MIT' 'GPL2' 'LGPL2.1')
depends=('liburing')
makedepends=('git')
provides=("ubdsrv=${pkgver}")
conflicts=('ubdsrv')

source=("$pkgname::git+https://github.com/ming1/ubdsrv.git")
b2sums=(SKIP)

pkgver() {
	cd "$pkgname"
	git describe --long --abbrev=7 | sed -E 's/^v//;s/-([0-9]+-g[0-9a-f]+)$/-r\1/;s/-/\./g'
}

build() {
	cd "$pkgname"
	autoreconf -i
	./configure --prefix=/usr --sbindir /usr/bin
	make
}

package() {
	cd "$pkgname"
	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
	make DESTDIR="$pkgdir" install
}