void-packages/srcpkgs/mdadm/template
Đoàn Trần Công Danh 765e304c4b srcpkgs/m*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

26 lines
846 B
Bash

# Template file for 'mdadm'
pkgname=mdadm
version=4.1
revision=3
hostmakedepends="pkg-config"
makedepends="eudev-libudev-devel"
short_desc="Tool for managing/monitoring Linux md device arrays"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="GPL-2"
homepage="https://git.kernel.org/cgit/utils/mdadm/mdadm.git/log/"
distfiles="${KERNEL_SITE}/utils/raid/${pkgname}/${pkgname}-${version}.tar.xz"
checksum=ab7688842908d3583a704d491956f31324c3a5fc9f6a04653cb75d19f1934f4a
pre_configure() {
sed -i 's,^install : mdadm mdmon,install: ,g' Makefile
}
do_build() {
make ${makejobs} CC=$CC \
CFLAGS="$CFLAGS -DNO_COROSYNC -DNO_DLM -Wno-error -DSendmail='\"sendmail -t\"'" \
BINDIR=/usr/bin LDFLAGS="$LDFLAGS"
}
do_install() {
make BINDIR=/usr/bin STRIP= PREFIX=/usr DESTDIR=${DESTDIR} install
vsv mdadm
vsconf mdadm.conf-example mdadm.conf
}