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

32 lines
938 B
Bash

# Template file for 'sway'
pkgname=sway
version=1.6
revision=2
build_style=meson
configure_args="-Dwerror=false -Db_ndebug=false"
conf_files="/etc/sway/config"
hostmakedepends="pkg-config wayland-devel scdoc git"
makedepends="wlroots-devel pcre-devel json-c-devel pango-devel cairo-devel
gdk-pixbuf-devel"
depends="swaybg xorg-server-xwayland"
short_desc="Tiling Wayland compositor compatible with i3"
maintainer="Olaf Mersmann <olafm@p-value.net>"
license="MIT"
homepage="https://swaywm.org"
distfiles="https://github.com/swaywm/${pkgname}/archive/${version}.tar.gz"
checksum=9ecfd2f38239f7e90922a13cd348fc95fc059e8fa0e4b75b8ffcc7b61685a5fb
post_install() {
vlicense LICENSE
vbin contrib/grimshot
vman contrib/grimshot.1
}
grimshot_package() {
short_desc="Helper for screenshots within sway"
depends="grim slurp sway wl-clipboard jq libnotify"
pkg_install() {
vmove usr/bin/grimshot
vmove usr/share/man/man1/grimshot.1
}
}