BUILDING 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. Installing
  2. ----------
  3. To build and install spiped, run:
  4. # make BINDIR=/path/to/target/directory install
  5. To install man pages, add MAN1DIR=/path/to/man.1/directory to the command
  6. line (e.g., MAN1DIR=/usr/local/man/man1 on FreeBSD).
  7. Spiped should build and run on any IEEE Std 1003.1 (POSIX) compliant
  8. system which
  9. 1. Includes the Software Development Utilities option,
  10. 2. Has OpenSSL available via -lcrypto and #include <openssl/foo>, and
  11. 3. Provides /dev/urandom.
  12. Platform-specific notes
  13. -----------------------
  14. - On OS X, the version of OpenSSL included with the operating
  15. system is outdated (0.9.8) and deprecated, and it is recommended
  16. that spiped be built with an updated version of OpenSSL. On OS X
  17. 10.11 "El Capitan", OpenSSL was removed entirely. After installing a newer
  18. version of OpenSSL, use
  19. CFLAGS="-I /path/to/openssl/headers"
  20. LDADD_EXTRA="-L /path/to/openssl/lib"
  21. to build spiped.
  22. Note that spiped will still build (on pre-10.11) if you set these options
  23. wrong: If you see
  24. warning: 'AES_set_encrypt_key' is deprecated
  25. during the build then spiped is still using the outdated version
  26. of OpenSSL from OS X.
  27. - On Cygwin the following command must be run before building spiped in order
  28. order to work around a bug in Cygwin's C library:
  29. sed -i.orig s/-D_POSIX_C_SOURCE=200809L// */Makefile
  30. Without this command, spiped will still build but it will crash.
  31. - On some platforms (Solaris, maybe others), additional compiler and/or linker
  32. options are required to find OpenSSL or system libraries; these can be
  33. provided by adding e.g., CFLAGS="-I/path/to/openssl/headers" (compiler option)
  34. or LDADD_EXTRA="-L/usr/sfw/lib -lsocket -lnsl" (linker option) to the make
  35. command line.
  36. - On some platforms (OpenBSD prior to 5.4, and possibly others) you will need to
  37. add #include <sys/types.h> at the start of
  38. lib/dnsthread/dnsthread.c
  39. libcperciva/util/sock_util.c
  40. proto/proto_conn.c
  41. spipe/main.c
  42. spipe/pushbits.c
  43. due to a POSIX-compliance bug on those platforms.
  44. - On some platforms (mostly Linuxes) it is possible to install OpenSSL libraries
  45. without the associated header files; the header files are usually in packages
  46. named "openssl-devel", "libssl-dev", or similar.
  47. - If your OS provides random bytes via some mechanism other than /dev/urandom,
  48. please make local changes to lib/util/entropy.c and notify the author.
  49. If spiped fails to build or run for other reasons, please notify the
  50. author.
  51. Updating build code and releasing
  52. ---------------------------------
  53. The POSIX-compatible Makefiles are generated via `make Makefiles` from the
  54. included (far more readable) BSD Makefiles. To run this target, you will
  55. need to have a BSD `make(1)` utility; NetBSD's `make(1)` is available for many
  56. operating systems as `bmake`.
  57. Release tarballs are generated via `make VERSION=x.y.z publish`, subject
  58. to the same caveat of needing a BSD-compatible make.