summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs/ecryptfs-utils')
-rw-r--r--sys-fs/ecryptfs-utils/Manifest1
-rw-r--r--sys-fs/ecryptfs-utils/ecryptfs-utils-104.ebuild134
-rw-r--r--sys-fs/ecryptfs-utils/metadata.xml17
3 files changed, 152 insertions, 0 deletions
diff --git a/sys-fs/ecryptfs-utils/Manifest b/sys-fs/ecryptfs-utils/Manifest
new file mode 100644
index 000000000000..0b1233dde7e6
--- /dev/null
+++ b/sys-fs/ecryptfs-utils/Manifest
@@ -0,0 +1 @@
+DIST ecryptfs-utils_104.orig.tar.gz 649268 SHA256 4a200176542d46439c5297021f2c7fd7343b871c20c6f73f6e6c9fc4e5fd7438 SHA512 1d093df406c731e6a44bcfc647d5e84a4110fc8d55c8a6aee7e056b0cac8f826b16fbde3dcccd0cf64fcd981a7666b71b1697951ed614ad510c4a6e403f5efd8 WHIRLPOOL e483161d9268583dd596a62299e46c9e37d2e5ceb1f0e197115a9d4b489167abe40e3fd9ff4ed411f7b97543b26c0793411d815bdba9cef211dbe69f3c7bf54c
diff --git a/sys-fs/ecryptfs-utils/ecryptfs-utils-104.ebuild b/sys-fs/ecryptfs-utils/ecryptfs-utils-104.ebuild
new file mode 100644
index 000000000000..ee619a0238cc
--- /dev/null
+++ b/sys-fs/ecryptfs-utils/ecryptfs-utils-104.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+PYTHON_DEPEND="python? 2:2.5"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="2.4 3.* *-jython 2.7-pypy-*"
+
+inherit flag-o-matic pam python linux-info autotools
+
+DESCRIPTION="eCryptfs userspace utilities"
+HOMEPAGE="https://launchpad.net/ecryptfs"
+SRC_URI="http://launchpad.net/ecryptfs/trunk/${PV}/+download/${PN}_${PV}.orig.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE="doc gpg gtk openssl pam pkcs11 python suid tpm"
+
+RDEPEND=">=sys-apps/keyutils-1.0
+ >=dev-libs/libgcrypt-1.2.0:0
+ dev-libs/nss
+ gpg? ( app-crypt/gpgme )
+ gtk? ( x11-libs/gtk+:2 )
+ openssl? ( >=dev-libs/openssl-0.9.7 )
+ pam? ( sys-libs/pam )
+ pkcs11? (
+ >=dev-libs/openssl-0.9.7
+ >=dev-libs/pkcs11-helper-1.04
+ )
+ tpm? ( app-crypt/trousers )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/gettext
+ >=dev-util/intltool-0.41.0
+ python? ( dev-lang/swig )"
+
+pkg_setup() {
+ use python && python_pkg_setup
+
+ CONFIG_CHECK="~ECRYPT_FS"
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ echo "#!/bin/sh" > py-compile
+
+ # Python bindings are built/installed manually.
+ sed -e "/SUBDIRS =/s/ libecryptfs-swig//" -i src/Makefile.am || die "sed failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ append-cppflags -D_FILE_OFFSET_BITS=64
+
+ econf \
+ --docdir="/usr/share/doc/${PF}" \
+ --enable-nss \
+ --with-pamdir=$(getpam_mod_dir) \
+ $(use_enable doc docs) \
+ $(use_enable gpg) \
+ $(use_enable gtk gui) \
+ $(use_enable openssl) \
+ $(use_enable pam) \
+ $(use_enable pkcs11 pkcs11-helper) \
+ $(use_enable python pywrap) \
+ $(use_enable tpm tspi)
+}
+
+src_compile() {
+ default
+
+ if use python; then
+ python_copy_sources src/libecryptfs-swig
+ building() {
+ emake \
+ PYTHON="$(PYTHON)" \
+ PYTHON_CPPFLAGS="-I$(python_get_includedir)" \
+ PYTHON_LDFLAGS="-L$(python_get_libdir) $(python_get_library -l)" \
+ PYTHON_SITE_PKG="$(python_get_sitedir)" \
+ PYTHON_VERSION="$(python_get_version)" \
+ SWIG_PYTHON_CPPFLAGS="-I$(python_get_includedir)" \
+ pyexecdir="$(python_get_sitedir)" \
+ pythondir="$(python_get_sitedir)"
+ }
+ python_execute_function -s --source-dir src/libecryptfs-swig building
+ fi
+}
+
+src_install(){
+ emake DESTDIR="${D}" install
+
+ if use python; then
+ installation() {
+ emake \
+ DESTDIR="${D}" \
+ PYTHON="$(PYTHON)" \
+ PYTHON_CPPFLAGS="-I$(python_get_includedir)" \
+ PYTHON_LDFLAGS="-L$(python_get_libdir) $(python_get_library -l)" \
+ PYTHON_SITE_PKG="$(python_get_sitedir)" \
+ PYTHON_VERSION="$(python_get_version)" \
+ SWIG_PYTHON_CPPFLAGS="-I$(python_get_includedir)" \
+ pyexecdir="$(python_get_sitedir)" \
+ pythondir="$(python_get_sitedir)" \
+ install || return 1
+ echo "ecryptfs-utils" > "${ED}$(python_get_sitedir)/ecryptfs-utils.pth"
+ }
+ python_execute_function -s --source-dir src/libecryptfs-swig installation
+
+ python_clean_installation_image
+ fi
+
+ use suid && fperms u+s /sbin/mount.ecryptfs_private
+
+ find "${ED}" -name '*.la' -exec rm -f '{}' +
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize ecryptfs-utils
+
+ if use suid; then
+ ewarn
+ ewarn "You have chosen to install ${PN} with the binary setuid root. This"
+ ewarn "means that if there are any undetected vulnerabilities in the binary,"
+ ewarn "then local users may be able to gain root access on your machine."
+ ewarn
+ fi
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup ecryptfs-utils
+}
diff --git a/sys-fs/ecryptfs-utils/metadata.xml b/sys-fs/ecryptfs-utils/metadata.xml
new file mode 100644
index 000000000000..8a71e7a160ef
--- /dev/null
+++ b/sys-fs/ecryptfs-utils/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>kernel-misc</herd>
+ <herd>crypto</herd>
+ <use>
+ <flag name="gpg">Enable <pkg>app-crypt/gnupg</pkg> key module</flag>
+ <flag name="openssl">Enable <pkg>dev-libs/openssl</pkg> key
+ module</flag>
+ <flag name="pkcs11">Enable PKCS#11 (Smartcards) key module</flag>
+ <flag name="tpm">Enable support for Trusted Platform Module (TPM) using <pkg>app-crypt/trousers</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:ecryptfs:ecryptfs_utils</remote-id>
+ <remote-id type="launchpad">ecryptfs</remote-id>
+ </upstream>
+</pkgmetadata>