summaryrefslogtreecommitdiff
path: root/meta/packages
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-03-22 23:54:41 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-03-22 23:54:41 +0000
commit1d05e3aa30e890a46d5febbde00548a20031fae5 (patch)
tree05d5d4d7954a1d15c9b2141d73af0c71c38dfdfc /meta/packages
parent006510ceda571e3183525f4ee3bd399a2d3ce7ed (diff)
downloadopenembedded-core-1d05e3aa30e890a46d5febbde00548a20031fae5.tar.gz
openembedded-core-1d05e3aa30e890a46d5febbde00548a20031fae5.tar.bz2
openembedded-core-1d05e3aa30e890a46d5febbde00548a20031fae5.tar.xz
openembedded-core-1d05e3aa30e890a46d5febbde00548a20031fae5.zip
pseudo: Add recipe
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/packages')
-rw-r--r--meta/packages/pseudo/pseudo/tweakflags.patch79
-rw-r--r--meta/packages/pseudo/pseudo_git.bb24
2 files changed, 103 insertions, 0 deletions
diff --git a/meta/packages/pseudo/pseudo/tweakflags.patch b/meta/packages/pseudo/pseudo/tweakflags.patch
new file mode 100644
index 000000000..fb31e05a1
--- /dev/null
+++ b/meta/packages/pseudo/pseudo/tweakflags.patch
@@ -0,0 +1,79 @@
+CFLAGS is overridden from the environment by Poky. We need boths sets of
+flags so we adjust the Makefile accordingly.
+
+Also the default target is "test" which runs install which we don't want
+until "make install" time when DESTDIR is set. Change the first target
+to "all" for this reason.
+
+RP 18/3/10
+
+Index: git/Makefile.in
+===================================================================
+--- git.orig/Makefile.in 2010-03-17 16:05:17.000000000 +0000
++++ git/Makefile.in 2010-03-18 18:49:37.000000000 +0000
+@@ -34,7 +34,7 @@
+ CFLAGS_DEFS=-DPSEUDO_PREFIX='"$(PREFIX)"' -DPSEUDO_SUFFIX='"$(SUFFIX)"' -DPSEUDO_VERSION='"$(VERSION)"'
+ CFLAGS_DEBUG=-O2 -g
+ CFLAGS_SQL=-L$(SQLITE)/lib -I$(SQLITE)/include
+-CFLAGS=$(CFLAGS_BASE) $(CFLAGS_CODE) $(CFLAGS_DEFS) \
++EXTRA_CFLAGS=$(CFLAGS_BASE) $(CFLAGS_CODE) $(CFLAGS_DEFS) \
+ $(CFLAGS_DEBUG) $(CFLAGS_SQL)
+
+ GLOB_PATTERN=guts/*.c
+@@ -47,11 +47,11 @@
+ DBOBJS=pseudo_db.o -ldl -lpthread
+ WRAPOBJS=pseudo_wrappers.o
+
++all: libpseudo.so pseudo pseudodb pseudolog
++
+ test: install
+ @echo "No tests yet."
+
+-all: libpseudo.so pseudo pseudodb pseudolog
+-
+ install-lib: libpseudo.so
+ mkdir -p $(DESTDIR)$(LIBDIR)
+ cp libpseudo*.so $(DESTDIR)$(LIBDIR)
+@@ -66,26 +66,29 @@
+ install: all install-lib install-bin install-data
+
+ pseudo: pseudo.o $(SHOBJS) $(DBOBJS) pseudo_server.o pseudo_ipc.o
+- $(CC) $(CFLAGS) -o pseudo \
++ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o pseudo \
+ pseudo.o pseudo_server.o pseudo_client.o pseudo_ipc.o \
+ $(DBOBJS) $(SHOBJS) $(DBLDFLAGS)
+
+ pseudolog: pseudolog.o $(SHOBJS) $(DBOBJS)
+- $(CC) $(CFLAGS) -o pseudolog pseudolog.o \
++ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o pseudolog pseudolog.o \
+ $(DBOBJS) $(SHOBJS) $(DBLDFLAGS)
+
+ pseudodb: pseudodb.o $(SHOBJS) $(DBOBJS) pseudo_ipc.o
+- $(CC) $(CFLAGS) -o pseudodb pseudodb.o \
++ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o pseudodb pseudodb.o \
+ $(DBOBJS) $(SHOBJS) $(DBLDFLAGS) pseudo_ipc.o
+
+ libpseudo.so: $(WRAPOBJS) pseudo_client.o pseudo_ipc.o $(SHOBJS)
+- $(CC) $(CFLAGS) -shared -o libpseudo.so \
++ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -shared -o libpseudo.so \
+ pseudo_client.o pseudo_ipc.o \
+ $(WRAPOBJS) $(SHOBJS) -ldl
+ if test -n "$(SUFFIX)"; then \
+ cp libpseudo.so libpseudo$(SUFFIX).so ; \
+ fi
+
++%.o: %.c
++ $(CC) -c $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) $<
++
+ pseudo_client.o pseudo_server.o pseudo_ipc.o: pseudo_ipc.h
+
+ pseudo_client.o: pseudo_client.h
+@@ -103,7 +106,7 @@
+
+ # no-strict-aliasing is needed for the function pointer trickery.
+ pseudo_wrappers.o: pseudo_wrappers.c
+- $(CC) -fno-strict-aliasing $(CFLAGS) -D_GNU_SOURCE -c -o pseudo_wrappers.o pseudo_wrappers.c
++ $(CC) -fno-strict-aliasing $(CFLAGS) $(EXTRA_CFLAGS) -D_GNU_SOURCE -c -o pseudo_wrappers.o pseudo_wrappers.c
+
+ offsets32:
+ $(CC) -m32 -o offsets32 offsets.c
diff --git a/meta/packages/pseudo/pseudo_git.bb b/meta/packages/pseudo/pseudo_git.bb
new file mode 100644
index 000000000..0512a955d
--- /dev/null
+++ b/meta/packages/pseudo/pseudo_git.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "Pseudo gives fake root capabilities to a normal user"
+SECTION = "base"
+LICENSE = "LGPL2.1"
+DEPENDS = "sqlite3"
+
+PV = "0.0+git${SRCPV}"
+PR = "r2"
+
+SRC_URI = "git://github.com/wrpseudo/pseudo.git;protocol=git \
+ file://tweakflags.patch;patch=1"
+
+S = "${WORKDIR}/git"
+
+inherit siteinfo
+
+do_configure () {
+ ${S}/configure --prefix=${prefix} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS}
+}
+
+NATIVE_INSTALL_WORKS = "1"
+
+BBCLASSEXTEND = "native"
+
+