void-packages/srcpkgs/Clight/template
Đoàn Trần Công Danh ec4c2d75fa srcpkgs/[A-Z]*: 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

23 lines
811 B
Bash

# Template file for 'Clight'
pkgname=Clight
version=4.5
revision=1
build_style=cmake
hostmakedepends="pkg-config"
makedepends="popt-devel gsl-devel libconfig-devel elogind-devel bash-completion
dbus-devel libmodule-devel"
depends="Clightd>=5.0"
short_desc="Use your webcam as a light sensor to adjust screen backlight"
maintainer="Dominic Monroe <monroef4@googlemail.com>"
license="GPL-3.0-or-later"
homepage="https://github.com/FedeDP/Clight"
distfiles="https://github.com/FedeDP/Clight/archive/${version}.tar.gz"
checksum=2ce204edd58284c178b99e2ffec0105fc8e78d8a076350f64424b66c9878e91e
post_install() {
vcompletion Extra/completions/_clight zsh
vcompletion Extra/completions/clight bash
vcompletion Extra/completions/clight.fish fish
vinstall Extra/desktop/clight.desktop 644 usr/share/applications
}