[Sugar-devel] [PATCH] Support isolated start
Aleksey Lim
alsroot at member.fsf.org
Fri Oct 22 12:02:26 EDT 2010
Running process is based on injection (how 0install works) of evironment
variables to final application process, e.g., via PYTHONPATH. Patch will let
bazaar.sugarlabs.org build sugar packages, also runnning from git cloned
directories will be supported (i.e., without jhbuild).
---
.gitignore | 2 ++
src/sugar-presence-service.in | 4 +++-
sweets.recipe | 27 +++++++++++++++++++++++++++
3 files changed, 32 insertions(+), 1 deletions(-)
create mode 100644 sweets.recipe
diff --git a/.gitignore b/.gitignore
index 89e441e..7b18edf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,8 @@ Makefile.in
*.loT
.*.sw?
*.service
+*.tar.*
+.sweets
# Absolute
diff --git a/src/sugar-presence-service.in b/src/sugar-presence-service.in
index ff8d66a..96c9757 100644
--- a/src/sugar-presence-service.in
+++ b/src/sugar-presence-service.in
@@ -16,8 +16,10 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import sys
+from os.path import join, dirname
-sys.path.append('@prefix@/share/sugar-presence-service')
+path = join(dirname(__file__), '..', 'share', 'sugar-presence-service')
+sys.path.append(path)
import main
diff --git a/sweets.recipe b/sweets.recipe
new file mode 100644
index 0000000..bde72a5
--- /dev/null
+++ b/sweets.recipe
@@ -0,0 +1,27 @@
+[DEFAULT]
+sweet = sugar-presence-service
+summary = Interfaces between Sugar and Telepathy Connection Managers
+license = LGPLv2.1+
+homepage = http://git.sugarlabs.org/projects/sugar-presence-service
+
+version = 0.90.1
+stability = testing
+
+[Component]
+requires = sugar-toolkit; telepathy-python
+ telepathy-salut >= 0.4; telepathy-gabble >= 0.10
+binding = PATH bin; XDG_DATA_DIRS share
+arch = any
+
+[Build]
+requires = make
+cleanup = make distclean; ./autogen.sh
+configure = ./configure --prefix=%(PREFIX)s
+make = make
+install = make DESTDIR=%(DESTDIR)s install
+implement = %(install)s &&
+ rm -rf %(DESTDIR)s/%(PREFIX)s/share/sugar-presence-service &&
+ ln -s %(BUILDDIR)s/src %(DESTDIR)s/%(PREFIX)s/share/sugar-presence-service
+
+[Source]
+exec = ./autogen.sh && make dist
--
1.7.2.2
More information about the Sugar-devel
mailing list