summaryrefslogtreecommitdiff
blob: c419db81bbedcc8d44c08d53e31e1c6ebae57f10 (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-ftp/qshare/qshare-0.9.ebuild,v 1.1 2009/12/15 21:20:38 hwoarang Exp $

EAPI="2"

LANGS="en fr"

inherit qt4-r2

DESCRIPTION="FTP server with a service discovery feature."
HOMEPAGE="http://qt-apps.org/content/show.php/qShare?content=116612"
SRC_URI="http://qt-apps.org/CONTENT/content-files/116612-${P}-src.7z"

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

RDEPEND="x11-libs/qt-gui:4[debug?]"
DEPEND="${RDEPEND}
	app-arch/p7zip"

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

src_prepare() {
	#fix translations
	sed -i "s:i18n:usr\/share\/${PN}\/translations:" src/config.cpp \
		|| die "failed to fix translations path"
	qt4-r2_src_prepare
}

src_install() {
	dobin ${PN} || die "dobin failed"
	doicon icons/${PN}.png
	make_desktop_entry /usr/bin/${PN} QShare ${PN}.png "Qt;Network;FileTransfer"
	dohtml docs/* || die "dohtml failed"
	for X in ${LINGUAS}; do
		for Z in ${LANGS}; do
			if [[ ${X} == ${Z} ]]; then
				insinto /usr/share/${PN}/translations/
				doins i18n/${PN}_${X}.qm || die "failed to install ${X} translation"
			fi
		done
	done
}