void-packages/srcpkgs/treesheets/template
Đoàn Trần Công Danh 4f75cf25fd srcpkgs/t*: 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

40 lines
1.3 KiB
Bash

# Template file for 'treesheets'
pkgname=treesheets
version=1.0.2
revision=1
build_style=cmake
build_helper="cmake-wxWidgets-gtk3"
makedepends="wxWidgets-gtk3-devel"
short_desc="Free Form Data Organizer"
maintainer="Piraty <piraty1@inbox.ru>"
license="Zlib"
homepage="http://strlen.com/treesheets/"
distfiles="https://github.com/aardappel/treesheets/archive/v${version}.tar.gz"
checksum=84eb82f122bc7be3ded399d2511536128911477a4a69c51b26b856de2160405f
do_install() {
vmkdir usr/lib/${pkgname}
vinstall build/TS/treesheets 755 usr/lib/${pkgname}
printf '#!/bin/sh\nexec /usr/lib/treesheets/treesheets "$@"' > treesheets.sh
vbin treesheets.sh treesheets
vlicense ZLIB_LICENSE.txt
vdoc TS/readme.html
vcopy "TS/docs/*" usr/share/doc/${pkgname}
vcopy TS/examples usr/lib/${pkgname}
vcopy TS/images usr/lib/${pkgname}
vcopy TS/scripts usr/lib/${pkgname}
vcopy TS/translations usr/lib/${pkgname}
vinstall TS/images/icon32.png 644 usr/share/pixmaps treesheets.png
vinstall TS/images/icon16.png 644 usr/share/pixmaps treesheets-16x16.png
vinstall TS/images/treesheets.svg 644 usr/share/pixmaps treesheets.svg
vmkdir usr/share/applications/
vsed -i "s|Icon=images/treesheets.svg|Icon=treesheets.png|" TS/treesheets.desktop
vinstall TS/treesheets.desktop 644 usr/share/applications
}