forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bestcrypt-2.0.0.ebuild
72 lines (57 loc) · 1.7 KB
/
bestcrypt-2.0.0.ebuild
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="4"
inherit eutils linux-mod toolchain-funcs versionator
MY_PN="bcrypt"
MY_PV="$(replace_version_separator 2 -)"
DESCRIPTION="commercially licensed transparent filesystem encryption"
HOMEPAGE="http://www.jetico.com/"
SRC_URI="http://www.jetico.com/linux/BestCrypt-${MY_PV}.tar.gz"
LICENSE="bestcrypt"
SLOT="0"
IUSE=""
KEYWORDS="~amd64 ~x86"
DEPEND="virtual/linux-sources"
RDEPEND=""
S="${WORKDIR}/${MY_PN}-${MY_PV}"
pkg_setup() {
CONFIG_CHECK="MODULES"
linux-mod_pkg_setup
MODULE_NAMES="bestcrypt(block::kernel/kmod)
bc_3des(crypto::kernel/kmod/crypto/algs/3des)
bc_bf128(crypto::kernel/kmod/crypto/algs/bf128)
bc_bf448(crypto::kernel/kmod/crypto/algs/bf448)
bc_blowfish(crypto::kernel/kmod/crypto/algs/blowfish)
bc_cast(crypto::kernel/kmod/crypto/algs/cast)
bc_des(crypto::kernel/kmod/crypto/algs/des)
bc_gost(crypto::kernel/kmod/crypto/algs/gost)
bc_idea(crypto::kernel/kmod/crypto/algs/idea)
bc_rijn(crypto::kernel/kmod/crypto/algs/rijn)"
BUILD_TARGETS="module"
BUILD_PARAMS=" \
KERNEL_DIR=\"${KV_DIR}\""
}
src_prepare() {
epatch "${FILESDIR}/${P}-build.patch"
}
src_compile() {
MAKEOPTS="-j1" linux-mod_src_compile
MAKEOPTS="-j1" emake \
CFLAGS="${CXXFLAGS}" \
LDFLAGS="${LDFLAGS}"
}
src_install() {
linux-mod_src_install
emake install PREFIX="${ED}" install
newinitd "${FILESDIR}/bcrypt3" bcrypt
sed -e '/\(bc_rc6\|bc_serpent\|bc_twofish\)/d' -i "${D}etc/init.d/bcrypt"
dodoc HIDDEN_PART README
}
pkg_postinst() {
ewarn
ewarn "The BestCrypt drivers are not free - Please purchace a license from "
ewarn "http://www.jetico.com/"
ewarn
linux-mod_pkg_postinst
}