summaryrefslogtreecommitdiff
blob: dc56c24e0d1679adbd92150d46861d6149797413 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-ftp/qshare/qshare-2.1.2.ebuild,v 1.2 2012/04/05 22:57:34 jdhore Exp $

EAPI=4

LANGS="en es fr ru"

inherit eutils qt4-r2

DESCRIPTION="FTP server with a service discovery feature."
HOMEPAGE="http://www.zuzuf.net/qshare/"
SRC_URI="http://www.zuzuf.net/qshare/files/${P}-src.tar.gz"

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

RDEPEND="net-dns/avahi[mdnsresponder-compat]
	x11-libs/qt-core:4
	x11-libs/qt-gui:4
	x11-libs/qt-webkit:4"
DEPEND="${RDEPEND}"

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

src_prepare() {
	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}
	doicon icons/${PN}.png
	make_desktop_entry /usr/bin/${PN} QShare ${PN} "Qt;Network;FileTransfer"
	dodoc AUTHORS README
	dohtml docs/*
	for X in ${LINGUAS}; do
		for Z in ${LANGS}; do
			if [[ ${X} == ${Z} ]]; then
				insinto /usr/share/${PN}/translations/
				doins i18n/${PN}_${X}.qm
			fi
		done
	done
}