aboutsummaryrefslogtreecommitdiffstats
path: root/main/mdadm
diff options
context:
space:
mode:
authorValery Kartel <valery.kartel@gmail.com>2017-01-12 14:33:15 +0200
committerTimo Teräs <timo.teras@iki.fi>2017-02-07 10:23:41 +0200
commitef1fbe5fbeb1d0ef19091c4d2299a3123ab78765 (patch)
tree8a1be2fb01285d0d34aa356dcb36aa27da051ae8 /main/mdadm
parentbd62e8ad5acf7a6e8a0b8e610f0a36b6bf86583e (diff)
downloadaports-ef1fbe5fbeb1d0ef19091c4d2299a3123ab78765.tar.bz2
aports-ef1fbe5fbeb1d0ef19091c4d2299a3123ab78765.tar.xz
main/mdadm: upgrade to 4.0
- cleanups in apkbuild - move udev-specific data to -udev subpackage - move misc scripts to -misc subpackage
Diffstat (limited to 'main/mdadm')
-rw-r--r--main/mdadm/APKBUILD67
-rw-r--r--main/mdadm/uclibc-bswap.patch18
2 files changed, 38 insertions, 47 deletions
diff --git a/main/mdadm/APKBUILD b/main/mdadm/APKBUILD
index 6fcd8e3d6f..6d4650a804 100644
--- a/main/mdadm/APKBUILD
+++ b/main/mdadm/APKBUILD
@@ -1,7 +1,8 @@
+# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Carlo Landmeter <clandmeter at gmail>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mdadm
-pkgver=3.4
+pkgver=4.0
pkgrel=0
pkgdesc="a tool for managing Linux Software RAID arrays"
url="http://neil.brown.name/blog/mdadm"
@@ -9,46 +10,54 @@ arch="all"
license="GPL2"
depends=
makedepends="groff linux-headers"
-subpackages="$pkgname-doc"
-source="http://www.kernel.org/pub/linux/utils/raid/${pkgname}/${pkgname}-${pkgver}.tar.gz
- ${pkgname}.initd
- ${pkgname}.confd
- mdadm-raid.initd
- uclibc-bswap.patch
+subpackages="$pkgname-doc $pkgname-udev::noarch $pkgname-misc::noarch"
+source="http://www.kernel.org/pub/linux/utils/raid/$pkgname/$pkgname-$pkgver.tar.gz
+ $pkgname.initd
+ $pkgname.confd
+ $pkgname-raid.initd
"
-
-prepare() {
- cd "$srcdir/$pkgname-$pkgver"
- patch -p1 -i "$srcdir"/uclibc-bswap.patch || return 1
-}
+builddir="$srcdir/$pkgname-$pkgver"
build() {
- cd "$srcdir/$pkgname-$pkgver"
- make CXFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200809L -Wno-error"
+ cd "$builddir"
+ make || return 1
}
package() {
- cd "$srcdir/$pkgname-$pkgver"
- make DESTDIR=$pkgdir INSTALL=install install
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ install -Dm644 $pkgname.conf-example "$pkgdir"/etc/$pkgname.conf || return 1
+ 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"/ || return 1
+}
+
+misc() {
+ pkgdesc="$pkgdesc (misc scripts)"
+ depends="$pkgname bash"
- install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
- install -m755 -D "$srcdir"/$pkgname-raid.initd "$pkgdir"/etc/init.d/$pkgname-raid
- install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
- install -m644 -D mdadm.conf-example "$pkgdir"/etc/mdadm.conf
+ cd "$builddir"
+ install -Dm755 misc/mdcheck "$subpkgdir"/usr/sbin/mdcheck
+ install -Dm755 misc/syslog-events "$subpkgdir"/usr/sbin/handle-mdadm-events
}
-md5sums="d6f290afbc4a3e2f0f8465b80ffe6391 mdadm-3.4.tar.gz
+md5sums="0b5c862f794dfe8952feceb8bd4f8eb2 mdadm-4.0.tar.gz
d6ac75406869e44d671c7b5c293676d7 mdadm.initd
16d2b8eb2e17184357db503470fdd8eb mdadm.confd
-81b05eca507200f0759cc7481adde280 mdadm-raid.initd
-e6dde992d7da016f25161d6637474d26 uclibc-bswap.patch"
-sha256sums="b42840691ca76880c9d6a5cde30895db1343ac0acac0ccd1eb2ed782323ba87e mdadm-3.4.tar.gz
+81b05eca507200f0759cc7481adde280 mdadm-raid.initd"
+sha256sums="fa96ed39dd0c3d4451f42678768c07f70bd20670e80e68c60214a147e50a10dd mdadm-4.0.tar.gz
bd59ba77c053c4bf2b73319cdac7b734a22b8174efb8f2574825e4d2bc6fef2e mdadm.initd
9d3df571c3478aa83edb1d97231c5da5b2a8653232120df6d283605a8dfbb505 mdadm.confd
-acab80b9362602b44b7a24dc645ce5a453e764b68e5eae5c376824a09e92d9cf mdadm-raid.initd
-c802c69e8f9c8d3eff0771433350fc77ec5d03bf646d098d45238f47ba145ba0 uclibc-bswap.patch"
-sha512sums="f62dbe23a86be20bd30f96f32a681832c66b743a383f97d78ef2aa40153364b4206fe03cc54f5b0855dda616f7d224d51136b7bb1e1d7b8a3cb8f367923d845a mdadm-3.4.tar.gz
+acab80b9362602b44b7a24dc645ce5a453e764b68e5eae5c376824a09e92d9cf mdadm-raid.initd"
+sha512sums="032218da3e2054571b52c276ada1d9b052c473ed65660c5b58d3105841d5e2e124c573b882b668fb92b512d87f94e6f3bca3b0ce0c09a92696e9cc2f86c9f1d3 mdadm-4.0.tar.gz
ca5f4e3ff5b284102b44e818d11622e1889066e3d18edce2d62c1a44ee8f4cfdc0979121c0462a916c638423c5ebc706c46aa996a7c4f68e030589adc62803f4 mdadm.initd
7d45bf489ef93a4f217ffcf72311eb661b8de7fbf63a5344697252c0d3a684b0123ff60efa5f218da4eb4cda7c88d91c2ef3625d5e44a588e3e1210cb60b0ab9 mdadm.confd
-37022593ba090eb0690669b99d6386152242c017c1e608cea7b5420b7a6f754b377e916e4f81e2abf9941e791db78b5820e63db0e706d5de8b35e796678e921c mdadm-raid.initd
-ee67c97ab4cbffa1418f935224913ec8f3a752ad4154b4fdac1233955f196d3c01147db25b5077d9abefa48193ffa2875bfc956b526437147f5205374e1d9c93 uclibc-bswap.patch"
+37022593ba090eb0690669b99d6386152242c017c1e608cea7b5420b7a6f754b377e916e4f81e2abf9941e791db78b5820e63db0e706d5de8b35e796678e921c mdadm-raid.initd"
diff --git a/main/mdadm/uclibc-bswap.patch b/main/mdadm/uclibc-bswap.patch
deleted file mode 100644
index b1d0428dc8..0000000000
--- a/main/mdadm/uclibc-bswap.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- ./mdadm.h.orig
-+++ ./mdadm.h
-@@ -104,12 +104,15 @@
- * and there is no standard conversion function so... */
- /* And dietlibc doesn't think byteswap is ok, so.. */
- /* #include <byteswap.h> */
-+#undef bswap_16
- #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
- ((x) & 0xff00U) >> 8)
-+#undef bswap_32
- #define bswap_32(x) (((x) & 0x000000ffU) << 24 | \
- ((x) & 0xff000000U) >> 24 | \
- ((x) & 0x0000ff00U) << 8 | \
- ((x) & 0x00ff0000U) >> 8)
-+#undef bswap_64
- #define bswap_64(x) (((x) & 0x00000000000000ffULL) << 56 | \
- ((x) & 0xff00000000000000ULL) >> 56 | \
- ((x) & 0x000000000000ff00ULL) << 40 | \