void-packages/srcpkgs/xfsprogs/template
Đoàn Trần Công Danh 3353bf4722 srcpkgs/x*: 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

35 lines
1 KiB
Bash

# Template file for 'xfsprogs'
pkgname=xfsprogs
version=5.12.0
revision=1
build_style=gnu-configure
configure_args="--enable-editline=yes --enable-lib64=no"
hostmakedepends="gettext libuuid-devel"
makedepends="libblkid-devel libedit-devel inih-devel"
short_desc="Utilities for managing the XFS filesystem"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="http://xfs.org/index.php/Main_Page"
distfiles="${KERNEL_SITE}/utils/fs/xfs/xfsprogs/xfsprogs-${version}.tar.xz"
checksum=bec44445cf18f49e63971d4f27dc4e90a17b118b852714a1104b621ea30e3507
post_extract() {
sed -i '1i#include <signal.h>' include/linux.h
}
do_install() {
make install install-dev DIST_ROOT=${DESTDIR} \
PKG_ROOT_SBIN_DIR=/usr/bin PKG_ROOT_LIB_DIR=/usr/lib
rm -rf ${DESTDIR}/usr/share/doc
}
xfsprogs-devel_package() {
depends="libuuid-devel ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/share/man/man3
}
}