summaryrefslogtreecommitdiff
blob: 94a63b1643183cb613f299becb8181d31aa52d16 (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
58
59
60
61
62
63
64
65
66
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit perl-module

DESCRIPTION="A note taking perl program"
HOMEPAGE="https://www.daemon.de/NOTE"
SRC_URI="https://www.daemon.de/idisk/Apps/note/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="crypt dbm general mysql text"

DEPEND="
	dev-perl/Config-General
	dev-perl/TermReadKey
	dev-perl/Term-ReadLine-Perl
	dev-perl/YAML
	virtual/perl-Storable
	crypt? (
		dev-perl/Crypt-CBC
		dev-perl/Crypt-Blowfish
		dev-perl/Crypt-DES
	)
	mysql? ( dev-perl/DBD-mysql )
"
RDEPEND="${DEPEND}"

# extraneous README that gets installed into the perl module
PERL_RM_FILES=( NOTEDB/README )

src_prepare() {
	# Supressing file not needed
	local v
	for v in mysql text dbm general; do
		if ! use ${v}; then
			PERL_RM_FILES+=( NOTEDB/${v}.pm )
		fi
	done
	perl-module_src_prepare
}

src_install() {
	perl-module_src_install

	# Adding some basic utitily for testing note
	exeinto /usr/share/${PN}
	doexe bin/stresstest.sh

	# Adding some help for mysql backend driver
	if use mysql; then
		insinto /usr/share/${PN}/mysql
		exeinto /usr/share/${PN}/mysql
		doins mysql/{README,sql,permissions}
		doexe mysql/install.sh
	fi

	# Adding a sample configuration file
	insinto /etc
	doins config/noterc

	dodoc UPGRADE VERSION
}