]> Pileus Git - ~andy/sunrise/blob - app-arch/zpaq/zpaq-1.09.ebuild
4b8b484eda454b46ae23cffd2271ede6d4294be0
[~andy/sunrise] / app-arch / zpaq / zpaq-1.09.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit toolchain-funcs
6
7 MY_P="${PN}${PV/./}"
8 DESCRIPTION="Unified compressor for PAQ algorithms"
9 HOMEPAGE="http://mattmahoney.net/dc/#zpaq"
10 SRC_URI="http://mattmahoney.net/dc/${MY_P}.zip"
11
12 LICENSE="GPL-3"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE=""
16
17 DEPEND="app-arch/unzip"
18 RDEPEND=""
19
20 src_compile() {
21         # Upstream doesn't provide any Makefile
22
23         # -DOPT is broken (at least) on Linux
24         "$(tc-getCXX)" ${CXXFLAGS} -DNDEBUG zpaq.cpp -o zpaq || die 'compiling zpaq failed'
25         "$(tc-getCXX)" ${CXXFLAGS} lzppre.cpp -o lzppre || die 'compiling lzppre failed'
26
27         sed -e 's:^pcomp :&/usr/libexec/zpaq/:' -i *.cfg || die 'sed failed'
28 }
29
30 src_install() {
31         dobin zpaq || die 'dobin failed'
32
33         dodoc readme.txt || die 'dodoc failed'
34
35         # Preprocessors
36         exeinto /usr/libexec/zpaq
37         doexe lzppre || die 'doexe failed'
38
39         # These are more like compression profiles, so install them in /usr/share
40         insinto /usr/share/zpaq
41         doins *.cfg || die 'doins failed'
42 }
43
44 pkg_postinst() {
45         elog "Unlike conventional archivers, zpaq doesn't have any algorithm chain"
46         elog "compiled in by default. Instead, it provides many PAQ components to allow"
47         elog "user to create his own chain and supply it as configuration file."
48         elog
49         elog "We install few default configs in /usr/share/zpaq to start with. They can"
50         elog "be used like that:"
51         elog "  zpaq c/usr/share/zpaq/max.cfg out.zpaq files"
52         elog
53         elog "You may also want to install app-arch/zpaq-extras package which provides"
54         elog "few additional configs and preprocessors for use with zpaq."
55 }