adding 1.4.6 ebuild
[monky] / app-admin / conky / conky-1.999.ebuild
1 # Subversion repository ebuild for conky by drphibes
2 # $Header: $
3
4 ESVN_REPO_URI="https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1"
5 ESVN_PROJECT="conky1"
6 inherit subversion
7
8 DESCRIPTION="Conky is an advanced, highly configurable system monitor for X"
9 HOMEPAGE="http://conky.sf.net"
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                 !ipv6? ( >=dev-libs/glib-2.0 )
35         )"
36
37 RDEPEND="${DEPEND_COMMON}
38         hddtemp? ( app-admin/hddtemp )
39         mpd? ( media-sound/mpd )
40         vim-syntax? ( || ( app-editors/vim
41                 app-editors/gvim ) )"
42
43 DEPEND="
44         ${DEPEND_COMMON}
45         X? (
46                 || ( ( x11-libs/libXt
47                                 x11-proto/xextproto
48                                 x11-proto/xproto
49                                 )
50                                 virtual/x11
51                 )
52         )"
53
54 S=${WORKDIR}/conky
55
56 src_compile() {
57         ./autogen.sh ${ESVN_STORE_DIR}/${ESVN_PROJECT}/conky1
58
59         local mymake
60         if useq ipv6 ; then
61                 ewarn
62                 ewarn "You have the ipv6 USE flag enabled.  Please note that using"
63                 ewarn "the ipv6 USE flag with Conky disables the port monitor."
64                 epause
65         else
66                 mymake="MPD_NO_IPV6=noipv6"
67         fi
68         local myconf
69         myconf="--enable-proc-uptime"
70         if useq X; then
71                 myconf="${myconf} --enable-x11 --enable-double-buffer --enable-xdamage --enable-own-window"
72                 myconf="${myconf} $(use_enable truetype xft)"
73         else
74                 myconf="${myconf} --disable-x11 --disable-double-buffer --disable-xdamage --disable-own-window"
75                 myconf="${myconf} --disable-xft"
76         fi
77         econf \
78                 ${myconf} \
79                 $(use_enable audacious) \
80                 $(use_enable bmpx) \
81                 $(use_enable hddtemp ) \
82                 $(use_enable mpd) \
83                 $(use_enable !ipv6 portmon) || die "econf failed"
84         emake ${mymake} || die "compile failed"
85 }
86
87 src_install() {
88         emake DESTDIR="${D}" install || die "make install failed"
89         dodoc ChangeLog AUTHORS README doc/conkyrc.sample
90         dohtml doc/docs.html doc/config_settings.html doc/variables.html
91
92         if use vim-syntax; then
93                 insinto /usr/share/vim/vimfiles/ftdetect
94                 doins "${S}"/extras/vim/ftdetect/conkyrc.vim
95
96                 insinto /usr/share/vim/vimfiles/syntax
97                 doins "${S}"/extras/vim/syntax/conkyrc.vim
98         fi
99 }
100
101 pkg_postinst() {
102         einfo 'Default configuration file is "~/.conkyrc"'
103         einfo "You can find a sample configuration file in"
104         einfo "/usr/share/doc/${PF}/conkyrc.sample.gz"
105         einfo
106         einfo "For more info on Conky's new features,"
107         einfo "please look at the README and ChangeLog:"
108         einfo "/usr/share/doc/${PF}/README.gz"
109         einfo "/usr/share/doc/${PF}/ChangeLog.gz"
110         einfo "There are also pretty html docs available"
111         einfo "on Conky's site or in /usr/share/doc/${PF}"
112         einfo
113         einfo "Also see http://www.gentoo.org/doc/en/conky-howto.xml"
114         einfo
115         einfo "Vim syntax highlighting for conkyrc now enabled with"
116         einfo "USE=vim-syntax"
117         einfo
118 }