Conky 1.4.4 Final
[monky] / app-admin / conky / conky-1.4.1.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="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
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 )
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 src_unpack() {
54         unpack ${A}
55         cd ${S}
56         epatch ${FILESDIR}/conky-sigaction.patch
57 }
58
59
60 src_compile() {
61         local mymake
62         if useq ipv6 ; then
63                 ewarn
64                 ewarn "You have the ipv6 USE flag enabled.  Please note that"
65                 ewarn "using the ipv6 USE flag with Conky disables the port"
66                 ewarn "monitor."
67                 ewarn
68                 epause
69         else
70                 mymake="MPD_NO_IPV6=noipv6"
71         fi
72         local myconf
73         myconf="--enable-double-buffer --enable-own-window --enable-proc-uptime \
74                 --enable-mpd --enable-mldonkey"
75         econf \
76                 ${myconf} \
77                 $(use_enable truetype xft) \
78                 $(use_enable X x11) \
79                 $(use_enable bmpx) \
80                 $(use_enable bmp) \
81                 $(use_enable xmms) \
82                 $(use_enable audacious) \
83                 $(use_enable infopipe) \
84                 $(use_enable !ipv6 portmon) || die "econf failed"
85         emake ${mymake} || die "compile failed"
86 }
87
88 src_install() {
89         emake DESTDIR=${D} install || die "make install failed"
90         dodoc ChangeLog AUTHORS README doc/conkyrc.sample doc/variables.html
91         dodoc doc/docs.html doc/config_settings.html
92 }
93
94 pkg_postinst() {
95         einfo 'Default configuration file is "~/.conkyrc"'
96         einfo "you can find a sample configuration file in"
97         einfo "/usr/share/doc/${PF}/conkyrc.sample.gz"
98         einfo
99         einfo "For more info on Conky's new features,"
100         einfo "please look at the README and ChangeLog:"
101         einfo "/usr/share/doc/${PF}/README.gz"
102         einfo "/usr/share/doc/${PF}/ChangeLog.gz"
103         einfo "There are also pretty html docs available"
104         einfo "on Conky's site or in /usr/share/doc/${PF}"
105         einfo
106         einfo "Check out app-vim/conky-syntax for conkyrc"
107         einfo "syntax highlighting in Vim"
108         einfo
109 }