summaryrefslogtreecommitdiff
blob: 13f16beaf20123a51adeb167efbc7adb8cd639cf (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
47
48
49
50
51
52
53
54
55
56
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5
RESTRICT="mirror"
inherit eutils systemd vcs-snapshot

DESCRIPTION="Keep directories compressed with squashfs. Useful for portage tree, texmf-dist"
HOMEPAGE="http://forums.gentoo.org/viewtopic-t-465367.html"
SRC_URI="http://github.com/vaeth/${PN}/tarball/release-${PV} -> ${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="zsh-completion"

RDEPEND="!<app-shells/runtitle-2.3
	zsh-completion? ( app-shells/runtitle[zsh-completion] )
	dev-lang/perl
	|| ( dev-perl/File-Which sys-apps/which )
	sys-fs/squashfs-tools
	!<sys-fs/unionfs-fuse-0.25"
DEPEND=""

src_prepare() {
	epatch_user
}

src_install() {
	dobin bin/*
	dodoc README ChangeLog
	doinitd openrc/init.d/*
	systemd_dounit systemd/system/*
	insinto /etc
	doins etc/*
	if use zsh-completion
	then	insinto /usr/share/zsh/site-functions
		doins zsh/*
	fi
}

pkg_postinst() {
	if ! has_version sys-fs/squashfs-tools[progress-redirect]
	then	elog "For better output of ${PN}, it is recommended to install"
		elog "sys-fs/squashfs-tools from the mv overlay with USE=progress-redirect"
	fi
	has_version app-shells/runtitle || elog \
		"Install app-shells/runtitle to let ${PN} update the status bar"
	has_version dev-perl/File-Which || elog \
		"${PN} strongly recommends to install dev-perl/File-Which"
	has_version '>=dev-lang/perl-5.14' || has_version perl-core/Term-ANSIColor || {
		elog "For colored output install virtual/perl-Term-ANSIColor or"
		elog "alternatively upgrade to >=dev-lang/perl-5.14"
	}
}