void-packages/srcpkgs/lshw/template
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: 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

33 lines
890 B
Bash

# Template file for 'lshw'
pkgname=lshw
version=B.02.19.2
revision=2
build_style=gnu-makefile
make_build_args="VERSION=${version}"
make_build_target="all gui"
make_install_args="SBINDIR=/usr/bin"
make_install_target="install install-gui"
make_use_env=yes
hostmakedepends="docbook2x pkg-config"
makedepends="gtk+-devel"
short_desc="Hardware lister application"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-only"
homepage="https://ezix.org/project/wiki/HardwareLiSter"
distfiles="https://ezix.org/software/files/lshw-${version}.tar.gz"
checksum=9bb347ac87142339a366a1759ac845e3dbb337ec000aa1b99b50ac6758a80f80
post_patch() {
vsed -i src/Makefile src/gui/Makefile \
-e 's,CXXFLAGS=,CXXFLAGS += ,g'
}
gtk-lshw_package() {
depends+=" lshw"
short_desc+=" (GTK UI)"
pkg_install() {
vmove usr/share/lshw/artwork
vmove usr/share/lshw/ui
vmove usr/bin/gtk-lshw
}
}