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

Contents of /media-sound/qmpdclient/qmpdclient-1.1.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Tue Jul 10 18:24:03 2012 UTC (8 years, 4 months ago) by angelos
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
Remove old

(Portage version: 2.2.0_alpha116/cvs/Linux x86_64)

1 # Copyright 1999-2011 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.3.ebuild,v 1.9 2011/04/25 14:54:04 armin76 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/${P}.tar.bz2"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="amd64 ppc x86"
19 IUSE="debug dbus"
20
21 DEPEND="x11-libs/qt-gui:4[dbus?]
22 x11-libs/qt-xmlpatterns:4"
23 RDEPEND="${DEPEND}"
24
25 S="${WORKDIR}/${PN}"
26
27 DOCS="AUTHORS README THANKSTO Changelog"
28
29 src_prepare() {
30 # Fix the install path
31 sed -i -e "s:PREFIX = /usr/local:PREFIX = /usr:" ${PN}.pro \
32 || die "sed failed (install path)"
33
34 # Fix package version
35 sed -i -e "/^VERSION/s:= .*:= ${PV}:" ${PN}.pro || die "failed to fix package version"
36 # nostrip fix
37 sed -i -e "s:^CONFIG += :CONFIG += nostrip :" ${PN}.pro \
38 || die "sed failed (nostrip)"
39
40 sed -i -e "s:+= -O2 -g0 -s:+= -O2 -g0:" ${PN}.pro \
41 || die "sed failed (nostrip)"
42
43 # fix installation folder name
44 sed -i "s:share/QMPDClient:share/qmpdclient:" ${PN}.pro src/config.cpp \
45 || die "failed to fix installation directory"
46
47 # check dbus
48 if ! use dbus; then
49 sed -i -e "s/message(DBus notifier:\ enabled)/message(DBus notifier:\ disabled)/" \
50 -e "s/CONFIG\ +=\ nostrip\ qdbus//" \
51 -e "s/SOURCES\ +=\ src\/notifications_dbus.cpp/SOURCES\ +=\ src\/notifications_nodbus.cpp/" \
52 ${PN}.pro || die "disabling dbus failed"
53 fi
54 qt4-r2_src_prepare
55 }
56
57 src_compile() {
58 emake || die "emake failed"
59 # generate translations
60 emake translate || die "failed to generate translations"
61 cd "${S}"/lang
62 for X in *.ts;do
63 lrelease "${X}" || die "lrelease failed"
64 done
65 }
66
67 src_install() {
68 qt4-r2_src_install
69 for res in 16 22 64 ; do
70 insinto /usr/share/icons/hicolor/${res}x${res}/apps/
71 newins icons/qmpdclient${res}.png ${PN}.png || die "Installing icons failed"
72 done
73
74 #install translations
75 insinto /usr/share/${PN}/translations/
76 local LANG=
77 for LANG in ${LINGUAS};do
78 for X in ${LANGSLONG};do
79 if [[ ${LANG} == ${X%_*} ]];then
80 doins -r lang/${X}.qm || die "failed to install translations"
81 fi
82 done
83 for X in ${LANGS};do
84 if [[ ${LANG} == ${X} ]]; then
85 doins -r lang/${X}.qm || die "failed to install translations"
86 fi
87 done
88 done
89 }

  ViewVC Help
Powered by ViewVC 1.1.20