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