summaryrefslogtreecommitdiff
blob: d36a85c5bc37358ecdcfc27787d1064cff385792 (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
43
44
45
46
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5
inherit eutils readme.gentoo

DESCRIPTION="dynamic deltup client"
HOMEPAGE="http://linux01.gwdg.de/~nlissne/"
SRC_URI="http://linux01.gwdg.de/~nlissne/${PN}-0.7.8.tar.bz2"
SLOT="0"
IUSE=""
LICENSE="GPL-2"
KEYWORDS="~alpha ~amd64 ~sparc ~x86"
S="${WORKDIR}"

RDEPEND="app-portage/deltup
	dev-util/bdelta"

DISABLE_AUTOFORMATTING="true"
DOC_CONTENTS="You need to put
FETCHCOMMAND=\"/usr/bin/getdelta.sh \\\"\\\${URI}\\\" \\\"\\\${FILE}\\\"\"
into your /etc/make.conf to make use of getdelta"

src_prepare() {
	epatch "${FILESDIR}/eapi2.patch"
	sed -i -e "s:/bin/sh:/bin/bash:" getdelta.sh || die
	epatch_user
}

src_install() {
	dobin "${WORKDIR}"/getdelta.sh
	readme.gentoo_create_doc
}

pkg_postinst() {
	local a b
	# make sure permissions are ok
	a="${EROOT}"/var/log/getdelta.log
	b="${EROOT}"/etc/deltup
	test -f "${a}" || touch -- "${a}"
	mkdir -p -- "${b}"
	use prefix || chown -R portage:portage -- "${a}" "${b}"
	chmod -R ug+rwX -- "${a}" "${b}"
	readme.gentoo_pkg_postinst
}