aboutsummaryrefslogtreecommitdiff
path: root/gnunet-build
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amatus.name>2014-07-02 21:21:06 -0500
committerDavid Barksdale <amatus@amatus.name>2014-07-02 21:21:06 -0500
commitd4c28f06a431cf54acc915772820eb6abed2954d (patch)
tree98f277dec9f82448d6b7c4e33c1b6b8c851a043a /gnunet-build
parentb14cd83d76dffc24fe20e31c083a729c418d3509 (diff)
Reorganize gnunet build script
Diffstat (limited to 'gnunet-build')
-rw-r--r--gnunet-build/packages/gnunet/gnunet/Buildrules212
1 files changed, 108 insertions, 104 deletions
diff --git a/gnunet-build/packages/gnunet/gnunet/Buildrules b/gnunet-build/packages/gnunet/gnunet/Buildrules
index 7723331..cd107d0 100644
--- a/gnunet-build/packages/gnunet/gnunet/Buildrules
+++ b/gnunet-build/packages/gnunet/gnunet/Buildrules
@@ -32,48 +32,87 @@ pkg_compile() {
emmake make LDFLAGS="${LDFLAGS} -Wc,--ignore-dynamic-linking"
mkdir -p "${D}/var/lib/gnunet/js"
#
- # Transport
+ # libgnunetblock plugins
+ #
+ ./libtool --tag=CC --mode=link \
+ emcc -fno-strict-aliasing -Wall \
+ -O2 \
+ -s DLOPEN_SUPPORT=1 -s SIDE_MODULE=1 \
+ -s EXPORTED_FUNCTIONS='["_libgnunet_plugin_block_dht_init"]' \
+ "-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \
+ -o "${S}/src/dht/libgnunet_plugin_block_dht.js" \
+ "${S}/src/dht/plugin_block_dht.lo"
+ mv "${TEMP_DIR}/imports" libgnunet_plugin_block_dht.imports
+ ./libtool --tag=CC --mode=link \
+ emcc -fno-strict-aliasing -Wall \
+ -O2 \
+ -s DLOPEN_SUPPORT=1 -s SIDE_MODULE=1 \
+ -s EXPORTED_FUNCTIONS='["_libgnunet_plugin_block_fs_init"]' \
+ "-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \
+ -o "${S}/src/fs/libgnunet_plugin_block_fs.js" \
+ "${S}/src/fs/plugin_block_fs.lo"
+ mv "${TEMP_DIR}/imports" libgnunet_plugin_block_fs.imports
+ cat libgnunet_plugin_block_dht.imports \
+ libgnunet_plugin_block_fs.imports \
+ > libgnunet_plugin_block.imports
+ cp "${S}/src/dht/libgnunet_plugin_block_dht.js" \
+ "${S}/src/fs/libgnunet_plugin_block_fs.js" \
+ "${D}/var/lib/gnunet/js/"
+ #
+ # libdatacache plugin
#
./libtool --tag=CC --mode=link \
emcc -fno-strict-aliasing -Wall \
-O2 \
-s DLOPEN_SUPPORT=1 -s SIDE_MODULE=1 \
-s EXPORTED_FUNCTIONS='[
- "_libgnunet_plugin_transport_http_client_init",
+ "_libgnunet_plugin_datacache_heap_init"
]' \
"-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \
- -o "${S}/src/transport/libgnunet_plugin_transport_http_client.js" \
- "${S}/src/transport/libgnunet_plugin_transport_http_client_la-plugin_transport_http_client_emscripten.lo" \
- "${S}/src/transport/libgnunet_plugin_transport_http_client_la-plugin_transport_http_common.lo"
+ -o "${S}/src/datacache/libgnunet_plugin_datacache_heap.js" \
+ "${S}/src/datacache/plugin_datacache_heap.lo"
+ mv "${TEMP_DIR}/imports" libgnunet_plugin_datacache_heap.imports
+ cp "${S}/src/datacache/libgnunet_plugin_datacache_heap.js" \
+ "${D}/var/lib/gnunet/js/"
+ #
+ # Datastore
+ #
+ ./libtool --tag=CC --mode=link \
+ emcc -fno-strict-aliasing -Wall \
+ -O2 \
+ -s DLOPEN_SUPPORT=1 -s SIDE_MODULE=1 \
+ -s EXPORTED_FUNCTIONS='[
+ "_libgnunet_plugin_datastore_heap_init"
+ ]' \
+ "-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \
+ -o "${S}/src/datastore/libgnunet_plugin_datastore_heap.js" \
+ "${S}/src/datastore/plugin_datastore_heap.lo"
( echo '['
sed -e 's/.*/"&",/' < "${TEMP_DIR}/imports"
echo '"_GNUNET_log_setup",'
- echo '"_main"]' ) > transport.exports
+ echo '"_GNUNET_STRINGS_fancy_size_to_bytes",'
+ echo '"_GNUNET_xstrdup_",'
+ echo '"_main"]' ) > datastore.exports
./libtool --tag=CC --mode=link \
emcc -fno-strict-aliasing -Wall \
-O2 \
-s DLOPEN_SUPPORT=1 -s MAIN_MODULE=1 \
- -s EXPORTED_FUNCTIONS=@transport.exports \
+ -s EXPORTED_FUNCTIONS=@datastore.exports \
"-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \
- -o "${S}/src/transport/gnunet-service-transport.js" \
-"${S}/src/transport/gnunet_service_transport-gnunet-service-transport"*.o \
- "${S}/src/transport/libgnunettransport.la" \
- "${S}/src/ats/libgnunetats.la" \
- "${S}/src/hello/libgnunethello.la" \
- "${S}/src/peerinfo/libgnunetpeerinfo.la" \
+ -o "${S}/src/datastore/gnunet-service-datastore.js" \
+ "${S}/src/datastore/gnunet-service-datastore.o" \
"${S}/src/statistics/libgnunetstatistics.la" \
"${S}/src/util/libgnunetutil.la" \
"${SYSROOT}/usr/lib/libgcrypt.la" \
"${SYSROOT}/usr/lib/libgpg-error.la" \
- --js-library "${BUILDROOT}/src/js/client.js" \
--js-library "${BUILDROOT}/src/js/configuration.js" \
--js-library "${BUILDROOT}/src/js/plugin.js" \
--js-library "${BUILDROOT}/src/js/scheduler.js" \
--js-library "${BUILDROOT}/src/js/server.js" \
--js-library "${BUILDROOT}/src/js/service.js" \
--pre-js "${BUILDROOT}/src/js/pre.js"
- cp "${S}/src/transport/.libs/gnunet-service-transport.js" \
- "${S}/src/transport/libgnunet_plugin_transport_http_client.js" \
+ cp "${S}/src/datastore/.libs/gnunet-service-datastore.js" \
+ "${S}/src/datastore/libgnunet_plugin_datastore_heap.js" \
"${D}/var/lib/gnunet/js/"
#
# Automatic Transport Selection
@@ -120,30 +159,48 @@ pkg_compile() {
"${S}/src/ats/libgnunet_plugin_ats_proportional.js" \
"${D}/var/lib/gnunet/js/"
#
- # Topology
+ # Transport
#
./libtool --tag=CC --mode=link \
emcc -fno-strict-aliasing -Wall \
- -s EXPORTED_FUNCTIONS='["_main", "_GNUNET_log_setup"]' \
+ -O2 \
+ -s DLOPEN_SUPPORT=1 -s SIDE_MODULE=1 \
+ -s EXPORTED_FUNCTIONS='[
+ "_libgnunet_plugin_transport_http_client_init",
+ ]' \
"-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \
- -o "${S}/src/topology/gnunet-daemon-topology.js" \
- "${S}/src/topology/gnunet-daemon-topology.o" \
- "${S}/src/topology/libgnunetfriends.la" \
- "${S}/src/core/libgnunetcore.la" \
- "${S}/src/peerinfo/libgnunetpeerinfo.la" \
- "${S}/src/statistics/libgnunetstatistics.la" \
+ -o "${S}/src/transport/libgnunet_plugin_transport_http_client.js" \
+ "${S}/src/transport/libgnunet_plugin_transport_http_client_la-plugin_transport_http_client_emscripten.lo" \
+ "${S}/src/transport/libgnunet_plugin_transport_http_client_la-plugin_transport_http_common.lo"
+ ( echo '['
+ sed -e 's/.*/"&",/' < "${TEMP_DIR}/imports"
+ echo '"_GNUNET_log_setup",'
+ echo '"_main"]' ) > transport.exports
+ ./libtool --tag=CC --mode=link \
+ emcc -fno-strict-aliasing -Wall \
+ -O2 \
+ -s DLOPEN_SUPPORT=1 -s MAIN_MODULE=1 \
+ -s EXPORTED_FUNCTIONS=@transport.exports \
+ "-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \
+ -o "${S}/src/transport/gnunet-service-transport.js" \
+"${S}/src/transport/gnunet_service_transport-gnunet-service-transport"*.o \
"${S}/src/transport/libgnunettransport.la" \
+ "${S}/src/ats/libgnunetats.la" \
"${S}/src/hello/libgnunethello.la" \
+ "${S}/src/peerinfo/libgnunetpeerinfo.la" \
+ "${S}/src/statistics/libgnunetstatistics.la" \
"${S}/src/util/libgnunetutil.la" \
"${SYSROOT}/usr/lib/libgcrypt.la" \
"${SYSROOT}/usr/lib/libgpg-error.la" \
--js-library "${BUILDROOT}/src/js/client.js" \
--js-library "${BUILDROOT}/src/js/configuration.js" \
- --js-library "${BUILDROOT}/src/js/program.js" \
+ --js-library "${BUILDROOT}/src/js/plugin.js" \
--js-library "${BUILDROOT}/src/js/scheduler.js" \
--js-library "${BUILDROOT}/src/js/server.js" \
+ --js-library "${BUILDROOT}/src/js/service.js" \
--pre-js "${BUILDROOT}/src/js/pre.js"
- cp "${S}/src/topology/.libs/gnunet-daemon-topology.js" \
+ cp "${S}/src/transport/.libs/gnunet-service-transport.js" \
+ "${S}/src/transport/libgnunet_plugin_transport_http_client.js" \
"${D}/var/lib/gnunet/js/"
#
# Core
@@ -198,46 +255,8 @@ pkg_compile() {
cp "${S}/src/nse/.libs/gnunet-service-nse.js" \
"${D}/var/lib/gnunet/js/"
#
- # libgnunetblock plugins
- #
- ./libtool --tag=CC --mode=link \
- emcc -fno-strict-aliasing -Wall \
- -O2 \
- -s DLOPEN_SUPPORT=1 -s SIDE_MODULE=1 \
- -s EXPORTED_FUNCTIONS='["_libgnunet_plugin_block_dht_init"]' \
- "-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \
- -o "${S}/src/dht/libgnunet_plugin_block_dht.js" \
- "${S}/src/dht/plugin_block_dht.lo"
- mv "${TEMP_DIR}/imports" libgnunet_plugin_block_dht.imports
- ./libtool --tag=CC --mode=link \
- emcc -fno-strict-aliasing -Wall \
- -O2 \
- -s DLOPEN_SUPPORT=1 -s SIDE_MODULE=1 \
- -s EXPORTED_FUNCTIONS='["_libgnunet_plugin_block_fs_init"]' \
- "-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \
- -o "${S}/src/fs/libgnunet_plugin_block_fs.js" \
- "${S}/src/fs/plugin_block_fs.lo"
- mv "${TEMP_DIR}/imports" libgnunet_plugin_block_fs.imports
- cat libgnunet_plugin_block_dht.imports \
- libgnunet_plugin_block_fs.imports \
- > libgnunet_plugin_block.imports
- cp "${S}/src/dht/libgnunet_plugin_block_dht.js" \
- "${S}/src/fs/libgnunet_plugin_block_fs.js" \
- "${D}/var/lib/gnunet/js/"
- #
# Distributed Hash Table
#
- ./libtool --tag=CC --mode=link \
- emcc -fno-strict-aliasing -Wall \
- -O2 \
- -s DLOPEN_SUPPORT=1 -s SIDE_MODULE=1 \
- -s EXPORTED_FUNCTIONS='[
- "_libgnunet_plugin_datacache_heap_init"
- ]' \
- "-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \
- -o "${S}/src/datacache/libgnunet_plugin_datacache_heap.js" \
- "${S}/src/datacache/plugin_datacache_heap.lo"
- mv "${TEMP_DIR}/imports" libgnunet_plugin_datacache_heap.imports
( echo '['
sed -e 's/.*/"&",/' < libgnunet_plugin_block.imports
sed -e 's/.*/"&",/' < libgnunet_plugin_datacache_heap.imports
@@ -274,84 +293,69 @@ pkg_compile() {
--js-library "${BUILDROOT}/src/js/service.js" \
--pre-js "${BUILDROOT}/src/js/pre.js"
cp "${S}/src/dht/.libs/gnunet-service-dht.js" \
- "${S}/src/datacache/libgnunet_plugin_datacache_heap.js" \
"${D}/var/lib/gnunet/js/"
#
- # Cadet
+ # Topology
#
- ( echo '['
- sed -e 's/.*/"&",/' < libgnunet_plugin_block.imports
- echo '"_GNUNET_log_setup",'
- echo '"_GNUNET_STRINGS_fancy_time_to_relative",'
- echo '"_GNUNET_xstrdup_",'
- echo '"_main"]' ) > cadet.exports
./libtool --tag=CC --mode=link \
emcc -fno-strict-aliasing -Wall \
- -O2 \
- -s DLOPEN_SUPPORT=1 -s MAIN_MODULE=1 \
- -s EXPORTED_FUNCTIONS=@cadet.exports \
+ -s EXPORTED_FUNCTIONS='["_main", "_GNUNET_log_setup"]' \
"-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \
- -o "${S}/src/cadet/gnunet-service-cadet.js" \
- "${S}/src/cadet/gnunet_service_cadet"*.o \
- "${S}/src/block/libgnunetblock.la" \
+ -o "${S}/src/topology/gnunet-daemon-topology.js" \
+ "${S}/src/topology/gnunet-daemon-topology.o" \
+ "${S}/src/topology/libgnunetfriends.la" \
"${S}/src/core/libgnunetcore.la" \
- "${S}/src/dht/libgnunetdht.la" \
- "${S}/src/hello/libgnunethello.la" \
"${S}/src/peerinfo/libgnunetpeerinfo.la" \
"${S}/src/statistics/libgnunetstatistics.la" \
"${S}/src/transport/libgnunettransport.la" \
+ "${S}/src/hello/libgnunethello.la" \
"${S}/src/util/libgnunetutil.la" \
"${SYSROOT}/usr/lib/libgcrypt.la" \
"${SYSROOT}/usr/lib/libgpg-error.la" \
- -lz \
--js-library "${BUILDROOT}/src/js/client.js" \
--js-library "${BUILDROOT}/src/js/configuration.js" \
- --js-library "${BUILDROOT}/src/js/plugin.js" \
+ --js-library "${BUILDROOT}/src/js/program.js" \
--js-library "${BUILDROOT}/src/js/scheduler.js" \
--js-library "${BUILDROOT}/src/js/server.js" \
- --js-library "${BUILDROOT}/src/js/service.js" \
--pre-js "${BUILDROOT}/src/js/pre.js"
- cp "${S}/src/cadet/.libs/gnunet-service-cadet.js" \
+ cp "${S}/src/topology/.libs/gnunet-daemon-topology.js" \
"${D}/var/lib/gnunet/js/"
#
- # Datastore
+ # Cadet
#
- ./libtool --tag=CC --mode=link \
- emcc -fno-strict-aliasing -Wall \
- -O2 \
- -s DLOPEN_SUPPORT=1 -s SIDE_MODULE=1 \
- -s EXPORTED_FUNCTIONS='[
- "_libgnunet_plugin_datastore_heap_init"
- ]' \
- "-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \
- -o "${S}/src/datastore/libgnunet_plugin_datastore_heap.js" \
- "${S}/src/datastore/plugin_datastore_heap.lo"
( echo '['
- sed -e 's/.*/"&",/' < "${TEMP_DIR}/imports"
+ sed -e 's/.*/"&",/' < libgnunet_plugin_block.imports
echo '"_GNUNET_log_setup",'
- echo '"_GNUNET_STRINGS_fancy_size_to_bytes",'
- echo '"_GNUNET_xstrdup_",'
- echo '"_main"]' ) > datastore.exports
+ echo '"_GNUNET_STRINGS_fancy_time_to_relative",'
+ echo '"_GNUNET_xstrdup_",'
+ echo '"_main"]' ) > cadet.exports
./libtool --tag=CC --mode=link \
emcc -fno-strict-aliasing -Wall \
-O2 \
-s DLOPEN_SUPPORT=1 -s MAIN_MODULE=1 \
- -s EXPORTED_FUNCTIONS=@datastore.exports \
+ -s EXPORTED_FUNCTIONS=@cadet.exports \
"-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \
- -o "${S}/src/datastore/gnunet-service-datastore.js" \
- "${S}/src/datastore/gnunet-service-datastore.o" \
+ -o "${S}/src/cadet/gnunet-service-cadet.js" \
+ "${S}/src/cadet/gnunet_service_cadet"*.o \
+ "${S}/src/block/libgnunetblock.la" \
+ "${S}/src/core/libgnunetcore.la" \
+ "${S}/src/dht/libgnunetdht.la" \
+ "${S}/src/hello/libgnunethello.la" \
+ "${S}/src/peerinfo/libgnunetpeerinfo.la" \
"${S}/src/statistics/libgnunetstatistics.la" \
+ "${S}/src/transport/libgnunettransport.la" \
"${S}/src/util/libgnunetutil.la" \
"${SYSROOT}/usr/lib/libgcrypt.la" \
"${SYSROOT}/usr/lib/libgpg-error.la" \
+ -lz \
+ --js-library "${BUILDROOT}/src/js/client.js" \
--js-library "${BUILDROOT}/src/js/configuration.js" \
--js-library "${BUILDROOT}/src/js/plugin.js" \
--js-library "${BUILDROOT}/src/js/scheduler.js" \
--js-library "${BUILDROOT}/src/js/server.js" \
--js-library "${BUILDROOT}/src/js/service.js" \
--pre-js "${BUILDROOT}/src/js/pre.js"
- cp "${S}/src/datastore/.libs/gnunet-service-datastore.js" \
- "${S}/src/datastore/libgnunet_plugin_datastore_heap.js" \
+ cp "${S}/src/cadet/.libs/gnunet-service-cadet.js" \
"${D}/var/lib/gnunet/js/"
#
# File Sharing