conky 1.3.5
[monky] / app-admin / conky / conky-1.3.5.ebuild
1 # Copyright 1999-2005 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 ~sparc ~x86"
14 IUSE="truetype X ipv6 bmpx"
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         )"
33
34 RDEPEND="${DEPEND_COMMON}"
35 #       seti? ( sci-astronomy/setiathome )"
36
37 DEPEND="
38         ${DEPEND_COMMON}
39         X? (
40                 || ( ( x11-libs/libXt
41                                 x11-proto/xextproto
42                                 x11-proto/xproto
43                                 )
44                                 virtual/x11
45                 )
46         )
47         sys-devel/libtool
48         sys-apps/grep
49         sys-apps/sed
50         sys-devel/gcc"
51
52 src_unpack() {
53         unpack ${A}
54         cd ${S}
55 }
56
57 src_compile() {
58         local mymake
59         if useq ipv6 ; then
60                 ewarn
61                 ewarn "You have the ipv6 USE flag enabled.  Please note that"
62                 ewarn "using the ipv6 USE flag with Conky disables the port"
63                 ewarn "monitor."
64                 ewarn
65                 sleep 5
66         else
67                 mymake="MPD_NO_IPV6=noipv6"
68         fi
69         local myconf
70         myconf="--enable-double-buffer --enable-own-window --enable-proc-uptime
71         --enable-mpd --enable-mldonkey"
72         econf \
73                 ${myconf} \
74                 $(use_enable truetype xft) \
75                 $(use_enable X x11) \
76                 $(use_enable !ipv6 portmon) || die "econf failed"
77 #               $(use_enable seti)
78         emake ${mymake} || die "compile failed"
79 }
80
81 src_install() {
82         emake DESTDIR=${D} install || die "make install failed"
83         dodoc ChangeLog AUTHORS README doc/conkyrc.sample doc/variables.html
84         dodoc doc/docs.html doc/config_settings.html
85 }
86
87 pkg_postinst() {
88         einfo 'Default configuration file is "~/.conkyrc"'
89         einfo "you can find a sample configuration file in"
90         einfo "/usr/share/doc/${PF}/conkyrc.sample.gz"
91         einfo
92         einfo "For more info on Conky's new features,"
93         einfo "please look at the README and ChangeLog:"
94         einfo "/usr/share/doc/${PF}/README.gz"
95         einfo "/usr/share/doc/${PF}/ChangeLog.gz"
96         einfo "There are also pretty html docs available"
97         einfo "on Conky's site or in /usr/share/doc/${PF}"
98         einfo
99         einfo "Comment out temperature info lines if you have no kernel"
100         einfo "support for it."
101         einfo
102         einfo "Check out app-vim/conky-syntax for conkyrc"
103         einfo "syntax highlighting in Vim"
104         einfo
105         ewarn "Conky doesn't work with window managers that"
106         ewarn "take control over root window such as Gnome's nautilus."
107         ewarn
108 }