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

Contents of /media-sound/qmpdclient/qmpdclient-1.1.1-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Jan 7 12:48:48 2010 UTC (10 years, 10 months ago) by hwoarang
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
remove old ebuild, revbump based on qt4-r2 eclass
(Portage version: 2.2_rc61/cvs/Linux x86_64)

1 # Copyright 1999-2009 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.1-r2.ebuild,v 1.1 2009/10/28 06:09:52 hwoarang Exp $
4
5 EAPI="2"
6
7 inherit qt4
8
9 DESCRIPTION="QMPDClient with NBL additions, such as lyrics' display"
10 HOMEPAGE="http://bitcheese.net/wiki/QMPDClient"
11 SRC_URI="mirror://gentoo/${P}.tar.gz
12 http://dev.gentoo.org/~hwoarang/distfiles/${P}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86"
17 IUSE="debug dbus"
18
19 DEPEND="x11-libs/qt-gui:4[dbus?,debug?]"
20 RDEPEND="${DEPEND}"
21
22 LANGSNOLONG="cs_CZ de_DE fr_FR it_IT nl_NL nn_NO no_NO ru_RU sv_SE tr_TR uk_UA"
23 LANGS="zh_CN zh_TW pt_BR "
24
25 for X in ${LANGSNOLONG}; do
26 IUSE="${IUSE} linguas_${X%_*}"
27 done
28
29 for X in ${LANGS};do
30 IUSE="${IUSE} linguas_${X}"
31 done
32
33 src_prepare() {
34 # Fix the install path
35 sed -i -e "s:PREFIX = /usr/local:PREFIX = /usr:" qmpdclient.pro \
36 || die "sed failed (install path)"
37
38 # nostrip fix
39 sed -i -e "s:CONFIG += :CONFIG += nostrip :" qmpdclient.pro \
40 || die "sed failed (nostrip)"
41
42 sed -i -e "s:+= -O2 -g0 -s:+= -O2 -g0:" qmpdclient.pro \
43 || die "sed failed (nostrip)"
44
45 # fix installation folder name
46 sed -i "s/share\/QMPDClient/share\/qmpdclient/" ${PN}.pro src/config.cpp \
47 || die "failed to fix installation directory"
48
49 # check dbus
50 if ! use dbus; then
51 sed -i -e "s/message(DBus notifier:\ enabled)/message(DBus notifier:\ disabled)/" \
52 -e "s/CONFIG\ +=\ nostrip\ qdbus//" \
53 -e "s/SOURCES\ +=\ src\/notifications_dbus.cpp/SOURCES\ +=\ src\/notifications_nodbus.cpp/" \
54 ${PN}.pro || die "disabling dbus failed"
55 fi
56 }
57
58 src_configure() {
59 eqmake4 qmpdclient.pro
60 }
61
62 src_compile() {
63 emake || die "emake failed"
64 # generate translations
65 emake translate || die "failed to generate translations"
66 cd "${S}"/lang
67 for X in *.ts;do
68 lrelease "${X}" || die "lrelease failed"
69 done
70 }
71
72 src_install() {
73 emake install INSTALL_ROOT="${D}" || die "emake install failed"
74 dodoc README AUTHORS THANKSTO Changelog || die "Installing docs failed"
75 for res in 16 22 64 ; do
76 insinto /usr/share/icons/hicolor/${res}x${res}/apps/
77 newins icons/qmpdclient${res}.png ${PN}.png || die "Installing icons failed"
78 done
79
80 #install translations
81 insinto /usr/share/${PN}/translations/
82 local LANG=
83 for LANG in ${LINGUAS};do
84 for X in ${LANGSNOLONG};do
85 if [[ ${LANG} == ${X%_*} ]];then
86 doins -r lang/${X}.qm || die "failed to install translations"
87 fi
88 done
89 for X in ${LANGS};do
90 if [[ ${LANG} == ${X} ]]; then
91 doins -r lang/${X}.qm || die "failed to install translations"
92 fi
93 done
94 done
95 }

  ViewVC Help
Powered by ViewVC 1.1.20