void-packages/srcpkgs/rdedup/template
Đoàn Trần Công Danh 103ab731ab srcpkgs/r*: convert patches to -Np1
* runit 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

25 lines
786 B
Bash

# Template file for 'rdedup'
pkgname=rdedup
version=3.1.1
revision=6
wrksrc=rdedup-rdedup-v${version}
build_style=cargo
hostmakedepends="pkg-config clang"
makedepends="openssl-devel liblzma-devel libsodium-devel"
short_desc="Data deduplication engine"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MPL-2.0"
homepage="https://github.com/dpc/rdedup"
distfiles="https://github.com/dpc/rdedup/archive/rdedup-v${version}.tar.gz"
checksum=5e7c09c40897cd2f2635e8c213c2ff0f5c4d7ceccbd22980cd4cb0a16f3dfc28
if [ "$CROSS_BUILD" ]; then
export HOST_CC="$BUILD_CC"
export HOST_CFLAGS="$BUILD_CFLAGS"
export BINDGEN_EXTRA_CLANG_ARGS="--sysroot=${XBPS_CROSS_BASE}"
fi
pre_build() {
cargo update --package openssl-sys --precise 0.9.58
cargo update --package openssl --precise 0.10.22
}