void-packages/srcpkgs/notes-up/template
Đoàn Trần Công Danh 65749575ab srcpkgs/n*: 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

25 lines
1,011 B
Bash

# Template file for 'notes-up'
pkgname=notes-up
version=2.0.2
revision=1
wrksrc=Notes-up-${version}
build_style=cmake
configure_args="-Dnoele=$(vopt_if pantheon false true)"
hostmakedepends="pkg-config intltool vala glib-devel"
makedepends="libgee08-devel discount-devel webkit2gtk-devel granite-devel
gtksourceview-devel gtkspell3-devel"
depends="hicolor-icon-theme $(vopt_if pantheon contractor)"
short_desc="Markdown notes editor & manager"
maintainer="Lorem <notloremipsum@protonmail.com>"
license="GPL-2.0-or-later, BSD-3-Clause"
homepage="https://github.com/Philip-Scott/Notes-up"
distfiles="https://github.com/Philip-Scott/Notes-up/archive/${version}.tar.gz"
checksum=35eb1df71034a118e66e6e00f5394c68423cfba7ceac035bde156d77da933b17
build_options="pantheon"
desc_option_pantheon="build with Contractor support"
post_install() {
ln -s com.github.philip-scott.notes-up ${DESTDIR}/usr/bin/notes-up
vlicense data/assets/highlightjs/highlight.LICENSE
rm ${DESTDIR}/usr/share/notes-up/highlight.LICENSE
}