summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/pseudo/pseudo.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/pseudo/pseudo.inc')
-rw-r--r--meta/recipes-devtools/pseudo/pseudo.inc69
1 files changed, 69 insertions, 0 deletions
diff --git a/meta/recipes-devtools/pseudo/pseudo.inc b/meta/recipes-devtools/pseudo/pseudo.inc
new file mode 100644
index 0000000000..a458dcce69
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/pseudo.inc
@@ -0,0 +1,69 @@
1DESCRIPTION = "Pseudo gives fake root capabilities to a normal user"
2HOMEPAGE = "http://wiki.github.com/wrpseudo/pseudo/"
3LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad"
4SECTION = "base"
5LICENSE = "LGPL2.1"
6DEPENDS = "sqlite3"
7
8FILES_${PN} = "${libdir}/libpseudo.so ${bindir}/* ${localstatedir}/pseudo"
9PROVIDES += "virtual/fakeroot"
10
11inherit siteinfo
12
13do_configure () {
14 :
15}
16
17NO32LIBS ??= "0"
18
19# Compile for the local machine arch...
20do_compile () {
21 ${S}/configure --prefix=${prefix} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS}
22 oe_runmake 'LIB=lib/pseudo/lib$(MARK64)'
23}
24
25# Two below are the same
26# If necessary compile for the alternative machine arch. This is only
27# necessary in a native build.
28do_compile_prepend_virtclass-native () {
29 if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
30 # We need the 32-bit libpseudo on a 64-bit machine...
31 ./configure --prefix=${prefix} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32
32 oe_runmake 'CFLAGS=-m32' 'LIB=lib/pseudo/lib' libpseudo
33 # prevent it from removing the lib, but remove everything else
34 make 'LIB=foo' distclean
35 fi
36}
37
38do_compile_prepend_virtclass-nativesdk () {
39 if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
40 # We need the 32-bit libpseudo on a 64-bit machine...
41 ./configure --prefix=${prefix} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32
42 oe_runmake 'CFLAGS=-m32' 'LIB=lib/pseudo/lib' libpseudo
43 # prevent it from removing the lib, but remove everything else
44 make 'LIB=foo' distclean
45 fi
46}
47
48do_install () {
49 oe_runmake 'DESTDIR=${D}' 'LIB=lib/pseudo/lib$(MARK64)' install
50}
51
52# Two below are the same
53# If necessary install for the alternative machine arch. This is only
54# necessary in a native build.
55do_install_append_virtclass-native () {
56 if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
57 mkdir -p ${D}${prefix}/lib/pseudo/lib
58 cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
59 fi
60}
61
62do_install_append_virtclass-nativesdk () {
63 if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
64 mkdir -p ${D}${prefix}/lib/pseudo/lib
65 cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
66 fi
67}
68
69BBCLASSEXTEND = "native nativesdk"