Conky 1.4.4 Final
[monky] / app-admin / conky / conky-1.4.3.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 audacious bmpx hddtemp mpd vim-syntax"
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/libXdamage
25                                 x11-libs/libXft
26                                 )
27                                 virtual/x11
28                 )
29                 truetype? ( >=media-libs/freetype-2 )
30                 audacious? ( >=media-sound/audacious-0.1 )
31                 bmpx? ( media-sound/bmpx
32                                 >=sys-apps/dbus-0.35
33                         )
34         )"
35
36 RDEPEND="${DEPEND_COMMON}
37         hddtemp? ( app-admin/hddtemp )
38         mpd? ( media-sound/mpd )"
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 PDEPEND="vim-syntax? ( app-vim/conky-syntax )"
54
55 src_compile() {
56         local mymake
57         if useq ipv6 ; then
58                 ewarn
59                 ewarn "You have the ipv6 USE flag enabled.  Please note that using"
60                 ewarn "the ipv6 USE flag with Conky disables the port monitor."
61                 epause
62         else
63                 mymake="MPD_NO_IPV6=noipv6"
64         fi
65         local myconf
66         myconf="--enable-own-window --enable-proc-uptime"
67         use X && myconf="${myconf} --enable-x11 --enable-double-buffer --enable-xdamage"
68         econf \
69                 ${myconf} \
70                 $(use_enable truetype xft) \
71                 $(use_enable audacious) \
72                 $(use_enable bmpx) \
73                 $(use_enable hddtemp ) \
74                 $(use_enable mpd) \
75                 $(use_enable !ipv6 portmon) || die "econf failed"
76         emake ${mymake} || die "compile failed"
77 }
78
79 src_install() {
80         emake DESTDIR=${D} install || die "make install failed"
81         dodoc ChangeLog AUTHORS README doc/conkyrc.sample
82         dohtml doc/docs.html doc/config_settings.html doc/variables.html
83 }
84
85 pkg_postinst() {
86         einfo 'Default configuration file is "~/.conkyrc"'
87         einfo "You can find a sample configuration file in"
88         einfo "/usr/share/doc/${PF}/conkyrc.sample.gz"
89         einfo
90         einfo "For more info on Conky's new features,"
91         einfo "please look at the README and ChangeLog:"
92         einfo "/usr/share/doc/${PF}/README.gz"
93         einfo "/usr/share/doc/${PF}/ChangeLog.gz"
94         einfo "There are also pretty html docs available"
95         einfo "on Conky's site or in /usr/share/doc/${PF}"
96         einfo
97         einfo "Also see http://www.gentoo.org/doc/en/conky-howto.xml"
98         einfo
99         einfo "Check out app-vim/conky-syntax for conkyrc"
100         einfo "syntax highlighting in Vim"
101         einfo
102 }