diff options
author | Dane Smith <smithdanea@gmail.com> | 2010-12-15 13:45:59 -0500 |
---|---|---|
committer | Dane Smith <smithdanea@gmail.com> | 2010-12-15 13:45:59 -0500 |
commit | c141fd67061d213d6a80d27ceff23e705410ec7b (patch) | |
tree | be9c962950f7dab3643ae58d3556231e43e5b46f | |
parent | Removed keywords for john. (diff) | |
download | c1pher-c141fd67061d213d6a80d27ceff23e705410ec7b.tar.gz c1pher-c141fd67061d213d6a80d27ceff23e705410ec7b.tar.bz2 c1pher-c141fd67061d213d6a80d27ceff23e705410ec7b.zip |
New openrc script
-rw-r--r-- | app-crypt/truecrypt/files/truecrypt | 29 | ||||
-rw-r--r-- | app-crypt/truecrypt/truecrypt-7.0a-r2.ebuild | 106 |
2 files changed, 135 insertions, 0 deletions
diff --git a/app-crypt/truecrypt/files/truecrypt b/app-crypt/truecrypt/files/truecrypt new file mode 100644 index 0000000..0bae30c --- /dev/null +++ b/app-crypt/truecrypt/files/truecrypt @@ -0,0 +1,29 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + before checkfs fsck + if [ -e /lib/librc.so ]; then + need device-mapper + fi +} + +start() { + if [ ! -e /lib/librc.so ]; then + eerror "The ${myservice} init script is written for baselayout-2" + eerror "Please do not use it with baselayout-1" + return 1 + fi +} + +stop() { + if [ ! -e /lib/librc.so ]; then + eerror "The ${myservice} init script is written for baselayout-2" + eerror "Please do not use it with baselayout-1" + return 1 + fi + + . /lib/rcscripts/addons/truecrypt-stop.sh +} diff --git a/app-crypt/truecrypt/truecrypt-7.0a-r2.ebuild b/app-crypt/truecrypt/truecrypt-7.0a-r2.ebuild new file mode 100644 index 0000000..ce530a6 --- /dev/null +++ b/app-crypt/truecrypt/truecrypt-7.0a-r2.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-crypt/truecrypt/truecrypt-7.0a-r1.ebuild,v 1.1 2010/11/06 01:15:14 c1pher Exp $ + +EAPI="2" + +inherit flag-o-matic linux-info multilib toolchain-funcs wxwidgets eutils + +DESCRIPTION="Free open-source disk encryption software" +HOMEPAGE="http://www.truecrypt.org/" +SRC_URI="mirror://gentoo/${P}.tar.gz" + +LICENSE="truecrypt-3.0" +SLOT="0" +KEYWORDS="" +IUSE="X" +RESTRICT="bindist" + +RDEPEND="|| ( >=sys-fs/lvm2-2.02.45 sys-fs/device-mapper ) + sys-fs/fuse + x11-libs/wxGTK:2.8[X?]" +DEPEND="${RDEPEND} + || ( dev-libs/pkcs11-helper dev-libs/opensc )" +RDEPEND="${RDEPEND} + app-admin/sudo" + +S="${WORKDIR}/${P}-source" + +pkg_nofetch() { + elog "Please download .tar.gz source from:" + elog "http://www.truecrypt.org/downloads2" + elog "Then put the file in ${DISTDIR}/${P}.tar.gz" +} + +pkg_setup() { + local CONFIG_CHECK="~BLK_DEV_DM ~DM_CRYPT ~FUSE_FS ~CRYPTO ~CRYPTO_XTS" + linux-info_pkg_setup + + local WX_GTK_VER="2.8" + if use X; then + need-wxwidgets unicode + else + need-wxwidgets base-unicode + fi +} + +src_prepare() { + if has_version x11-libs/wxGTK[X]; then + # Fix linking when NOGUI=1 + sed -e "s/WX_CONFIG_LIBS := base/&,core/" -i Main/Main.make || die "sed Main/Main.make failed" + fi +} + +src_compile() { + local EXTRA pkcs11_include_directory + + use X || EXTRA+=" NOGUI=1" + + if has_version dev-libs/pkcs11-helper; then + pkcs11_include_directory="/usr/include/pkcs11-helper-1.0" + else + pkcs11_include_directory="/usr/include/opensc" + fi + append-flags -DCKR_NEW_PIN_MODE=0x000001B0 -DCKR_NEXT_OTP=0x000001B1 + + emake \ + ${EXTRA} \ + NOSTRIP=1 \ + NOTEST=1 \ + VERBOSE=1 \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + AR="$(tc-getAR)" \ + RANLIB="$(tc-getRANLIB)" \ + TC_EXTRA_CFLAGS="${CFLAGS}" \ + TC_EXTRA_CXXFLAGS="${CXXFLAGS}" \ + TC_EXTRA_LFLAGS="${LDFLAGS}" \ + WX_CONFIG="${WX_CONFIG}" \ + PKCS11_INC="${pkcs11_include_directory}" \ + || die "emake failed" +} + +src_test() { + "${S}/Main/truecrypt" --text --test || die "tests failed" +} + +src_install() { + dobin Main/truecrypt || die + dodoc Readme.txt "Release/Setup Files/TrueCrypt User Guide.pdf" || die + exeinto "/$(get_libdir)/rcscripts/addons" + newexe "${FILESDIR}/${PN}-stop.sh" "${PN}-stop.sh" || die + + doinitd "${FILESDIR}/"${PN} ${PN} || die + + if use X; then + newicon Resources/Icons/TrueCrypt-48x48.xpm truecrypt.xpm || die + make_desktop_entry ${PN} "TrueCrypt" ${PN} "System" || die + fi +} + +pkg_postinst() { + ewarn "TrueCrypt has very restrictive license." + ewarn "Please read the ${LICENSE} license in ${PORTDIR}/licenses" + ewarn "directory before using TrueCrypt. Please be explicitly aware of" + ewarn "the limitations on redistribution of binaries or modified source." +} |