aboutsummaryrefslogtreecommitdiffstats
path: root/main/lvm2/APKBUILD
blob: aa6b3e49c4f8c828f4ea1152f61768b886021f36 (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
44
45
46
47
48
49
50
51
52
53
54
55
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lvm2
pkgver=2.02.76
pkgrel=0
pkgdesc="Logical Volume Manager 2 utilities"
url="http://sourceware.org/lvm2/"
license="GPL"
depends=
makedepends="readline-dev pkgconfig"
source="ftp://sources.redhat.com/pub/$pkgname/LVM2.$pkgver.tgz
	lvm.initd
	lvm.confd
	"
subpackages="$pkgname-dev $pkgname-doc device-mapper:dm"

build () {
	cd "$srcdir"/LVM2.$pkgver

	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--libdir=/lib \
		--sbindir=/sbin \
		--localstatedir=/var \
		--disable-nls \
		--enable-pkgconfig \
		CLDFLAGS="$LDFLAGS" \
		|| return 1

	# TODO: fix parallel builds
	make -j1 || return 1
}

package() {
	cd "$srcdir"/LVM2.$pkgver
	make -j1 DESTDIR="$pkgdir" \
		install || return 1
		#usrlibdir="$pkgdir"/lib \
	install -d "$pkgdir"/etc/lvm/archive "$pkgdir"/etc/lvm/backup
	install -Dm755 "$srcdir"/lvm.initd "$pkgdir"/etc/init.d/lvm
	install -Dm644 "$srcdir"/lvm.confd "$pkgdir"/etc/conf.d/lvm
        # some packages need this iin usr/lib
	cd "$pkgdir"/lib || return 1
	ln -s libdevmapper.so.1.02 libdevmapper.so || return 1
}

dm() {
	pkgdesc="Device mapper userspace library and tools from LVM2"
	mkdir -p "$subpkgdir"/sbin
	mv "$pkgdir"/lib "$subpkgdir"/
	mv "$pkgdir"/sbin/dm* "$subpkgdir"/sbin/
}

md5sums="1a43a943c218cb00ce1a6ce39889a6ae  LVM2.2.02.76.tgz
6f65f902cf19f144a42b8d6aceadf395  lvm.initd
ec36d5fe4561220304e406c5c797e71f  lvm.confd"