APKBUILD 2.27 KB
Newer Older
Valery Kartel's avatar
Valery Kartel committed
1
# Contributor: Valery Kartel <valery.kartel@gmail.com>
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
2
# Contributor: Carlo Landmeter <clandmeter at gmail>
Natanael Copa's avatar
Natanael Copa committed
3
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
4
pkgname=mdadm
Francesco Colista's avatar
Francesco Colista committed
5
pkgver=4.1
6
pkgrel=1
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
7 8
pkgdesc="a tool for managing Linux Software RAID arrays"
url="http://neil.brown.name/blog/mdadm"
9
arch="all"
Leonardo Arena's avatar
Leonardo Arena committed
10
license="GPL-2.0-only"
Natanael Copa's avatar
Natanael Copa committed
11
depends=
12
makedepends="groff linux-headers"
Valery Kartel's avatar
Valery Kartel committed
13
subpackages="$pkgname-doc $pkgname-udev::noarch $pkgname-misc::noarch"
14
source="https://www.kernel.org/pub/linux/utils/raid/$pkgname/$pkgname-$pkgver.tar.gz
Valery Kartel's avatar
Valery Kartel committed
15 16 17
	$pkgname.initd
	$pkgname.confd
	$pkgname-raid.initd
Leonardo Arena's avatar
Leonardo Arena committed
18
	no-werror.patch
19
	mdadm-include-sysmacros.patch
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
20
	"
Valery Kartel's avatar
Valery Kartel committed
21
builddir="$srcdir/$pkgname-$pkgver"
Natanael Copa's avatar
Natanael Copa committed
22 23

build() {
Valery Kartel's avatar
Valery Kartel committed
24
	cd "$builddir"
Leonardo Arena's avatar
Leonardo Arena committed
25
	make
Natanael Copa's avatar
Natanael Copa committed
26
}
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
27

Natanael Copa's avatar
Natanael Copa committed
28
package() {
Valery Kartel's avatar
Valery Kartel committed
29
	cd "$builddir"
Leonardo Arena's avatar
Leonardo Arena committed
30 31
	make DESTDIR="$pkgdir" install
	install -Dm644 $pkgname.conf-example "$pkgdir"/etc/$pkgname.conf
Valery Kartel's avatar
Valery Kartel committed
32 33 34 35 36 37 38 39 40 41
	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"
Leonardo Arena's avatar
Leonardo Arena committed
42
	mv "$pkgdir"/lib "$subpkgdir"/
Valery Kartel's avatar
Valery Kartel committed
43 44 45 46 47
}

misc() {
	pkgdesc="$pkgdesc (misc scripts)"
	depends="$pkgname bash"
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
48

Valery Kartel's avatar
Valery Kartel committed
49 50 51
	cd "$builddir"
	install -Dm755 misc/mdcheck "$subpkgdir"/usr/sbin/mdcheck
	install -Dm755 misc/syslog-events "$subpkgdir"/usr/sbin/handle-mdadm-events
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
52 53
}

Francesco Colista's avatar
Francesco Colista committed
54
sha512sums="f9bff760795ba7361f19fd1cbc02efedcdaa4b0125b99cf1369e78f30e5c128126751915fde41407d46c544514d864bf82b508419bc08f1db7aa447557e2ca9e  mdadm-4.1.tar.gz
55
ca5f4e3ff5b284102b44e818d11622e1889066e3d18edce2d62c1a44ee8f4cfdc0979121c0462a916c638423c5ebc706c46aa996a7c4f68e030589adc62803f4  mdadm.initd
Natanael Copa's avatar
Natanael Copa committed
56
7d45bf489ef93a4f217ffcf72311eb661b8de7fbf63a5344697252c0d3a684b0123ff60efa5f218da4eb4cda7c88d91c2ef3625d5e44a588e3e1210cb60b0ab9  mdadm.confd
Leonardo Arena's avatar
Leonardo Arena committed
57
37022593ba090eb0690669b99d6386152242c017c1e608cea7b5420b7a6f754b377e916e4f81e2abf9941e791db78b5820e63db0e706d5de8b35e796678e921c  mdadm-raid.initd
58 59
794d6c31fbc0a9ef2f56d7b0afdb94490f0b677414d4f2b1b5104a51c4f39948491fc21aaa30ca75c90c9f056369317f48ea2f78e04ee740327114bee5d959b4  no-werror.patch
e711c15fada5fc98984f43f90a8ab3b6a2a20e9b91c56b5672fdb0ea127b61934b2f0c6ca986bd91c96c56b66f46326cb616101a62e4bfebe3a2b0d33ed2465c  mdadm-include-sysmacros.patch"