Commit Graph

33 Commits

Author SHA1 Message Date
Andrew Bettison
1520b614f2 Specify Apple Mac OS build dependencies in more detail (fixes #127)
Specifically, need to install libtool from Homebrew; the libtool that
comes with Apple Xcode is insufficient.
2018-05-18 14:19:02 +09:30
Andrew Bettison
ca8e846264 Add iOS Framework Bundle build
The new ios/configure script performs a separate ../configure for each of
the following iOS targets:

    iPhoneOS        on armv7
    iPhoneOS        on arm64
    iPhoneSimulator on i386
    iPhoneSimulator on x86_64

The script then creates ios/Makefile that builds a static iOS Framework
Bundle suitable for inclusion in an Xcode iOS project.

Add the --xcode-sdk=SDK option to configure.ac, to support cross
compiling using Apple Xcode.  It prefixes all compile/link toolchain
commands with the "xcrun --sdk SDK" command, ie, CC, AS, LD, AR, RANLIB,
etc.

Re-structure headerfiles.mk to separate "public" from "private" headers,
because the Framework module only exposes the public ones.  Moves the
SQLITE3_AMALGAMATION definition from Makefile.in into headerfiles.mk.

Update INSTALL.md and add a technical document for Apple iOS.

This enables development of Serval DNA within the context of an Xcode
iOS project using the standard edit-make-test cycle: after modifying a
Serval DNA source file, "cd ios; make" will recompile the changed file
for all the target architectures and update the Framework Bundle.
Rebuilding the Xcode project will then incorporate the changes, which
can be tested immediately.
2018-03-06 15:29:29 +10:30
Andrew Bettison
a79156c4d0 Add Swift daemon API, use in 'servaldswift'
The daemon API is built as a Swift module called ServalDNA.

The new CliContext class allows easy implementation of CLI output using
Swift code.  The new CliContextFile subclass is the obvious first
implementation, equivalent to cli_stdio.c.  The 'servaldswift'
executable now uses CliContextFile to print its CLI output to standard
output.

The new delegated log output support constructs each log line in a
buffer and prints it by calling the delegate's 'print' function at
end-of-line.  The 'servaldswift' executable now provides a log output
delegate in Swift that simply prints to standard error, replacing
log_output_console.o, which is omitted from its link.
2018-03-06 15:29:17 +10:30
Andrew Bettison
3ffa4b10af Add Swift keyring client API with tests
Add a swift-client-api subdirectory containing a Swift source package
and a Makefile.in that compiles it into the "ServalClient" Swift module
using the Swift package manager.  The Swift API contains the following
classes:

- ServalKeyring provides the operations: add, remove, set, list
- AbstractId and its specialisation SubscriberId, already in near-final
  form, are data types for SID and the like
- ServalRestfulClient (internal) uses an HTTP client to access the
  Serval DNA RESTful interface

Improve the REST /keyring/set operation to only alter the DID or Name if
the corresponding query parameter is supplied.  Modify the internal
keyring_set_did() function to only assign the DID or Name if the
corresponding parameter is not a null pointer.

The configure script ensures that the Swift build target version is
10.10 or later when compiling for Mac OS-X, so that the package manager
will succeed.

Add autoconf macros for the Swift package manager.
2018-03-06 15:29:17 +10:30
Andrew Bettison
f2eb2bf9ab Add Swift 3/4 'servaldswift' executable
If the Swift 3 or Swift 4 compiler is present or passed to the configure
script in the SWIFTC variable, then the Makefile will compile a Swift
'servaldswift' executable to ensure that the module map links correctly
into a stand-alone Swift program.

Use the gold linker if supported, to avoid relocation errors on symbols
produced by Swift when linking dynamic libraries.
2018-03-06 15:29:17 +10:30
Andrew Bettison
f4ef1e59c7 Require Java version 1.6 or later 2017-09-27 14:49:13 +09:30
Andrew Bettison
46cfb81967 Configure and build libsodium from subtree
The libsodium source code is now embedded in the Serval DNA sourcecode
as a git subtree, so configure.ac and Makefile.in now recurse into it as
part of the Serval DNA build.

This simplifies the build instructions and eliminates all external
dependencies on libsodium development files and operating system
packages, returning Serval DNA to a self-contained component whose only
external dependencies are standard system libraries.

Remove the build-libsodium.sh script, as it is no longer needed.
2017-09-27 14:49:08 +09:30
Andrew Bettison
192fefd7f2 Update INSTALL.md to describe built artifacts 2016-10-19 09:47:48 +10:30
Andrew Bettison
29a771e315 Overhaul Makefile.in
Changed the built libraries and updated INSTALL.md accordingly:
- the 'servaldwrap' executable is now built
- libservald.[a,so] now contains the full daemon executable
- libservalclient.[a,so] contains the client library
- libserval.a is no longer built

Building the 'servaldwrap' executable is a step towards ensuring that
the libservald.so library can be linked and executed, without requiring
an Android build to reveal any failure.

Added the SOURCE_PREFIX variable that allows the make to be invoked from
within any current working directory, not just the serval-dna
repository's root directory.

Fixed the serval_version.o target to invoke the version_string.sh
script with the --repository=DIR option, so that the build will work
even if the current working directory is not within the serval-dna
repository.

Re-ordered and added some comments for clarity, and added some missing
.PHONY declarations.
2016-10-13 16:23:09 +10:30
Andrew Bettison
4b2060554e Rename configure.in to configure.ac 2016-10-13 16:05:58 +10:30
Andrew Bettison
0bf7c5ccea Update copyright messages in documentation 2016-09-21 18:31:31 +09:30
Andrew Bettison
9a5ee2eded Update INSTALL.md dates and compiler versions 2016-09-19 13:46:51 +09:30
Andrew Bettison
11b091a33b Update doco for OS-X installation and development 2016-09-12 15:09:46 +09:30
Andrew Bettison
c45e92b731 Fix OS-X build with libsodium
Add a new 'build-libsodium.sh' script and instructions in
doc/Development.md.  Update the configure.in script to check for
libsodium headers and library, and print helpful messages if not
present.
2016-09-12 15:09:41 +09:30
Andrew Bettison
c3a94a7ac3 Formalise dependency on libsodium
./configure now fails if libsodium is not present.
Added libsodium to the list of dependencies in INSTALL.md.
Add a Debian apt-get command to doc/Development.md.
2016-09-05 17:04:22 +09:30
Jeremy Lakeman
e15e332072 Swap from included nacl to host libsodium 2016-05-09 10:32:04 +09:30
Andrew Bettison
0361b99ca7 Fix OSX bugs in test framework
Use GNU grep, sed and awk instead of BSD variants.  Developers will have
to install these using a package manager like homebrew.  Updated the
INSTALL.md and doc/Development.md tech docs with instructions.
2016-01-27 00:24:43 +10:30
Andrew Bettison
87ab136d0f Improve build instructions
Autoconf version 2.70 has never been tested; include automake 1.5.
2016-01-18 12:07:11 +10:30
Andrew Bettison
e51189a1c8 Remove aclocal.m4 from version control
Henceforward, aclocal.m4 will be generated by the 'autoreconf' command.

The 'autoreconf -f -i' command may now emit a warning "Unsupported
attribute section, the test may fail" on some systems, but it will still
generate the proper aclocal.m4 and ./configure files.  To suppress this
warning, simply invoke autoreconf with '-I m4' argument:

    autoreconf -f -i -I m4

The INSTALL.md has been updated accordingly, and a new 'Notes for
Developers' technical document added, explaining the use of aclocal and
autoreconf, and documenting that these warning messages are of no
concern.
2016-01-11 18:02:26 +10:30
Andrew Bettison
3d537f9645 Improve test framework: test coverage support 2014-06-06 14:47:54 +09:30
Andrew Bettison
24f3d50fd4 Add text of CC BY 4.0 license
Add LICENSE-DOCUMENTATION.md (commons deed) and CC-BY-4.0.md (legal
text)

All docs link to local commons deed instead of CC BY 4.0 web page
2014-05-21 17:37:23 +09:30
Andrew Bettison
45f39cfacd Add copyright notices and CC-BY license to README.md and INSTALL.md 2014-05-20 14:52:57 +09:30
Jeremy Lakeman
1228df2b70 Remove bitrot related to voip testing 2014-04-07 15:48:10 +09:30
Andrew Bettison
734368608e Update README, INSTALL and OpenWRT instructions
Instructions for releasing Serval DNA for OpenWRT
2014-03-05 15:26:28 +10:30
Andrew Bettison
319031b79d OpenWRT build instructions 2014-03-03 15:21:53 +10:30
Jeremy Lakeman
3a87656032 Add explicit list of test framework dependencies 2014-01-06 13:11:54 +10:30
Andrew Bettison
cc40cf3447 Clean up a few details in INSTALL and README 2013-05-29 14:15:40 +09:30
Andrew Bettison
07d6a12343 Improve README and INSTALL files 2013-05-29 13:22:12 +09:30
Andrew Bettison
628fba6208 Improve README.md
Add VoMP to list of new technologies

Add links to new Wiki Technology Roadmap pages for key technologies

Simplify contributor agreement PDF download links

Add link to SPI page on Wiki
2013-05-16 18:04:47 +09:30
Andrew Bettison
25e5acc68c Fix quoting typos 2013-03-05 17:19:23 -08:00
Andrew Bettison
fdd3623352 Update INSTALL instructions
Instructions for Solaris

Use tests/all script to run all tests

Correct spelling of Erik's last name
2013-03-06 11:43:44 +10:30
Andrew Bettison
a1cc415a4f Move information from BUILD.txt into INSTALL.md
Also remove out of date TODO file, no longer relevant.
2012-10-30 14:49:50 +10:30
Andrew Bettison
a3cdf3c942 Add README.md and INSTALL.md
Also capture some documentation of Serval Infrastructure services.
2012-10-29 16:43:27 +10:30