summaryrefslogtreecommitdiff
blob: 53b1874deb7aecc051742b6bb9d06b6c0ba5f788 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

GCONF_DEBUG="no"
SCROLLKEEPER_UPDATE="no"

inherit eutils gnome2

DESCRIPTION="GCstar is a personal collections manager."
HOMEPAGE="http://www.gcstar.org/"
SRC_URI="http://download.gna.org/gcstar/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="cddb gnome mp3 spell tellico vorbis"

LANGS="ar bg ca cs de el es fr gl hu id it nl pl pt ro ru sr sv tr uk"
for x in ${LANGS} ; do
	IUSE="${IUSE} linguas_${x}"
done

DEPEND="dev-lang/perl
		virtual/perl-Archive-Tar
		dev-perl/Archive-Zip
		virtual/perl-IO-Compress
		dev-perl/gtk2-perl
		dev-perl/HTML-Parser
		dev-perl/libwww-perl
		dev-perl/URI
		dev-perl/XML-LibXML
		dev-perl/XML-Parser
		dev-perl/XML-Simple
		virtual/perl-Time-Piece
		virtual/perl-File-Spec
		virtual/perl-File-Temp
		virtual/perl-libnet
		cddb? ( dev-perl/Net-FreeDB )
		gnome? ( dev-perl/gnome2-vfs-perl )
		mp3? ( dev-perl/MP3-Info dev-perl/MP3-Tag )
		spell? ( dev-perl/gtk2-spell )
		tellico? ( virtual/perl-Digest-MD5
			virtual/perl-MIME-Base64 )
		vorbis? ( dev-perl/Ogg-Vorbis-Header-PurePerl )"
RDEPEND="${DEPEND}"

S="${WORKDIR}/${PN}"

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}/${PN}-1.4.0-man.patch"
}

src_compile() {
	# do nothing (otherwise gnome2_src_compile would get called)
	return
}

src_install() {
	cd "${S}"/lib/gcstar/GCLang

	mkdir tmp
	mv ?? tmp
	# English version should be always available so we will keep it
	mv tmp/EN .

	for x in ${LINGUAS}; do
		# GCstar uses upper-case language names
		mv tmp/$(echo ${x} | tr '[:lower:]' '[:upper:]') .
	done

	rm -rf tmp

	cd "${S}"
	./install --prefix="${D}/usr" \
		--noclean --nomenu || die "install script failed"

	domenu share/applications/gcstar.desktop
	newicon share/gcstar/icons/gcstar_64x64.png gcstar.png
	insinto /usr/share/mime/packages
	doins share/applications/gcstar.xml

	dodoc CHANGELOG README

	if use linguas_fr; then
		dodoc CHANGELOG.fr README.fr
	fi
}