summaryrefslogtreecommitdiff
blob: 68746d46b4a0e0f38da0eec3d79eeb05bcac4427 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit autotools toolchain-funcs

DESCRIPTION="Popular filesystem benchmark"
SRC_URI="https://www.samba.org/ftp/pub/tridge/dbench/${P}.tar.gz"
HOMEPAGE="https://www.samba.org/ftp/tridge/dbench/"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~loong ppc ppc64 ~riscv sparc x86"

DEPEND="dev-libs/popt"
RDEPEND="${DEPEND}"

src_prepare() {
	default

	sed -i -e "s:\$(CC) -o:\$(CC) \$(LDFLAGS) -o:" Makefile.in || die
	mv configure.{in,ac} || die

	eautoreconf
}

src_compile() {
	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}"
}

src_install() {
	dobin dbench tbench tbench_srv
	dodoc README INSTALL
	doman dbench.1
	insinto /usr/share/dbench
	doins client.txt
}

pkg_postinst() {
	elog "You can find the client.txt file in ${EROOT}/usr/share/dbench."
}