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

31 lines
977 B
Bash

# Template file for 'Maelstrom'
pkgname=Maelstrom
version=3.0.7
revision=1
wrksrc="${pkgname}-${version%a}"
build_style=gnu-configure
hostmakedepends="automake libtool SDL2_net-devel"
makedepends="SDL2_net-devel"
short_desc="Guide your ship through the Maelstrom asteroid belt"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.libsdl.org/projects/Maelstrom/"
distfiles="${homepage}/src/${pkgname}-${version}.tar.gz"
checksum=93680322f4b04d4727ea8e0b461f259b604dc69e7465cb91d2b9aad378a9a036
CXXFLAGS="-Wno-error -Wno-write-strings -Wno-unused-result"
pre_configure() {
mv configure.{in,ac}
./autogen.sh
}
post_install() {
make target=${DESTDIR}/usr/share/doc/$pkgname install_gamedocs
vbin Maelstrom
vman ${FILESDIR}/Maelstrom.6
vmkdir usr/share/applications
vinstall ${FILESDIR}/Maelstrom.desktop 644 usr/share/applications
vmkdir usr/share/pixmaps
ln -s ../$pkgname/icon.xpm ${DESTDIR}/usr/share/pixmaps/$pkgname.xpm
}