/[gentoo-x86]/sys-fs/ecryptfs-utils/ecryptfs-utils-95.ebuild
Gentoo

Contents of /sys-fs/ecryptfs-utils/ecryptfs-utils-95.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Sun Feb 26 05:13:03 2012 UTC (3 years, 2 months ago) by patrick
Branch: MAIN
Changes since 1.1: +3 -3 lines
Restricting jython

(Portage version: 2.2.0_alpha89/cvs/Linux x86_64)

1 patrick 1.2 # Copyright 1999-2012 Gentoo Foundation
2 radhermit 1.1 # Distributed under the terms of the GNU General Public License v2
3 patrick 1.2 # $Header: /var/cvsroot/gentoo-x86/sys-fs/ecryptfs-utils/ecryptfs-utils-95.ebuild,v 1.1 2011/12/16 05:15:27 radhermit Exp $
4 radhermit 1.1
5     EAPI="4"
6     PYTHON_DEPEND="python? 2:2.5"
7     SUPPORT_PYTHON_ABIS="1"
8 patrick 1.2 RESTRICT_PYTHON_ABIS="2.4 3.* *-jython 2.7-pypy-*"
9 radhermit 1.1
10     inherit flag-o-matic pam python linux-info autotools
11    
12     DESCRIPTION="eCryptfs userspace utilities"
13     HOMEPAGE="https://launchpad.net/ecryptfs"
14     SRC_URI="http://launchpad.net/ecryptfs/trunk/${PV}/+download/${PN}_${PV}.orig.tar.gz"
15    
16     LICENSE="GPL-2"
17     SLOT="0"
18     KEYWORDS="~amd64 ~x86"
19     IUSE="doc gpg gtk openssl pam pkcs11 python suid tpm"
20    
21     RDEPEND=">=sys-apps/keyutils-1.0
22     >=dev-libs/libgcrypt-1.2.0
23     dev-libs/nss
24     gpg? ( app-crypt/gpgme )
25     gtk? ( x11-libs/gtk+:2 )
26     openssl? ( >=dev-libs/openssl-0.9.7 )
27     pam? ( sys-libs/pam )
28     pkcs11? (
29     >=dev-libs/openssl-0.9.7
30     >=dev-libs/pkcs11-helper-1.04
31     )
32     tpm? ( app-crypt/trousers )"
33     DEPEND="${RDEPEND}
34     >=dev-util/pkgconfig-0.9.0
35     sys-devel/gettext
36     >=dev-util/intltool-0.41.0
37     python? ( dev-lang/swig )"
38    
39     pkg_setup() {
40     use python && python_pkg_setup
41    
42     CONFIG_CHECK="~ECRYPT_FS"
43     linux-info_pkg_setup
44     }
45    
46     src_prepare() {
47     echo "#!/bin/sh" > py-compile
48    
49     # Python bindings are built/installed manually.
50     sed -e "/SUBDIRS =/s/ libecryptfs-swig//" -i src/Makefile.am || die "sed failed"
51    
52     eautoreconf
53     }
54    
55     src_configure() {
56     append-flags -D_FILE_OFFSET_BITS=64
57    
58     econf \
59     --docdir="/usr/share/doc/${PF}" \
60     --enable-nss \
61     --with-pamdir=$(getpam_mod_dir) \
62     $(use_enable doc docs) \
63     $(use_enable gpg) \
64     $(use_enable gtk gui) \
65     $(use_enable openssl) \
66     $(use_enable pam) \
67     $(use_enable pkcs11 pkcs11-helper) \
68     $(use_enable python pywrap) \
69     $(use_enable tpm tspi)
70     }
71    
72     src_compile() {
73     default
74    
75     if use python; then
76     python_copy_sources src/libecryptfs-swig
77     building() {
78     emake \
79     PYTHON="$(PYTHON)" \
80     PYTHON_CPPFLAGS="-I$(python_get_includedir)" \
81     PYTHON_LDFLAGS="-L$(python_get_libdir) $(python_get_library -l)" \
82     PYTHON_SITE_PKG="$(python_get_sitedir)" \
83     PYTHON_VERSION="$(python_get_version)" \
84     SWIG_PYTHON_CPPFLAGS="-I$(python_get_includedir)" \
85     pyexecdir="$(python_get_sitedir)" \
86     pythondir="$(python_get_sitedir)"
87     }
88     python_execute_function -s --source-dir src/libecryptfs-swig building
89     fi
90     }
91    
92     src_install(){
93     emake DESTDIR="${D}" install
94    
95     if use python; then
96     installation() {
97     emake \
98     DESTDIR="${D}" \
99     PYTHON="$(PYTHON)" \
100     PYTHON_CPPFLAGS="-I$(python_get_includedir)" \
101     PYTHON_LDFLAGS="-L$(python_get_libdir) $(python_get_library -l)" \
102     PYTHON_SITE_PKG="$(python_get_sitedir)" \
103     PYTHON_VERSION="$(python_get_version)" \
104     SWIG_PYTHON_CPPFLAGS="-I$(python_get_includedir)" \
105     pyexecdir="$(python_get_sitedir)" \
106     pythondir="$(python_get_sitedir)" \
107     install || return 1
108     echo "ecryptfs-utils" > "${ED}$(python_get_sitedir)/ecryptfs-utils.pth"
109     }
110     python_execute_function -s --source-dir src/libecryptfs-swig installation
111    
112     python_clean_installation_image
113     fi
114    
115     use suid && fperms u+s /sbin/mount.ecryptfs_private
116    
117     find "${ED}" -name '*.la' -exec rm -f '{}' +
118     }
119    
120     pkg_postinst() {
121     use python && python_mod_optimize ecryptfs-utils
122    
123     if use suid; then
124     ewarn
125     ewarn "You have chosen to install ${PN} with the binary setuid root. This"
126     ewarn "means that if there are any undetected vulnerabilities in the binary,"
127     ewarn "then local users may be able to gain root access on your machine."
128     ewarn
129     fi
130     }
131    
132     pkg_postrm() {
133     use python && python_mod_cleanup ecryptfs-utils
134     }

  ViewVC Help
Powered by ViewVC 1.1.20