aboutsummaryrefslogtreecommitdiffstats
path: root/main/mdadm/APKBUILD
blob: a68e4a64c34134396ee6a3293691383063d31e7d (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
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Carlo Landmeter <clandmeter at gmail>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mdadm
pkgver=4.0
pkgrel=2
pkgdesc="a tool for managing Linux Software RAID arrays"
url="http://neil.brown.name/blog/mdadm"
arch="all"
license="GPL-2.0-only"
depends=
makedepends="groff linux-headers"
subpackages="$pkgname-doc $pkgname-udev::noarch $pkgname-misc::noarch"
source="https://www.kernel.org/pub/linux/utils/raid/$pkgname/$pkgname-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd
	$pkgname-raid.initd
	no-werror.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	install -Dm644 $pkgname.conf-example "$pkgdir"/etc/$pkgname.conf
	install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
	install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -Dm755 "$srcdir"/$pkgname-raid.initd "$pkgdir"/etc/init.d/$pkgname-raid
}

udev() {
	pkgdesc="$pkgdesc (udev rules)"
	install_if="udev $pkgname=$pkgver-r$pkgrel"

	mkdir -p "$subpkgdir"
	mv "$pkgdir"/lib "$subpkgdir"/
}

misc() {
	pkgdesc="$pkgdesc (misc scripts)"
	depends="$pkgname bash"

	cd "$builddir"
	install -Dm755 misc/mdcheck "$subpkgdir"/usr/sbin/mdcheck
	install -Dm755 misc/syslog-events "$subpkgdir"/usr/sbin/handle-mdadm-events
}

sha512sums="032218da3e2054571b52c276ada1d9b052c473ed65660c5b58d3105841d5e2e124c573b882b668fb92b512d87f94e6f3bca3b0ce0c09a92696e9cc2f86c9f1d3  mdadm-4.0.tar.gz
ca5f4e3ff5b284102b44e818d11622e1889066e3d18edce2d62c1a44ee8f4cfdc0979121c0462a916c638423c5ebc706c46aa996a7c4f68e030589adc62803f4  mdadm.initd
7d45bf489ef93a4f217ffcf72311eb661b8de7fbf63a5344697252c0d3a684b0123ff60efa5f218da4eb4cda7c88d91c2ef3625d5e44a588e3e1210cb60b0ab9  mdadm.confd
37022593ba090eb0690669b99d6386152242c017c1e608cea7b5420b7a6f754b377e916e4f81e2abf9941e791db78b5820e63db0e706d5de8b35e796678e921c  mdadm-raid.initd
794d6c31fbc0a9ef2f56d7b0afdb94490f0b677414d4f2b1b5104a51c4f39948491fc21aaa30ca75c90c9f056369317f48ea2f78e04ee740327114bee5d959b4  no-werror.patch"