summaryrefslogtreecommitdiff
path: root/www-plugins/ublock-origin/ublock-origin-9999.ebuild
blob: 17458e7117a9fa790550c2e4d03edc5ac9f4b6de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="uBlock Origin addon for Firefox"
HOMEPAGE="https://github.com/gorhill/uBlock"
SRC_URI="https://github.com/gorhill/uBlock.git"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS=""

RDEPEND=""
DEPEND="${RDEPEND}"
BDEPEND="dev-build/ninja net-libs/nodejs"

inherit git-r3

src_unpack() {
	EGIT_REPO_URI="$SRC_URI"
	EGIT_CLONE_TYPE="shallow"
	git-r3_src_unpack
	cd "${S}"
	tools/pull-assets.sh
	cd -
}

src_compile() {
	cd "${S}"
	tools/make-firefox.sh all
	cd -
}

src_install() {
	dodir /usr/share/firefox-addons
	cp "${S}/dist/build/uBlock0.firefox.xpi" "${D}/usr/share/firefox-addons/uBlock0@raymondhill.net.xpi"
}