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

19 lines
543 B
Bash

# Template file for 'zerofree'
pkgname=zerofree
version=1.1.1
revision=1
build_style=gnu-makefile
makedepends="e2fsprogs-devel"
short_desc="A tool to zero free blocks in an ext2 filesystem"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="https://frippery.org/uml/index.html"
distfiles="https://frippery.org/uml/${pkgname}-${version}.tgz"
checksum=956bc861b55ba0a2b7593c58d32339dab1a0e7da6ea2b813d27c80f08b723867
post_extract() {
sed -i 's|\(-lext2fs\)|$(LDFLAGS) \1|' Makefile
}
do_install() {
vbin $pkgname
}