gentoo-repo

git clone git://archive.git.mtrnord.blog/MTRNord/gentoo-repo.git
Log | Files | Refs | README

mautrix-whatsapp-9999.ebuild (961B)


      1 # Copyright 2021 Gentoo Authors
      2 # Distributed under the terms of the GNU General Public License v2
      3 
      4 EAPI=7
      5 EGO_PN="github.com/tulir/mautrix-whatsapp"
      6 
      7 DESCRIPTION="A Matrix-WhatsApp puppeting bridge"
      8 HOMEPAGE="https://maunium.net/go/mautrix-whatsapp"
      9 SRC_URI=""
     10 
     11 inherit git-r3
     12 inherit go-module
     13 
     14 #go-module_set_globals
     15 
     16 EGIT_REPO_URI="https://github.com/tulir/mautrix-whatsapp.git"
     17 if [[ ${PV} != "9999" ]]; then
     18 EGIT_COMMIT="v${PV}"
     19 KEYWORDS="~amd64 ~x86"
     20 fi
     21 
     22 LICENSE="AGPL-3"
     23 SLOT="0"
     24 KEYWORDS="~amd64"
     25 IUSE=""
     26 
     27 DEPEND="dev-lang/go
     28 dev-libs/olm"
     29 RDEPEND="${DEPEND} acct-user/mautrix-whatsapp"
     30 BDEPEND=""
     31 
     32 if [[ ${PV} == 9999 ]]; then
     33 src_unpack() {
     34 	git-r3_src_unpack
     35 	go-module_live_vendor
     36 }
     37 fi
     38 
     39 src_compile() {
     40 	go build
     41 }
     42 
     43 src_install() {
     44 	newinitd "${FILESDIR}/matrix-whatsapp.initd" matrix-whatsapp
     45 	dobin mautrix-whatsapp
     46 	dodir /etc/mautrix-whatsapp
     47 	insinto /etc/mautrix-whatsapp
     48 	newins example-config.yaml config.yaml
     49 
     50 	dodoc example-config.yaml
     51 }