summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikuro Kagamine2018-07-27 13:37:16 +1000
committerMikuro Kagamine2018-07-27 13:37:16 +1000
commit68af7493a083a521a9f115b06e5f274dd830011c (patch)
treebe40f8b3410706a932b6ff8be4c3b7e99ba968b0
parent872ccf2b9ad7a614f696d8f49f68759e01769b41 (diff)
downloadaur-68af7493a083a521a9f115b06e5f274dd830011c.tar.gz
silence upx warning, don\'t modify binary in-place
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD15
2 files changed, 14 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b00ca00e68d..d3249e3fcf3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,12 @@
pkgbase = browsh-bin
pkgdesc = A fully-modern text-based browser, rendering to TTY and browsers
pkgver = 1.4.8
- pkgrel = 1
+ pkgrel = 2
url = https://www.brow.sh
arch = x86_64
license = LGPL2.1
depends = firefox>=57
+ optdepends = upx: compress binary
provides = browsh
conflicts = browsh
conflicts = browsh-git
diff --git a/PKGBUILD b/PKGBUILD
index e6e426e939d..1526c993d6b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,18 +2,27 @@
pkgname=browsh-bin
pkgver=1.4.8
-pkgrel=1
+pkgrel=2
pkgdesc='A fully-modern text-based browser, rendering to TTY and browsers'
arch=('x86_64')
url='https://www.brow.sh'
license=('LGPL2.1')
depends=('firefox>=57')
+optdepends=('upx: compress binary')
provides=('browsh')
conflicts=('browsh' 'browsh-git')
options=('!strip')
-source=("https://github.com/browsh-org/browsh/releases/download/v${pkgver}/browsh_${pkgver}_linux_amd64")
+source=("https://github.com/${provides[0]}-org/${provides[0]}/releases/download/v${pkgver}/${provides[0]}_${pkgver}_linux_amd64")
sha512sums=('ca58a9386c46f0a182d7170565c09a3f1bbba25d51aff8408bd73721f886247fe388d446909cefa8abf7c9f13dd0be63f7e925d6c7b68f8a950ff229ac5a67f3')
+prepare() {
+ cat ${provides[0]}_${pkgver}_linux_amd64 > ${provides[0]}
+ if [ $(which upx 2>/dev/null) ]; then
+ echo Compressing ${provides[0]} with UPX...
+ chmod u+x ${provides[0]}
+ upx --best ${provides[0]}; fi
+}
+
package() {
- install -Dm755 browsh_${pkgver}_linux_amd64 $pkgdir/usr/bin/browsh
+ install -Dm755 ${provides[0]} "$pkgdir/usr/bin/${provides[0]}"
}