void-packages/srcpkgs/containers.image/template
Đoàn Trần Công Danh c987560802 srcpkgs/c*: 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

30 lines
854 B
Bash

# Template file for 'containers.image'
pkgname=containers.image
version=5.0.0
revision=1
wrksrc="image-${version}"
conf_files="/etc/containers/registries.conf /etc/containers/policy.json"
hostmakedepends="go-md2man"
short_desc="Configuration shared by podman, buildah, and skopeo"
maintainer="Cameron Nemo <cnemo@tutanota.com>"
license="Apache-2.0"
homepage="https://github.com/containers/image"
distfiles="https://github.com/containers/image/archive/v${version}.tar.gz"
checksum=99440d59728ed741e6171046cf3a6a820c2e3414cd9c17ee640efd289a015c3f
do_build() {
mkdir -p build
for doc in docs/*.*.md; do
docbase="${doc##*/}"
go-md2man -in "${doc}" -out "build/${docbase/.md/}"
done
}
do_install() {
for man in build/*; do
vman "${man}"
done
vinstall registries.conf 0644 etc/containers
vinstall "${FILESDIR}/policy.json" 0644 etc/containers
}