summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a2276d9608df07e46aff4333efd2e66cdf9b8979 (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
# Maintainer: Christian Hesse <mail@eworm.de>
# Contributor: Eric BĂ©langer <eric@archlinux.org>
# Contributor: Jason Hall <cakersq@gmail.com>

pkgname=thin-provisioning-tools-git
pkgver=0.4.0.r0.g39990e6
pkgrel=1
pkgdesc='A suite of tools for manipulating the metadata of the dm-thin device-mapper target - git checkout'
arch=('i686' 'x86_64')
url='https://github.com/jthornber/thin-provisioning-tools'
license=('GPL3')
depends=('expat' 'gcc-libs')
makedepends=('boost' 'git')
provides=('thin-provisioning-tools')
conflicts=('thin-provisioning-tools')
source=('git://github.com/jthornber/thin-provisioning-tools.git')
sha256sums=('SKIP')

pkgver() {
	cd thin-provisioning-tools/

	if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then
		echo "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG}).r$(git rev-list --count ${GITTAG}..).g$(git log -1 --format="%h")"
	else
		echo "0.r$(git rev-list --count master).g$(git log -1 --format="%h")"
	fi
}

build() {
	cd thin-provisioning-tools/

	autoconf
	./configure --prefix=/usr
	make
}

package() {
	cd thin-provisioning-tools/

	make DESTDIR="${pkgdir}" BINDIR="${pkgdir}"/usr/bin MANDIR=/usr/share/man install
}