summaryrefslogtreecommitdiff
path: root/www-misc/gitea2rss/gitea2rss-0.7.0.ebuild
blob: f911f0ea7c59c0dd221b71c72686bd713c87bc54 (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
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake

DESCRIPTION="Generates RSS feeds from Gitea releases, tags and commits"
HOMEPAGE="https://codeberg.org/tastytea/gitea2rss"
SRC_URI="https://codeberg.org/tastytea/gitea2rss/archive/${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}"

LICENSE="GPL-3"
SLOT="0"
if [[ "${PV}" != "9999" ]]; then
	KEYWORDS="~amd64 ~arm ~x86"
fi
IUSE="test"

RDEPEND="
	net-misc/curl[ssl]
	dev-libs/jsoncpp
"
DEPEND="
	${RDEPEND}
	test? ( dev-cpp/catch )
"
BDEPEND="
	virtual/pkgconfig
	app-text/asciidoc
"

RESTRICT="!test? ( test )"

DOCS=("README.adoc" "doc/nginx-example.conf")

src_configure() {
	local mycmakeargs=(
		-DWITH_TESTS="$(usex test)"
	)
	if use test; then
		# Don't run tests that need a network connection.
		mycmakeargs+=(-DEXTRA_TEST_ARGS="~[http]")
	fi

	cmake_src_configure
}

src_test() {
	BUILD_DIR="${BUILD_DIR}/tests" cmake_src_test
}