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

35 lines
1.1 KiB
Bash

# Template file for 'chatty'
pkgname=chatty
version=0.14
revision=1
hostmakedepends="gradle"
depends="virtual?java-runtime"
short_desc="Twitch Chat Client for Desktop"
maintainer="Frank Steinborn <steinex@nognu.de>"
license="GPL-3.0-only"
homepage="http://chatty.github.io/"
distfiles="https://github.com/chatty/chatty/archive/v${version}.tar.gz"
checksum=2eed3a4ed4f1ea58d89e535182bd32771522e4bccb5aa3bf4329aec9d7ab554c
do_build() {
gradle shadowJar
}
do_install() {
vmkdir usr/share/${pkgname}
vinstall build/libs/Chatty.jar 644 usr/share/${pkgname}
vmkdir usr/share/${pkgname}/img
vinstall assets/img/chatty.png 644 usr/share/${pkgname}/img
vinstall assets/img/star.png 644 usr/share/${pkgname}/img
vmkdir usr/share/${pkgname}/sounds
vinstall assets/sounds/ding.wav 644 usr/share/${pkgname}/sounds
vinstall assets/sounds/dingdong.wav 644 usr/share/${pkgname}/sounds
vinstall assets/sounds/typing.wav 644 usr/share/${pkgname}/sounds
vbin $FILESDIR/${pkgname}
vinstall src/${pkgname}/gui/app_main_64.png 644 usr/share/pixmaps chatty.png
vinstall ${FILESDIR}/chatty.desktop 644 usr/share/applications
}