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

28 lines
807 B
Bash

# Template file for 'chmlib'
pkgname=chmlib
version=0.40
revision=4
build_style=gnu-configure
configure_args="--enable-examples"
short_desc="Utilities for dealing with Microsoft ITSS/CHM format files"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="http://www.jedrea.com/chmlib/"
distfiles="http://www.jedrea.com/${pkgname}/${pkgname}-${version}.tar.bz2"
checksum=3449d64b0cf71578b2c7e3ddc048d4af3661f44a83941ea074a7813f3a59ffa3
libchmlib_package() {
short_desc="Library for dealing with Microsoft ITSS/CHM format files"
pkg_install() {
vmove usr/lib/*.so.*
}
}
libchmlib-devel_package() {
short_desc="${short_desc} - development files"
depends="libchmlib>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/*.a
vmove usr/lib/*.so
}
}