void-packages/srcpkgs/sopwith/template
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: 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

23 lines
710 B
Bash

# Template file for 'sopwith'
pkgname=sopwith
version=1.8.4
revision=2
build_style=gnu-configure
hostmakedepends="automake SDL-devel"
makedepends="SDL-devel"
short_desc="Sidescrolling shoot 'em up game"
maintainer="beefcurtains <beefcurtains@users.noreply.github.com>"
license="GPL-2.0-or-later"
homepage="http://sdl-sopwith.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/sdl-sopwith/sdl_sopwith/${version}/sopwith-${version}.tar.gz"
checksum=a5ecb795a7aeff6be3ebfb99f1c6218054b73048786809f8468a92c952c17bd0
pre_configure() {
mv configure.{in,ac}
autoreconf -fi
}
post_install() {
vinstall ${FILESDIR}/sopwith.png 644 usr/share/pixmaps
vinstall ${FILESDIR}/sopwith.desktop 644 usr/share/applications
}