void-packages/srcpkgs/alsa-tools/template
Đoàn Trần Công Danh ae69000001 srcpkgs/a*: convert patches to -Np1
* arduino and antiword is kept at -Np0

```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

52 lines
1.4 KiB
Bash

# Template file for 'alsa-tools'
pkgname=alsa-tools
version=1.2.2
revision=2
hostmakedepends="pkg-config"
makedepends="fltk-devel gtk+-devel gtk+3-devel"
depends="python3-gobject python3-alsa"
short_desc="Advanced ALSA tools for certain sound cards"
maintainer="Steve Prybylski <sa.prybylx@gmail.com>"
license="GPL-2.0-only"
homepage="http://alsa-project.org"
distfiles="https://www.alsa-project.org/files/pub/tools/alsa-tools-${version}.tar.bz2"
checksum=bfd3c7aae1289269605d3da02279159b10e3dabdd31e658cbceaa30170957349
python_version=3
_tools="
as10k1 echomixer envy24control hdajackretask hdajacksensetest hda-verb hdspconf
hdsploader hdspmixer hwmixvolume ld10k1 mixartloader pcxhrloader rmedigicontrol
sb16_csp seq/sbiload sscape_ctl us428control usx2yloader vxloader
"
do_configure() {
for tool in ${_tools}; do
cd ${wrksrc}/${tool}
msg_normal "Configuring ${tool} ...\n"
./configure ${configure_args}
done
}
do_build() {
for tool in ${_tools}; do
msg_normal "Building ${tool} ...\n"
make -C ${tool} ${makejobs}
done
}
do_install() {
for tool in ${_tools}; do
msg_normal "Installing ${tool} ...\n"
make -C ${tool} DESTDIR=${DESTDIR} install
done
}
alsa-tools-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/*.so
vmove usr/share/aclocal
}
}