# Copyright 2025 illogician <illogician@tutamail.com>
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit go-module flag-o-matic

DESCRIPTION="Mount disks and unlock encrypted volumes easily from the command line"
HOMEPAGE="https://codeberg.org/illogician/climount"
SRC_URI="https://codeberg.org/illogician/climount/archive/${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+="
https://codeberg.org/illogician/illogician-overlay/raw/branch/main/sys-fs/climount/${PN}-1.0-vendor.tar.xz"  
S="${WORKDIR}/${PN}"
IUSE="+lvm"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="amd64"

BDEPEND="dev-lang/go"
RDEPEND="sys-fs/cryptsetup
	lvm? ( sys-fs/lvm2[lvm] )
	"

src_unpack() {
	default
}

src_prepare() {
	default
	ego get codeberg.org/illogician/climount
	ego build
}

src_install() {
	dobin climount
}