blob: f55b0c3901b360a678ea7867edc475b834274fdf [file] [log] [blame]
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +05301SUMMARY = "The eCryptfs mount helper and support libraries"
2DESCRIPTION = "eCryptfs is a stacked cryptographic filesystem \
3 that ships in Linux kernel versions 2.6.19 and above. This \
4 package provides the mount helper and supporting libraries \
5 to perform key management and mount functions."
6HOMEPAGE = "https://launchpad.net/ecryptfs"
7SECTION = "base"
8
9LICENSE = "GPL-2.0"
10LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
11
12DEPENDS = "keyutils libgcrypt intltool-native glib-2.0-native"
13
14SRC_URI = "\
15 https://launchpad.net/ecryptfs/trunk/${PV}/+download/${BPN}_${PV}.orig.tar.gz \
16 file://ecryptfs-utils-CVE-2016-6224.patch \
17 file://ecryptfs.service \
18 "
19
20SRC_URI[md5sum] = "83513228984f671930752c3518cac6fd"
21SRC_URI[sha256sum] = "112cb3e37e81a1ecd8e39516725dec0ce55c5f3df6284e0f4cc0f118750a987f"
22
23inherit autotools pkgconfig systemd
24
25SYSTEMD_PACKAGES = "${PN}"
26SYSTEMD_SERVICE_${PN} = "ecryptfs.service"
27
28EXTRA_OECONF = "\
29 --libdir=${base_libdir} \
30 --disable-pywrap \
31 --disable-nls \
32 "
33
34PACKAGECONFIG ??= "nss \
35 ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
36 "
37PACKAGECONFIG[nss] = "--enable-nss,--disable-nss,nss,"
38PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl,"
39PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam,"
40
41do_configure_prepend() {
42 export NSS_CFLAGS="-I${STAGING_INCDIR}/nspr4 -I${STAGING_INCDIR}/nss3"
43 export NSS_LIBS="-L${STAGING_BASELIBDIR} -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lnssutil3"
44 export KEYUTILS_CFLAGS="-I${STAGING_INCDIR}"
45 export KEYUTILS_LIBS="-L${STAGING_LIBDIR} -lkeyutils"
46}
47
48do_install_append() {
49 chmod 4755 ${D}${base_sbindir}/mount.ecryptfs_private
50 mkdir -p ${D}/${libdir}
51 mv ${D}/${base_libdir}/pkgconfig ${D}/${libdir}
52 sed -i -e 's:-I${STAGING_INCDIR}::' \
53 -e 's:-L${STAGING_LIBDIR}::' ${D}/${libdir}/pkgconfig/libecryptfs.pc
54 sed -i -e "s: ${base_sbindir}/cryptsetup: ${sbindir}/cryptsetup:" ${D}${bindir}/ecryptfs-setup-swap
55 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
56 install -D -m 0644 ${WORKDIR}/ecryptfs.service ${D}${systemd_system_unitdir}/ecryptfs.service
57 fi
58}
59
60FILES_${PN} += "${base_libdir}/security/* ${base_libdir}/ecryptfs/*"
61
62RDEPENDS_${PN} += "cryptsetup"
63RRECOMMENDS_${PN} = "gettext-runtime"