void-packages/srcpkgs/kdb/template
Đoàn Trần Công Danh dd9d4a1979 srcpkgs/k*: 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
868 B
Bash

# Template file for 'kdb'
pkgname=kdb
version=3.2.0
revision=5
build_style=cmake
hostmakedepends="extra-cmake-modules doxygen pkg-config kcoreaddons"
makedepends="kcoreaddons-devel postgresql-libs-devel libmariadbclient-devel
sqlite-devel"
short_desc="Database connectivity and creation framework"
maintainer="John <me@johnnynator.dev>"
license="LGPL-2.0-or-later"
homepage="http://www.kexi-project.org/"
distfiles="${KDE_SITE}/kdb/src/kdb-${version}.tar.xz"
checksum=8f8983bc8d143832dc14bc2003ba6af1af27688e477c0c791fd61445464f2069
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" qt5-qmake qt5-host-tools python3"
fi
kdb-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/lib/cmake
vmove usr/lib/qt5/mkspecs
vmove "usr/lib/*.so"
}
}