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

58 lines
1.5 KiB
Bash

# Template file for 'MonkeysAudio'
pkgname=MonkeysAudio
version=5.28
revision=3
create_wrksrc=yes
build_style="gnu-makefile"
depends="libMAC>=${version}_${revision}"
short_desc="Fast and powerful lossless audio (de)compressor"
maintainer="Orphaned <orphan@voidlinux.org>"
license="custom:MIT-like"
homepage="https://monkeysaudio.com/"
distfiles="https://monkeysaudio.com/files/MAC_SDK_${version//./}.zip
https://monkeysaudio.com/license.html"
checksum="0000cbfad5f008014bf3d963b72039c518a1e93ded55b23da715d912c830623e
7d60dabaf760f32180e272b5955d5f1a2febcf9930eff13e49a1934a286a5819"
skip_extraction="license.html"
do_build() {
cp -p ${XBPS_SRCDISTDIR}/${pkgname}-${version}/license.html ${wrksrc}
ln Source/Projects/NonWindows/Makefile .
vsed -i Makefile \
-e "s;^VERSION.*;VERSION = 6.0.0;" \
-e "s;^DLLLDOPTS.*;DLLLDOPTS = -shared -Wl,-soname,libMAC.so.6;"
make ${makejobs}
}
do_install() {
make prefix="${DESTDIR}"/usr install
ln -s libMAC.so.6.0.0 "${DESTDIR}"/usr/lib/libMAC.so.6.0
ln -s libMAC.so.6.0.0 "${DESTDIR}"/usr/lib/libMAC.so.6
vmkdir usr/lib/pkgconfig
sed ${FILESDIR}/MAC.pc \
-e "s;%VER%;${version};" \
-e "s;%REL%;${revision};" \
> ${DESTDIR}/usr/lib/pkgconfig/MAC.pc
vlicense license.html
vdoc Readme.txt
}
libMAC-devel_package() {
short_desc+=" - development files"
depends="libMAC>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/lib/libMAC.so
}
}
libMAC_package() {
short_desc+=" - library"
pkg_install() {
vmove "usr/lib/libMAC.so.*"
}
}