Skip to content

Commit

Permalink
www-misc/buku: verbump to 4.0
Browse files Browse the repository at this point in the history
Signed-off-by: David Roman <davidroman96@gmail.com>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
  • Loading branch information
stkw0 committed Jan 12, 2019
1 parent 8081a9b commit cd7ee25
Show file tree
Hide file tree
Showing 4 changed files with 188 additions and 0 deletions.
1 change: 1 addition & 0 deletions www-misc/buku/Manifest
@@ -1 +1,2 @@
DIST buku-3.7.tar.gz 98970 BLAKE2B 7227b5fb632d9ec92ef236d1889f2ba0872d67d2c3cfb302beab48b03e8d62a762d02e517014d5041a9f79deab74d0f5ceca12c315eb77922f73d359b58a48b5 SHA512 c515e11686aa8888231ffc8c1d6ec29d6143f1714eacdf640d8d3d3fa3fd469e111073762a3ba831dd673d63034afe3db181ec66501c18165e8ddd97cbc57c82
DIST buku-4.0.tar.gz 475436 BLAKE2B 47c965286d8d186f75e2c9bb42a3f8b88d02763a96cfd8549d3865350648676a1f621bcef6bf941971d5a20c020ab4079f31bcb93b85a91698177823709cb1f8 SHA512 3693f6161c2311fd85c26ee881390e08778e32edffb389dcd4f9401cd51f7683f30de4f4fdba768e981113bac77f5e7f4a487c26e94bb40ca9df1226b14724ed
92 changes: 92 additions & 0 deletions www-misc/buku/buku-4.0.ebuild
@@ -0,0 +1,92 @@
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{5,6} )

inherit bash-completion-r1 distutils-r1

DESCRIPTION="Powerful command-line bookmark manager"
HOMEPAGE="https://github.com/jarun/Buku"

if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/jarun/Buku"
else
# Tests are not working with the pypi version (https://github.com/jarun/Buku/issues/325)
SRC_URI="https://github.com/jarun/Buku/archive/v${PV}.tar.gz -> ${P}.tar.gz"
# SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz -> ${P}.tar.gz"

# Github folder name starts with capital B
S="${WORKDIR}/${P^}"

KEYWORDS="~amd64 ~x86"
fi

LICENSE="GPL-3"
SLOT="0"
IUSE="test server"

CLIENT_DEPEND="dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
dev-python/certifi[${PYTHON_USEDEP}]
dev-python/cryptography[${PYTHON_USEDEP}]
dev-python/html5lib[${PYTHON_USEDEP}]
>=dev-python/urllib3-1.13.1[${PYTHON_USEDEP}]"

SERVER_DEPEND="dev-python/arrow[${PYTHON_USEDEP}]
dev-python/click[${PYTHON_USEDEP}]
dev-python/flask[${PYTHON_USEDEP}]
dev-python/flask-admin[${PYTHON_USEDEP}]
dev-python/flask-api[${PYTHON_USEDEP}]
dev-python/flask-bootstrap[${PYTHON_USEDEP}]
dev-python/flask-paginate[${PYTHON_USEDEP}]
dev-python/flask-wtf[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
dev-python/werkzeug[${PYTHON_USEDEP}]"

RDEPEND="${CLIENT_DEPEND}
server? ( ${SERVER_DEPEND} )"

DEPEND="${RDEPEND}
test? (
dev-python/attrs[${PYTHON_USEDEP}]
dev-python/hypothesis[${PYTHON_USEDEP}]
dev-python/py[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
dev-python/vcrpy[${PYTHON_USEDEP}]
)
"

python_prepare_all() {
distutils-r1_python_prepare_all

if ! use server; then
sed -i 's/, '\''bukuserver=bukuserver.server:cli'\''\]/\]/g' setup.py || die
sed -i 's/de=\['\''tests/de=\['\''bukuserver'\'', '\''tests/g' setup.py || die
fi
}

python_install_all() {
distutils-r1_python_install_all

insinto /usr/share/zsh/site-functions
doins auto-completion/zsh/_*

newbashcomp auto-completion/bash/buku-completion.bash "${PN}"

doman buku.1
}

python_test() {
local skipped=("_rec" "refreshdb" "tnyfy_url" "with_url" "test_browse" \
"search" "_tag" "_compactdb" "cleardb" "firefox")

local args="not ${skipped[0]}"
for i in ${skipped[@]:1}; do
args+=" and not $i"
done

py.test -vv -k "$args" tests/test_*.py || die
}
92 changes: 92 additions & 0 deletions www-misc/buku/buku-9999.ebuild
@@ -0,0 +1,92 @@
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{5,6} )

inherit bash-completion-r1 distutils-r1

DESCRIPTION="Powerful command-line bookmark manager"
HOMEPAGE="https://github.com/jarun/Buku"

if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/jarun/Buku"
else
# Tests are not working with the pypi version (https://github.com/jarun/Buku/issues/325)
SRC_URI="https://github.com/jarun/Buku/archive/v${PV}.tar.gz -> ${P}.tar.gz"
# SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz -> ${P}.tar.gz"

# Github folder name starts with capital B
S="${WORKDIR}/${P^}"

KEYWORDS="~amd64 ~x86"
fi

LICENSE="GPL-3"
SLOT="0"
IUSE="test server"

CLIENT_DEPEND="dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
dev-python/certifi[${PYTHON_USEDEP}]
dev-python/cryptography[${PYTHON_USEDEP}]
dev-python/html5lib[${PYTHON_USEDEP}]
>=dev-python/urllib3-1.13.1[${PYTHON_USEDEP}]"

SERVER_DEPEND="dev-python/arrow[${PYTHON_USEDEP}]
dev-python/click[${PYTHON_USEDEP}]
dev-python/flask[${PYTHON_USEDEP}]
dev-python/flask-admin[${PYTHON_USEDEP}]
dev-python/flask-api[${PYTHON_USEDEP}]
dev-python/flask-bootstrap[${PYTHON_USEDEP}]
dev-python/flask-paginate[${PYTHON_USEDEP}]
dev-python/flask-wtf[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
dev-python/werkzeug[${PYTHON_USEDEP}]"

RDEPEND="${CLIENT_DEPEND}
server? ( ${SERVER_DEPEND} )"

DEPEND="${RDEPEND}
test? (
dev-python/attrs[${PYTHON_USEDEP}]
dev-python/hypothesis[${PYTHON_USEDEP}]
dev-python/py[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
dev-python/vcrpy[${PYTHON_USEDEP}]
)
"

python_prepare_all() {
distutils-r1_python_prepare_all

if ! use server; then
sed -i 's/, '\''bukuserver=bukuserver.server:cli'\''\]/\]/g' setup.py || die
sed -i 's/de=\['\''tests/de=\['\''bukuserver'\'', '\''tests/g' setup.py || die
fi
}

python_install_all() {
distutils-r1_python_install_all

insinto /usr/share/zsh/site-functions
doins auto-completion/zsh/_*

newbashcomp auto-completion/bash/buku-completion.bash "${PN}"

doman buku.1
}

python_test() {
local skipped=("_rec" "refreshdb" "tnyfy_url" "with_url" "test_browse" \
"search" "_tag" "_compactdb" "cleardb" "firefox")

local args="not ${skipped[0]}"
for i in ${skipped[@]:1}; do
args+=" and not $i"
done

py.test -vv -k "$args" tests/test_*.py || die
}
3 changes: 3 additions & 0 deletions www-misc/buku/metadata.xml
Expand Up @@ -12,4 +12,7 @@
<upstream>
<remote-id type="github">jarun/Buku</remote-id>
</upstream>
<use>
<flag name="server">Install the "bukuserver" program (a web server)</flag>
</use>
</pkgmetadata>

0 comments on commit cd7ee25

Please sign in to comment.