void-packages/srcpkgs/opensm/template
Đoàn Trần Công Danh 2fd8d4df94 srcpkgs/o*: 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

31 lines
794 B
Bash

# Template file for 'opensm'
pkgname=opensm
version=3.3.22
revision=1
build_style=gnu-configure
hostmakedepends="automake bison flex libtool"
makedepends="rdma-core-devel"
short_desc="InfiniBand Subnet Manager and Administrator"
maintainer="Rich G <rich@richgannon.net>"
license="GPL-2.0-only"
homepage="https://github.com/linux-rdma/opensm"
distfiles="https://github.com/linux-rdma/opensm/releases/download/${version}/opensm-${version}.tar.gz"
checksum=1e0dc56a5cf5f8e5cd68bd534591405a5f5f1975ace40509f61a43cc2fe74ca7
pre_configure() {
./autogen.sh
}
post_install() {
rm -rf ${DESTDIR}/etc/init.d
}
opensm-devel_package() {
depends="opensm-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove "usr/lib/*.a"
}
}