summaryrefslogtreecommitdiff
blob: 2753eea6d2226921287932c9072ee69af37d88be (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-fs/vzquota/vzquota-3.1.ebuild,v 1.1 2012/12/13 09:14:36 pinkbyte Exp $

EAPI=5

inherit toolchain-funcs

DESCRIPTION="OpenVZ VPS disk quota utility"
HOMEPAGE="http://openvz.org/download/utils/vzquota/"
SRC_URI="http://download.openvz.org/utils/${PN}/${PV}/src/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ia64 ~ppc64 ~sparc ~x86"
IUSE=""

src_prepare() {
	sed -e 's,$(INSTALL) -s -m,$(INSTALL) -m,' \
		-e 's:$(CC) $(CFLAGS) -o:$(CC) $(CFLAGS) $(LDFLAGS) -o:' \
		-e 's:-Werror ::' \
			-i "${S}/src/Makefile" || die 'sed on src/Makefile failed'
	tc-export CC
}

src_install() {
	emake DESTDIR="${ED}" INSTALL="${EPREFIX}/usr/bin/install" install
	keepdir /var/vzquota
	# remove accidentally created man8 dir
	rm -r "${ED}/man8" || die 'remove man8 directory failed'
}