void-packages/srcpkgs/alsa-firmware/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

27 lines
974 B
Bash

# Template file for 'alsa-firmware'
pkgname=alsa-firmware
version=1.2.4
revision=1
build_style=gnu-configure
configure_args="--with-hotplug-dir=/usr/lib/firmware"
short_desc="Advanced Linux Sound Architecture (ALSA) firmware"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="GPL-2.0-only, BSD-3-Clause-Clear"
homepage="http://www.alsa-project.org"
distfiles="https://www.alsa-project.org/files/pub/firmware/${pkgname}-${version}.tar.bz2"
checksum=b67b6d7d08bcfc247ef6ff0ab88a99c188305a3cf57ae2dfd0bcd9a5b36cd5bb
nostrip=yes
ignore_elf_files="/usr/share/alsa/firmware/mixartloader/miXart8.elf"
pre_configure() {
export CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" LDFLAGS="${BUILD_LDFLAGS}"
}
post_install() {
# Removed to prevent any conflict with 'linux-firmware' package
rm -rfv ${DESTDIR}/usr/lib/firmware/{ess,korg,sb16,yamaha}
rm -fv ${DESTDIR}/usr/lib/firmware/ctefx.bin
rm -fv ${DESTDIR}/usr/lib/firmware/ctspeq.bin
vlicense aica/license.txt AICA_LICENSE
}