summaryrefslogtreecommitdiffstats
path: root/meta/packages/pseudo
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/pseudo
parent006510ceda571e3183525f4ee3bd399a2d3ce7ed (diff)
downloadpoky-1d05e3aa30e890a46d5febbde00548a20031fae5.tar.gz
pseudo: Add recipe
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/packages/pseudo')
-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 0000000000..fb31e05a1e
--- /dev/null
+++ b/meta/packages/pseudo/pseudo/tweakflags.patch
@@ -0,0 +1,79 @@
1CFLAGS is overridden from the environment by Poky. We need boths sets of
2flags so we adjust the Makefile accordingly.
3
4Also the default target is "test" which runs install which we don't want
5until "make install" time when DESTDIR is set. Change the first target
6to "all" for this reason.
7
8RP 18/3/10
9
10Index: git/Makefile.in
11===================================================================
12--- git.orig/Makefile.in 2010-03-17 16:05:17.000000000 +0000
13+++ git/Makefile.in 2010-03-18 18:49:37.000000000 +0000
14@@ -34,7 +34,7 @@
15 CFLAGS_DEFS=-DPSEUDO_PREFIX='"$(PREFIX)"' -DPSEUDO_SUFFIX='"$(SUFFIX)"' -DPSEUDO_VERSION='"$(VERSION)"'
16 CFLAGS_DEBUG=-O2 -g
17 CFLAGS_SQL=-L$(SQLITE)/lib -I$(SQLITE)/include
18-CFLAGS=$(CFLAGS_BASE) $(CFLAGS_CODE) $(CFLAGS_DEFS) \
19+EXTRA_CFLAGS=$(CFLAGS_BASE) $(CFLAGS_CODE) $(CFLAGS_DEFS) \
20 $(CFLAGS_DEBUG) $(CFLAGS_SQL)
21
22 GLOB_PATTERN=guts/*.c
23@@ -47,11 +47,11 @@
24 DBOBJS=pseudo_db.o -ldl -lpthread
25 WRAPOBJS=pseudo_wrappers.o
26
27+all: libpseudo.so pseudo pseudodb pseudolog
28+
29 test: install
30 @echo "No tests yet."
31
32-all: libpseudo.so pseudo pseudodb pseudolog
33-
34 install-lib: libpseudo.so
35 mkdir -p $(DESTDIR)$(LIBDIR)
36 cp libpseudo*.so $(DESTDIR)$(LIBDIR)
37@@ -66,26 +66,29 @@
38 install: all install-lib install-bin install-data
39
40 pseudo: pseudo.o $(SHOBJS) $(DBOBJS) pseudo_server.o pseudo_ipc.o
41- $(CC) $(CFLAGS) -o pseudo \
42+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o pseudo \
43 pseudo.o pseudo_server.o pseudo_client.o pseudo_ipc.o \
44 $(DBOBJS) $(SHOBJS) $(DBLDFLAGS)
45
46 pseudolog: pseudolog.o $(SHOBJS) $(DBOBJS)
47- $(CC) $(CFLAGS) -o pseudolog pseudolog.o \
48+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o pseudolog pseudolog.o \
49 $(DBOBJS) $(SHOBJS) $(DBLDFLAGS)
50
51 pseudodb: pseudodb.o $(SHOBJS) $(DBOBJS) pseudo_ipc.o
52- $(CC) $(CFLAGS) -o pseudodb pseudodb.o \
53+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o pseudodb pseudodb.o \
54 $(DBOBJS) $(SHOBJS) $(DBLDFLAGS) pseudo_ipc.o
55
56 libpseudo.so: $(WRAPOBJS) pseudo_client.o pseudo_ipc.o $(SHOBJS)
57- $(CC) $(CFLAGS) -shared -o libpseudo.so \
58+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -shared -o libpseudo.so \
59 pseudo_client.o pseudo_ipc.o \
60 $(WRAPOBJS) $(SHOBJS) -ldl
61 if test -n "$(SUFFIX)"; then \
62 cp libpseudo.so libpseudo$(SUFFIX).so ; \
63 fi
64
65+%.o: %.c
66+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) $<
67+
68 pseudo_client.o pseudo_server.o pseudo_ipc.o: pseudo_ipc.h
69
70 pseudo_client.o: pseudo_client.h
71@@ -103,7 +106,7 @@
72
73 # no-strict-aliasing is needed for the function pointer trickery.
74 pseudo_wrappers.o: pseudo_wrappers.c
75- $(CC) -fno-strict-aliasing $(CFLAGS) -D_GNU_SOURCE -c -o pseudo_wrappers.o pseudo_wrappers.c
76+ $(CC) -fno-strict-aliasing $(CFLAGS) $(EXTRA_CFLAGS) -D_GNU_SOURCE -c -o pseudo_wrappers.o pseudo_wrappers.c
77
78 offsets32:
79 $(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 0000000000..0512a955d4
--- /dev/null
+++ b/meta/packages/pseudo/pseudo_git.bb
@@ -0,0 +1,24 @@
1DESCRIPTION = "Pseudo gives fake root capabilities to a normal user"
2SECTION = "base"
3LICENSE = "LGPL2.1"
4DEPENDS = "sqlite3"
5
6PV = "0.0+git${SRCPV}"
7PR = "r2"
8
9SRC_URI = "git://github.com/wrpseudo/pseudo.git;protocol=git \
10 file://tweakflags.patch;patch=1"
11
12S = "${WORKDIR}/git"
13
14inherit siteinfo
15
16do_configure () {
17 ${S}/configure --prefix=${prefix} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS}
18}
19
20NATIVE_INSTALL_WORKS = "1"
21
22BBCLASSEXTEND = "native"
23
24