]> Pileus Git - ~andy/sunrise/blob - net-misc/sambascanner/sambascanner-0.22.ebuild
sunrise/ app-portage/elog-list/elog-list-0.0.6.ebuild: Update header
[~andy/sunrise] / net-misc / sambascanner / sambascanner-0.22.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit autotools eutils toolchain-funcs
6
7 MY_P="SambaScanner-${PV}"
8 DESCRIPTION="a tool to search a whole samba network for files"
9 HOMEPAGE="http://www.johannes-bauer.com/sambascanner/"
10 SRC_URI="http://www.johannes-bauer.com/${PN}/${MY_P}.tar.bz2"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="debug linguas_de"
16
17 RDEPEND=">=net-fs/samba-3"
18 DEPEND="${RDEPEND}
19         sys-devel/gettext"
20
21 S=${WORKDIR}/${MY_P}
22
23 src_unpack() {
24         if ! built_with_use --missing true sys-libs/glibc nptl; then
25                 die "Sambascanner requires an NPTL system"
26         fi
27         unpack ${A}
28         cd "${S}"
29         if use debug; then
30                 #prevent configure from completely replacing our CFLAGS
31                 sed 's:CFLAGS="-O0 -g -pthread":CFLAGS="${CFLAGS} -g -pthread":' -i configure.ac
32                 eautoreconf
33         fi
34 }
35
36 src_compile() {
37         econf CFLAGS="${CFLAGS} -pthread" $(use_enable debug)
38         emake CC=$(tc-getCC) || die "emake failed"
39 }
40
41 src_install() {
42         # sambascanner's make install is broken
43         dobin src/sambascanner bin/sambaretrieve src/smblister
44         insinto /usr/share/${PN}/
45         doins -r db
46         use linguas_de && domo i18n/de.mo
47         dodoc AUTHORS ChangeLog README sambascannerrc-example db/db.conf.sample
48 }