/[gentoo-x86]/media-sound/qmpdclient/qmpdclient-1.1.2-r1.ebuild
Gentoo

Contents of /media-sound/qmpdclient/qmpdclient-1.1.2-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Jun 29 20:44:03 2010 UTC (9 years, 4 months ago) by angelos
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Removed old
(Portage version: 2.1.8.3/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-sound/qmpdclient/qmpdclient-1.1.2-r1.ebuild,v 1.2 2010/01/14 11:25:36 yngwin Exp $
4
5 EAPI="2"
6
7 LANGSLONG="cs_CZ de_DE fr_FR it_IT nl_NL nn_NO no_NO ru_RU sv_SE tr_TR uk_UA"
8 LANGS="zh_CN zh_TW pt_BR "
9
10 inherit qt4-r2
11
12 DESCRIPTION="QMPDClient with NBL additions, such as lyrics' display"
13 HOMEPAGE="http://bitcheese.net/wiki/QMPDClient"
14 SRC_URI="http://dump.bitcheese.net/files/dedycec/${P}.tar.bz2"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86"
19 IUSE="debug dbus"
20
21 DEPEND="x11-libs/qt-gui:4[dbus?]"
22 RDEPEND="${DEPEND}"
23
24 S="${WORKDIR}/${PN}"
25
26 DOCS="AUTHORS README THANKSTO Changelog"
27
28 src_prepare() {
29 # Fix the install path
30 sed -i -e "s:PREFIX = /usr/local:PREFIX = /usr:" ${PN}.pro \
31 || die "sed failed (install path)"
32
33 # Fix package version
34 sed -i -e "s:1.1.1:${PV}:" ${PN}.pro || die "failed to fix package version"
35 # nostrip fix
36 sed -i -e "s:CONFIG += :CONFIG += nostrip :" ${PN}.pro \
37 || die "sed failed (nostrip)"
38
39 sed -i -e "s:+= -O2 -g0 -s:+= -O2 -g0:" ${PN}.pro \
40 || die "sed failed (nostrip)"
41
42 # fix installation folder name
43 sed -i "s/share\/QMPDClient/share\/qmpdclient/" ${PN}.pro src/config.cpp \
44 || die "failed to fix installation directory"
45
46 # check dbus
47 if ! use dbus; then
48 sed -i -e "s/message(DBus notifier:\ enabled)/message(DBus notifier:\ disabled)/" \
49 -e "s/CONFIG\ +=\ nostrip\ qdbus//" \
50 -e "s/SOURCES\ +=\ src\/notifications_dbus.cpp/SOURCES\ +=\ src\/notifications_nodbus.cpp/" \
51 ${PN}.pro || die "disabling dbus failed"
52 fi
53 }
54
55 src_compile() {
56 emake || die "emake failed"
57 # generate translations
58 emake translate || die "failed to generate translations"
59 cd "${S}"/lang
60 for X in *.ts;do
61 lrelease "${X}" || die "lrelease failed"
62 done
63 }
64
65 src_install() {
66 qt4-r2_src_install
67 for res in 16 22 64 ; do
68 insinto /usr/share/icons/hicolor/${res}x${res}/apps/
69 newins icons/qmpdclient${res}.png ${PN}.png || die "Installing icons failed"
70 done
71
72 #install translations
73 insinto /usr/share/${PN}/translations/
74 local LANG=
75 for LANG in ${LINGUAS};do
76 for X in ${LANGSLONG};do
77 if [[ ${LANG} == ${X%_*} ]];then
78 doins -r lang/${X}.qm || die "failed to install translations"
79 fi
80 done
81 for X in ${LANGS};do
82 if [[ ${LANG} == ${X} ]]; then
83 doins -r lang/${X}.qm || die "failed to install translations"
84 fi
85 done
86 done
87 }

  ViewVC Help
Powered by ViewVC 1.1.20