adding 1.4.6 ebuild
[monky] / app-admin / conky / conky-1.4.0.ebuild
1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header$
4
5 inherit eutils
6
7 DESCRIPTION="Conky is an advanced, highly configurable system monitor for X"
8 HOMEPAGE="http://conky.sf.net"
9 SRC_URI="mirror://sourceforge/conky/${P}.tar.bz2"
10
11 LICENSE="BSD"
12 SLOT="0"
13 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~alpha"
14 IUSE="truetype X ipv6 bmpx bmp xmms infopipe audacious"
15
16 DEPEND_COMMON="
17         virtual/libc
18         X? (
19                 || ( ( x11-libs/libICE
20                                 x11-libs/libXext
21                                 x11-libs/libX11
22                                 x11-libs/libSM
23                                 x11-libs/libXrender
24                                 x11-libs/libXft
25                                 )
26                                 virtual/x11
27                 )
28                 truetype? ( >=media-libs/freetype-2 )
29                 bmpx? ( media-sound/bmpx
30                                 >=sys-apps/dbus-0.35
31                         )
32                 bmp? ( media-sound/beep-media-player )
33                 audacious? ( media-sound/audacious )
34                 infopipe? ( || ( media-plugins/xmms-infopipe media-plugins/bmp-infopipe ) )
35                 xmms? ( media-sound/xmms )
36         )"
37
38 RDEPEND="${DEPEND_COMMON}"
39
40 DEPEND="
41         ${DEPEND_COMMON}
42         X? (
43                 || ( ( x11-libs/libXt
44                                 x11-proto/xextproto
45                                 x11-proto/xproto
46                                 )
47                                 virtual/x11
48                 )
49         )
50         sys-apps/grep
51         sys-apps/sed"
52
53
54 src_compile() {
55         local mymake
56         if useq ipv6 ; then
57                 ewarn
58                 ewarn "You have the ipv6 USE flag enabled.  Please note that"
59                 ewarn "using the ipv6 USE flag with Conky disables the port"
60                 ewarn "monitor."
61                 ewarn
62                 epause
63         else
64                 mymake="MPD_NO_IPV6=noipv6"
65         fi
66         local myconf
67         myconf="--enable-double-buffer --enable-own-window --enable-proc-uptime \
68                 --enable-mpd --enable-mldonkey"
69         econf \
70                 ${myconf} \
71                 $(use_enable truetype xft) \
72                 $(use_enable X x11) \
73                 $(use_enable bmpx) \
74                 $(use_enable bmp) \
75                 $(use_enable xmms) \
76                 $(use_enable audacious) \
77                 $(use_enable infopipe) \
78                 $(use_enable !ipv6 portmon) || die "econf failed"
79         emake ${mymake} || die "compile failed"
80 }
81
82 src_install() {
83         emake DESTDIR=${D} install || die "make install failed"
84         dodoc ChangeLog AUTHORS README doc/conkyrc.sample doc/variables.html
85         dodoc doc/docs.html doc/config_settings.html
86 }
87
88 pkg_postinst() {
89         einfo 'Default configuration file is "~/.conkyrc"'
90         einfo "you can find a sample configuration file in"
91         einfo "/usr/share/doc/${PF}/conkyrc.sample.gz"
92         einfo
93         einfo "For more info on Conky's new features,"
94         einfo "please look at the README and ChangeLog:"
95         einfo "/usr/share/doc/${PF}/README.gz"
96         einfo "/usr/share/doc/${PF}/ChangeLog.gz"
97         einfo "There are also pretty html docs available"
98         einfo "on Conky's site or in /usr/share/doc/${PF}"
99         einfo
100         einfo "Check out app-vim/conky-syntax for conkyrc"
101         einfo "syntax highlighting in Vim"
102         einfo
103 }