Merge branch 'org.openembedded.dev' of git://git.openembedded.net/openembedded into...
[vuplus_openembedded] / packages / dtnrg / dtn_2.5.0.bb
1 DESCRIPTION = "Delay Tolerant Networking Package"
2 HOMEPAGE = "http://www.dtnrg.org/wiki"
3 SECTION = "libs"
4 DEPENDS = "db openssl python-native xerces-c"
5 LICENSE = "Apache"
6 SRC_URI = "http://www.dtnrg.org/docs/code/dtn_${PV}.tgz \
7            file://configure_fix.patch;patch=1"
8 FILE_PR = "r3"
9
10 inherit autotools
11
12 EXTRA_OECONF = "\
13   --with-python=${STAGING_BINDIR_NATIVE}/python \
14   --with-db=${STAGING_DIR_HOST}${layout_exec_prefix} \
15   --with-tcl=${STAGING_DIR_HOST}${layout_exec_prefix} \
16   --without-google-perftools \
17   --without-bluez \
18   --without-bonjour \
19   --with-expat=${STAGING_DIR_HOST}${layout_exec_prefix} \
20   --with-xerces-c=${STAGING_DIR_HOST}${layout_exec_prefix} \
21   --without-tclreadline \
22   --with-zlib=${STAGING_DIR_HOST}${layout_exec_prefix} \
23   --without-xsd-tool \
24   --with-db=${STAGING_DIR_HOST}${layout_exec_prefix} \
25   --enable-ecl \
26   --enable-edp \
27   --without-mysql \
28   --without-postgres \
29   --with-openssl=${STAGING_DIR_HOST}${layout_exec_prefix} \
30 "
31
32 def dtn_python_dir(d):
33         import os, bb
34         staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 )
35         if os.path.exists( "%s/python2.5" % staging_incdir ): return "python2.5"
36         if os.path.exists( "%s/python2.4" % staging_incdir ): return "python2.4"
37         if os.path.exists( "%s/python2.3" % staging_incdir ): return "python2.3"
38         raise "No Python in STAGING_INCDIR. Forgot to build python-native ?"
39
40 PYTHON_DIR = "${@dtn_python_dir(d)}"
41
42 # use this syntax once everyone has at least bitbake 1.8.9
43 #export BUILD_SYS
44 #export HOST_SYS
45
46 export BUILD_SYS:="${BUILD_SYS}"
47 export HOST_SYS:="${HOST_SYS}"
48
49 do_configure_prepend() {
50         for i in aclocal/*.ac oasys/aclocal/*.ac; do
51                 install -m 0644 $i ${STAGING_DATADIR}/aclocal/`basename $i`.m4
52         done
53         autotools_do_configure
54 }
55
56 do_install_append() {
57         cd applib/python
58         INCDIR=../.. LIBDIR=.. VERSION=${PV} python setup.py install --prefix=${D}/${prefix} --install-data=${D}/${datadir}
59 }
60
61 PACKAGES =+ "${PN}-lib"
62 FILES_${PN}-lib = "${libdir}/*.so*"
63 PACKAGES += "python-dtn"
64 DESCRIPTION_python-dtn = "Python bindings to the DTN API"
65 PR_python-dtn = "ml2"
66 FILES_python-dtn = "${libdir}/${PYTHON_DIR}"
67 RDEPENDS_python-dtn = "python-core dtn-lib"
68 FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/.debug"