# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit perl-module

DESCRIPTION="Create forensic supertimelines in Perl"
HOMEPAGE="https://github.com/thinrope/log2timeline"
SRC_URI="https://github.com/thinrope/log2timeline/archive/v${PV}.tar.gz"

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

DEPEND="media-libs/exiftool
	>=dev-perl/Archive-Zip-1.18
	dev-perl/Carp-Assert
	dev-perl/DBI
	dev-perl/DBD-SQLite
	dev-perl/Data-Hexify
	>=dev-perl/DateTime-0.41
	dev-perl/DateTime-Format-Strptime
	dev-perl/DateTime-TimeZone
	>=dev-perl/Digest-CRC-0.14
	dev-perl/HTML-Scrubber
	dev-perl/Net-Pcap
	dev-perl/NetPacket
	dev-perl/Params-Validate
	dev-perl/XML-LibXML
	dev-perl/File-Mork
	dev-perl/JSON-XS
	dev-perl/Mac-PropertyList
	dev-perl/Parse-Win32Registry"

RDEPEND="${DEPEND}"

src_prepare() {
	perl-module_src_prepare
	rm "${S}/README"
	cp "${S}/docs/README.txt" "${S}/"
}

src_install() {
	emake DESTDIR="${D}" install
	rm ${D}/usr/bin/log2timeline ${D}/usr/bin/faersluskra2timalina
	rm ${D}/usr/share/man/man1/faersluskra2timalina.1
}