blob: 5289cdb84180a78d4797852cbbd069696b4da650 (
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
|
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit multilib toolchain-funcs
MY_P="${PN}${PV/./}"
DESCRIPTION="Unified compressor for PAQ algorithms"
HOMEPAGE="http://mattmahoney.net/dc/#zpaq"
SRC_URI="http://mattmahoney.net/dc/${MY_P}.zip"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
src_compile() {
# Upstream doesn't provide any Makefile
# -DOPT is broken (at least) on Linux
"$(tc-getCXX)" ${CXXFLAGS} -DNDEBUG zpaq.cpp -o zpaq || die 'compiling zpaq failed'
"$(tc-getCXX)" ${CXXFLAGS} lzppre.cpp -o zpaq-lzppre || die 'compiling lzppre failed'
sed -e 's/lzppre/zpaq-&/' -i *.cfg || die 'sed failed'
}
src_install() {
dobin zpaq zpaq-lzppre || die 'dobin failed'
dodoc readme.txt || die 'dodoc failed'
# These are more like compression profiles, so install them in /usr/share
insinto /usr/share/zpaq
doins *.cfg || die 'doins failed'
}
pkg_postinst() {
elog "Unlike conventional archivers, zpaq doesn't have any algorithm chain"
elog "compiled in by default. Instead, it provides many PAQ components to allow"
elog "user to create his own chain and supply it as configuration file."
elog
elog "We install few default configs in /usr/share/zpaq to start with. They can"
elog "be used like that:"
elog " zpaq c/usr/share/zpaq/max.cfg out.zpaq files"
}
|