```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 ```
28 lines
911 B
Bash
28 lines
911 B
Bash
# Template file for 'browsh'
|
|
pkgname=browsh
|
|
version=1.6.4
|
|
revision=2
|
|
build_wrksrc=interfacer
|
|
build_style=go
|
|
go_import_path="github.com/browsh-org/browsh"
|
|
go_package=./cmd/browsh
|
|
hostmakedepends="go-bindata"
|
|
depends="firefox"
|
|
short_desc="Fully-modern text-based browser, rendering to TTY and browsers"
|
|
maintainer="zhengqunkoo <root@zhengqunkoo.com>"
|
|
license="LGPL-2.1-only"
|
|
homepage="https://www.brow.sh/"
|
|
distfiles="https://$go_import_path/archive/v$version.tar.gz
|
|
https://$go_import_path/releases/download/v${version}/browsh-${version}-an.fx.xpi>browsh.xpi"
|
|
checksum="965ce2d94d1d9e4b92411d344421c0bea40994527cafd694c5a6e8e206681ede
|
|
b410527a69dba88a30d8a6d341a20eb5cb1f84b684e9bc8bb6bc88a2930e0eea"
|
|
skip_extraction="browsh.xpi"
|
|
|
|
pre_build() {
|
|
_prefix="$XBPS_SRCDISTDIR/$pkgname-$version"
|
|
go-bindata \
|
|
-prefix "$_prefix" \
|
|
-pkg ${pkgname} \
|
|
-o "src/browsh/webextension.go" \
|
|
"$_prefix/browsh.xpi"
|
|
}
|