summaryrefslogtreecommitdiff
path: root/net-news/newsraft/newsraft-9999.ebuild
blob: 5cf8bf87b544d3a918331e8518200657673580e2 (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
# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit toolchain-funcs xdg-utils

DESCRIPTION="Lightweight feed reader with ncurses user interface inspired by Newsboat"
HOMEPAGE="https://codeberg.org/newsraft/newsraft"

if [[ ${PV} == 9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://codeberg.org/newsraft/newsraft.git"
else
	SRC_URI="https://codeberg.org/newsraft/newsraft/archive/${P}.tar.gz"
	KEYWORDS="~amd64"
	S="${WORKDIR}/${PN}"
fi

LICENSE="ISC"
SLOT="0"

DEPEND="
	dev-db/sqlite:3
	dev-libs/expat
	dev-libs/gumbo:=
	net-misc/curl
"
RDEPEND="${DEPEND}"
BDEPEND="
	app-text/scdoc
	virtual/pkgconfig
"

src_prepare() {
	default

	sed -i -e '/CC *=/s;=;?=;' makefile || die
}

src_compile(){
	tc-export CC
	emake LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}"
}

src_install() {
	emake PREFIX="/usr" DESTDIR="${D}" install
	einstalldocs
}

pkg_postinst() {
	xdg_icon_cache_update
}

pkg_postrm() {
	xdg_icon_cache_update
}