93b602ecca1bd5255c362f522d538333f0321987
[datacube.git] / dev-libs / libdaemon / libdaemon-0.14-r1.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-libs/libdaemon/libdaemon-0.14-r1.ebuild,v 1.8 2012/05/13 19:47:31 aballier Exp $
4
5 EAPI=4
6
7 inherit libtool eutils
8
9 DESCRIPTION="Simple library for creating daemon processes in C"
10 HOMEPAGE="http://0pointer.de/lennart/projects/libdaemon/"
11 SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.gz"
12
13 LICENSE="LGPL-2.1"
14 SLOT="0"
15 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
16 IUSE="doc examples static-libs"
17
18 RDEPEND=""
19 DEPEND="doc? ( app-doc/doxygen )"
20
21 DOCS=( "README" )
22
23 src_configure() {
24         econf \
25                 --docdir="${EPREFIX}/usr/share/doc/${PF}" \
26                 --localstatedir=/var \
27                 --disable-examples \
28                 --disable-lynx \
29                 $(use_enable static-libs static)
30 }
31
32 src_compile() {
33         emake
34
35         if use doc ; then
36                 einfo "Building documentation"
37                 emake doxygen
38         fi
39 }
40
41 src_install() {
42         default
43
44         find "${ED}" -name '*.la' -exec rm -f {} +
45
46         if use doc; then
47                 ln -sf doc/reference/html reference
48                 dohtml -r doc/README.html doc/style.css reference
49                 doman doc/reference/man/man*/*
50         fi
51
52         if use examples; then
53                 docinto examples
54                 dodoc examples/testd.c
55         fi
56
57         rm -rf "${ED}"/usr/share/doc/${PF}/{README.html,style.css} || die "rm failed"
58 }