void-packages/srcpkgs/foremost/template
Đoàn Trần Công Danh be5369a0cb srcpkgs/f*: convert patches to -Np1
* fpc is kept at -Np0

```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
672 B
Bash

# Template file for 'foremost'
pkgname=foremost
version=1.5.7
revision=6
conf_files="/etc/foremost.conf"
short_desc="Forensic program to recover lost files"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Public Domain"
homepage="http://foremost.sourceforge.net/"
distfiles="http://foremost.sourceforge.net/pkg/foremost-${version}.tar.gz"
checksum=502054ef212e3d90b292e99c7f7ac91f89f024720cd5a7e7680c3d1901ef5f34
CFLAGS="-fcommon"
do_configure() {
sed "s,RAW_FLAGS =.*,RAW_FLAGS = $CFLAGS," -i Makefile
}
do_build() {
make RAW_CC="$CC" LINK_OPT="$LDFLAGS" ${makejobs}
}
do_install() {
vbin foremost
gunzip foremost.8.gz
vman foremost.8
vconf foremost.conf
}