# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake

DESCRIPTION="Qlune is a program to visualize the lunar phases."
HOMEPAGE="https://codeberg.org/lastrodamo/Qlune"
if [[ ${PV} = *9999* ]] ; then
    EGIT_REPO_URI="https://codeberg.org/lastrodamo/Qlune"
    inherit git-r3
else
    SRC_URI="https://codeberg.org/lastrodamo/Qlune/archive/${P}.tar.gz"
    S="${WORKDIR}/qlune"

    KEYWORDS="~amd64 ~x86"
fi

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

RDEPEND="
	dev-qt/qtbase

"

DEPEND="${RDEPEND}"

BDEPEND="
"

src_prepare() {
	default
	cmake_src_prepare
	# Apply any necessary patches here
}

src_configure() {
	cmake_src_configure
}

src_compile() {
	cmake_src_compile
}

src_install() {
	cmake_src_install
}

pkg_postinst() {
	elog "Qlune has been installed."
	elog "You can start using it by running the qlune command."
}