summaryrefslogtreecommitdiffstats
path: root/main/lvm2/APKBUILD
blob: 6be6330e612ee001cedfee046b6725a053a3aace (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lvm2
pkgver=2.02.102
pkgrel=0
pkgdesc="Logical Volume Manager 2 utilities"
url="http://sourceware.org/lvm2/"
arch="all"
license="GPL"
depends=
makedepends="pkgconfig"
source="ftp://sources.redhat.com/pub/$pkgname/LVM2.$pkgver.tgz
	lvm.initd
	lvm.confd
	"
subpackages="$pkgname-dev $pkgname-doc device-mapper:dm $pkgname-libs"

_builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$_builddir"
	update_config_sub || return 1
}

build () {
	cd "$_builddir"

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

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

package() {
	cd "$_builddir"
	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
	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 "$subpkgdir"/lib
	mv "$pkgdir"/lib/libdevmapper.so.* "$subpkgdir"/lib/
	mv "$pkgdir"/sbin/dm* "$subpkgdir"/sbin/
}

libs() {
	pkgdesc="LVM2 shared libraries"
	mkdir -p "$subpkgdir"/lib
	mv "$pkgdir"/lib/liblvm2*.so.* "$subpkgdir"/lib/
}

md5sums="cfce545d87abf42ae4c9e0aae704619e  LVM2.2.02.102.tgz
260dba1a691ea2ae86a3c49b39f1dd7d  lvm.initd
ec36d5fe4561220304e406c5c797e71f  lvm.confd"
sha256sums="7392705663f814e4cc547fb22dc6e29b7c8929fd98ca998c6dd1a9e4b92df6a1  LVM2.2.02.102.tgz
0be9b5503c4713fb848ad050ac4e57138770d72d639f536d32cc1a77b1ecc221  lvm.initd
e2ff57977ace6098e1a2efc8a1f6796e8bf6e5dd148e4c105bb647ffc6f79230  lvm.confd"
sha512sums="a2b81d231412fea13d4b83109b55f75ccb56bef4806fbefeae057d2ab8a1012387148ee14d7ae4143ea16149b1679c92e1a13f9e9b28cf5eef50448629163195  LVM2.2.02.102.tgz
97bd0524b3982e54cc41cec7d9cc2433d30f49175eeca95661f25906e414885d512ba21de3bbbca4a9c5496ba69b0aac9d977168d6e76f95d70ae37f3a3f65c7  lvm.initd
07caf8fa942290f3c953cc2463aaf55bac01d0bcb9351daf3880fa4d0eefb67fe00761c46a7a4da91cd2f8e492a12fed35853a15dc939cd80d19d3303bc3951d  lvm.confd"