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

50 lines
1.5 KiB
Bash

# Template file for 'sauerbraten'
pkgname=sauerbraten
version=2013.02.03
revision=3
wrksrc=$pkgname
build_wrksrc=src
build_style=gnu-makefile
makedepends="SDL_image-devel SDL_mixer-devel zlib-devel"
depends="${pkgname}-data-${version}_${revision}"
short_desc="3D game engine (more powerful redesign of the Cube engine) and FPS game"
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
license="Zlib"
homepage="http://sauerbraten.org"
distfiles="${SOURCEFORGE_SITE}/sauerbraten/sauerbraten_${version//./_}_collect_edition_linux.tar.bz2"
checksum=45c20521e3e56374490b2d9112a211538e801cf0161197f35476b30b7b58a78e
restricted="Very large - not worth storing on current Void infrastructure"
# Build is only supported on i686 and x86_64, and enet doesn't cross compile
archs="i686* x86_64*"
post_install() {
vbin $wrksrc/bin_unix/native_client sauer_client
vbin ${FILESDIR}/sauerbraten
}
sauerbraten-data_package() {
short_desc+=" - data files"
pkg_install() {
vmkdir usr/share/$sourcepkg
vcopy $wrksrc/data usr/share/$sourcepkg/data
vcopy $wrksrc/packages usr/share/$sourcepkg/packages
}
}
sauerbraten-server_package() {
conf_files="/etc/sauerbraten/server-init.cfg"
short_desc+=" - standalone server"
pkg_install() {
vbin $wrksrc/bin_unix/native_server sauer_server
vmkdir etc/$sourcepkg
vcopy $wrksrc/server-init.cfg etc/$sourcepkg/server-init.cfg
vbin ${FILESDIR}/sauerbraten-server
# No service directory because this server isn't really suited
# to running for long periods of time.
}
}