void-packages/srcpkgs/re/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

50 lines
1.2 KiB
Bash

# Template file for 're'
pkgname=re
version=2.0.1
revision=1
build_style=gnu-makefile
make_build_args="RELEASE=1 EXTRA_CFLAGS=$CFLAGS
EXTRA_LFLAGS=$LDFLAGS USE_OPENSSL=yes USE_DTLS=yes
USE_DTLS_SRTP=yes USE_ZLIB=yes"
make_install_args="$make_build_args"
make_use_env=1
makedepends="openssl-devel zlib-devel"
short_desc="Portable library for real-time communications"
maintainer="John <me@johnnynator.dev>"
license="BSD-3-Clause"
homepage="https://github.com/baresip/re/"
distfiles="https://github.com/baresip/re/archive/v${version}.tar.gz"
checksum=43aa439b96aff75fe5768b9f9d49dea97042e42e7647df47b345465763e2f7ed
shlib_provides="libre.so"
case $XBPS_TARGET_MACHINE in
i686*) arch="i686";;
x86_64*) arch="x86_64";;
armv6*) arch="arm6";;
aarch64*) arch="arm64";;
arm*) arch="arm";;
mips*) arch="mips";;
ppc64*) arch="ppc64";;
esac
make_build_args+=" ARCH=$arch"
make_install_args+=" ARCH=$arch"
pre_build() {
make ${make_build_args} info
}
post_install() {
vlicense docs/COPYING
}
re-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/*.a
vmove usr/lib/pkgconfig
vmove usr/share/re/re.mk
}
}