summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgilcu32022-09-30 00:28:04 +0200
committergilcu32022-09-30 00:28:04 +0200
commita70ec8de2e67b5eebd30777f45135b08f6ebdf81 (patch)
tree601d74808ad3daaa376153578472456c110ec376
parent9e7e59463a6085d19fd3ba8b4b52158e7e4ce9d9 (diff)
downloadaur-a70ec8de2e67b5eebd30777f45135b08f6ebdf81.tar.gz
fixed an issue related to the xpi; removed non-necessary build steps
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD49
2 files changed, 13 insertions, 42 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4a86871a3933..4014a3ea0e19 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = browsh
pkgdesc = A fully-modern text-based browser, rendering to TTY and browsers
pkgver = 1.8.0
- pkgrel = 1
+ pkgrel = 2
url = https://www.brow.sh
arch = x86_64
arch = i686
@@ -11,7 +11,7 @@ pkgbase = browsh
arch = aarch64
license = LGPL2.1
makedepends = git
- makedepends = npm
+ makedepends = go
depends = firefox>=63
optdepends = upx: compress binary
conflicts = browsh-bin
@@ -20,9 +20,7 @@ pkgbase = browsh
options = !strip
source = https://github.com/browsh-org/browsh/archive/v1.8.0.tar.gz
source = https://github.com/browsh-org/browsh/releases/download/v1.8.0/browsh-1.8.0.xpi
- source = https://dl.google.com/go/go1.18.linux-amd64.tar.gz
sha256sums = 81b1f9d725527f851457046845f8ed0d1fdd00fdc97d3c19e69c0bc5a7e70cd3
sha256sums = d76c566dfe278181d62ca57dcb2c728b4372ff31d28f6a3b21c6adb3e11ffa90
- sha256sums = e85278e98f57cdb150fe8409e6e5df5343ecb13cebf03a5d5ff12bd55a80264f
pkgname = browsh
diff --git a/PKGBUILD b/PKGBUILD
index 32ded05247d1..b1d5ab36cc05 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,13 +3,12 @@
pkgname=browsh
pkgver=1.8.0
-pkgrel=1
-GOVERSION=1.18
+pkgrel=2
pkgdesc='A fully-modern text-based browser, rendering to TTY and browsers'
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
url='https://www.brow.sh'
license=('LGPL2.1')
-makedepends=('git' 'npm')
+makedepends=('git' 'go')
optdepends=('upx: compress binary')
depends=('firefox>=63')
conflicts=('browsh-bin' 'browsh-git')
@@ -17,61 +16,35 @@ options=('!strip')
noextract=("${pkgname}-${pkgver}-an.fx.xpi")
source=("https://github.com/${pkgname}-org/${pkgname}/archive/v${pkgver}.tar.gz"
"https://github.com/${pkgname}-org/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.xpi"
- "https://dl.google.com/go/go${GOVERSION}.linux-amd64.tar.gz")
+ )
sha256sums=('81b1f9d725527f851457046845f8ed0d1fdd00fdc97d3c19e69c0bc5a7e70cd3'
'd76c566dfe278181d62ca57dcb2c728b4372ff31d28f6a3b21c6adb3e11ffa90'
- 'e85278e98f57cdb150fe8409e6e5df5343ecb13cebf03a5d5ff12bd55a80264f')
+ )
prepare() {
cw=$(pwd)
- export GOPATH=$cw/home/go
+ export GOPATH=$cw/go
mkdir -p $GOPATH
- export GOROOT=$cw/go
- mkdir -p $GOROOT
- export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
+ export PATH=$GOPATH/bin:$PATH
if [[ -e "${GOPATH}/src/github.com/browsh-org" ]]
then
rm -r "${GOPATH}/src/github.com/browsh-org"
fi
mkdir -p "${GOPATH}/src/github.com/browsh-org/${pkgname}"
- ln -sf "../../../../../../${pkgname}-${pkgver}/interfacer/" "${GOPATH}/src/github.com/browsh-org/${pkgname}/interfacer"
_interfacer="${GOPATH}/src/github.com/browsh-org/${pkgname}/interfacer"
-
- go install github.com/shuLhan/go-bindata/v4/cmd/go-bindata@master
-
- cd ${_interfacer}
-
-
- echo Turn webext into an embeddable binary...
- xpipath="$(mktemp -d)"
- cp "${srcdir}/${pkgname}-${pkgver}.xpi" "${xpipath}/${pkgname}.xpi"
- if [ $(which upx 2>/dev/null) ]; then
- _compress="-nocompress"
- else
- _compress=""; fi
- go-bindata $_compress\
- -prefix "${xpipath}"\
- -pkg $pkgname\
- -o "${_interfacer}/src/${pkgname}/${pkgname}.xpi"\
- "${xpipath}/${pkgname}.xpi"
- rm -r "${xpipath}"
-
+ ln -sf "../../../../../${pkgname}-${pkgver}/interfacer/" "${_interfacer}"
+ cp "${srcdir}/${pkgname}-${pkgver}.xpi" "${_interfacer}/src/${pkgname}/${pkgname}.xpi"
}
build() {
cw=$(pwd)
- export GOPATH=$cw/home/go
- ls $GOPATH
- export GOROOT=$cw/go
- export _interfacer="${GOPATH}/src/github.com/browsh-org/${pkgname}/interfacer"
-
-
+ export GOPATH=$cw/go
+ _interfacer="${GOPATH}/src/github.com/browsh-org/${pkgname}/interfacer"
cd "$_interfacer"
echo Build ${pkgname}...
local webextension="src/browsh/browsh.xpi"
- md5sum "$webextension"
- go build -x\
+ go build -x -modcacherw \
-gcflags "all=-trimpath=${GOPATH}"\
-asmflags "all=-trimpath=${GOPATH}"\
-o "${srcdir}/${pkgname}" ./cmd/browsh