void-packages

Void Source Packages
git clone git://ezup.dev/void-packages.git
Log | Files | Refs | README | LICENSE

template (1316B)


      1 # Template file for 'browsh'
      2 pkgname=browsh
      3 version=1.6.4
      4 revision=1
      5 build_style=go
      6 go_import_path="github.com/browsh-org/browsh"
      7 go_package="$go_import_path/interfacer/src"
      8 hostmakedepends="curl dep go-bindata"
      9 depends="firefox"
     10 short_desc="Fully-modern text-based browser, rendering to TTY and browsers"
     11 maintainer="zhengqunkoo <root@zhengqunkoo.com>"
     12 license="LGPL-2.1-only"
     13 homepage="https://www.brow.sh/"
     14 distfiles="https://$go_import_path/archive/v$version.tar.gz
     15  https://github.com/browsh-org/browsh/releases/download/v${version}/browsh-${version}-an.fx.xpi>browsh.xpi"
     16 checksum="965ce2d94d1d9e4b92411d344421c0bea40994527cafd694c5a6e8e206681ede
     17  b410527a69dba88a30d8a6d341a20eb5cb1f84b684e9bc8bb6bc88a2930e0eea"
     18 skip_extraction="browsh.xpi"
     19 
     20 # Manipulate paths, because nested dir of repo is a go package
     21 pre_build() {
     22 	INTERFACER_ROOT="$GOSRCPATH/interfacer"
     23 	cd $INTERFACER_ROOT
     24 
     25 	dep ensure
     26 	# main.go expects browsh/interfacer/src/browsh in GOPATH/src
     27 	cd $GOPATH
     28 	ln -nfs "$GOSRCPATH" src/browsh
     29 
     30 	xpi_file="$XBPS_SRCDISTDIR/$pkgname-$version/browsh.xpi"
     31 	destination=$INTERFACER_ROOT/src/browsh/webextension.go
     32 	go-bindata \
     33 		-prefix "$XBPS_SRCDISTDIR/$pkgname-$version" \
     34 		-pkg browsh \
     35 		-o ${destination} \
     36 		${xpi_file}
     37 }
     38 
     39 post_install() {
     40 	mv ${DESTDIR}/usr/bin/{src,browsh}
     41 	vlicense LICENSE
     42 }