summaryrefslogtreecommitdiff
blob: 2288018361036290639d30f24d9be1056b671b75 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6
PYTHON_COMPAT=( python2_7 )

inherit webapp python-single-r1

WEBAPP_MANUAL_SLOT="yes"

DESCRIPTION="A feed aggregator application"
HOMEPAGE="http://intertwingly.net/code/venus/"
SRC_URI="mirror://gentoo/${P}.tar.bz2"

LICENSE="PSF-2.2"
KEYWORDS="amd64 x86"
IUSE="django genshi redland test"
RESTRICT="!test? ( test )"
SLOT="0"

RDEPEND="
	$(python_gen_cond_dep '
		dev-python/bsddb3[${PYTHON_MULTI_USEDEP}]
		dev-python/chardet[${PYTHON_MULTI_USEDEP}]
		dev-python/httplib2[${PYTHON_MULTI_USEDEP}]
		dev-python/utidylib[${PYTHON_MULTI_USEDEP}]
		django? ( dev-python/django[${PYTHON_MULTI_USEDEP}] )
		genshi? ( dev-python/genshi[${PYTHON_MULTI_USEDEP}] )
		redland? ( dev-python/rdflib[redland,${PYTHON_MULTI_USEDEP}] )
	')
	${PYTHON_DEPS}"
DEPEND="${RDEPEND}"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

S="${WORKDIR}"/${PN}

pkg_setup() {
	python-single-r1_pkg_setup
	webapp_pkg_setup
}

src_prepare() {
	eapply "${FILESDIR}"/venus-bsddb3.patch
	eapply_user
	python_fix_shebang .
}

src_test() {
	"${PYTHON}" runtests.py || die
}

src_install() {
	webapp_src_preinst

	dodoc AUTHORS README TODO
	dodoc -r docs

	python_moduleinto venus
	python_domodule *.py filters planet

	insinto "${MY_APPDIR}"
	doins -r themes

	insinto "${MY_HOSTROOTDIR}/conf"
	doins -r examples

	webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt

	webapp_src_install
}

pkg_postinst() {
	webapp_pkg_postinst
	elog "Installation instructions can be found at /usr/share/doc/${PF}/html/
		or http://intertwingly.net/code/venus/docs/index.html"
}