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

25 lines
732 B
Bash

# Template file for 'squashfs-tools'
pkgname=squashfs-tools
version=4.4
revision=2
wrksrc="squashfs${version}"
build_wrksrc="squashfs-tools"
build_style=gnu-makefile
makedepends="zlib-devel lzo-devel liblzma-devel liblz4-devel libzstd-devel"
license="GPL-2.0-or-later"
homepage="http://squashfs.sf.net/"
short_desc="Tool to create and append to squashfs filesystems"
maintainer="Duncaen <duncaen@voidlinux.org>"
distfiles="${SOURCEFORGE_SITE}/squashfs/squashfs${version}.tar.gz"
checksum=a981b3f3f2054b5a2e658851a3c06a2460ad04a9a8a645e0afe063a63fdbb07e
CFLAGS="-fcommon"
do_build() {
make ${makejobs} XZ_SUPPORT=1 LZO_SUPPORT=1 LZMA_XZ_SUPPORT=1 LZ4_SUPPORT=1 ZSTD_SUPPORT=1
}
do_install() {
vbin mksquashfs
vbin unsquashfs
}