void-packages/srcpkgs/libsearpc/template
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: 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

57 lines
1.4 KiB
Bash

# Template file for 'libsearpc'
# WARNING: upstream sometimes retag source. Wait for official announcement
pkgname=libsearpc
# 3.2-latest (as of 2021-04-10)
version=3.2.0.20200318
revision=1
_gitrev=50ff08b03c7cec8e10b35ba438633b9fe08a8d90
wrksrc="${pkgname}-${_gitrev}"
build_style=gnu-configure
configure_args="--with-python3 --disable-static --disable-compile-demo"
hostmakedepends="automake libtool pkg-config python3 glib-devel"
makedepends="libglib-devel jansson-devel"
short_desc="Seafile RPC library"
maintainer="yopito <pierre.bourgin@free.fr>"
license="LGPL-3.0-or-later, Apache-2.0"
homepage="https://seafile.com"
distfiles="https://github.com/haiwen/libsearpc/archive/${_gitrev}.tar.gz"
checksum=2a58894cefbc1d7398581fc58103261688c93a9cf63f11afc5e92142ed948c00
python_version=3
pre_configure() {
./autogen.sh
}
post_install() {
vdoc AUTHORS
vdoc README.markdown
}
libsearpc-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
}
libsearpc-codegen_package() {
short_desc+=" - code generator"
depends="python3"
python_version=3
pkg_install() {
vdoc AUTHORS
vdoc README.markdown
vmove usr/bin/searpc-codegen.py
}
}
libsearpc-python3_package() {
short_desc+=" - Python3 bindings"
depends="python3"
pkg_install() {
vmove usr/lib/python3*
}
}