ari's enigmail/pEp-on-linux build system this _also_ lives in https://pep.foundation/dev/repos/enigmailpEp/ in linux
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
4.1KB

  1. include /etc/os-release
  2. ID:=$(subst ",,$(ID))
  3. VERSION_ID:=$(subst ",,$(VERSION_ID))
  4. ID_POSTFIX=$(shell uname -m)-$(shell date --rfc-3339=date)
  5. ENIG_ID=$(ID)-$(VERSION_ID)-$(ID_POSTFIX)
  6. ENIG_ID_DARWIN=macos-$(ID_POSTFIX)
  7. ENIG_ID_WIN=windows-x86-$(shell date --rfc-3339=date)
  8. .PHONY: all foreign
  9. all: build/bin/pep-json-server build/enigmail-$(ENIG_ID).xpi build/share/pEp/system.db
  10. foreign: build/enigmail-$(ENIG_ID_DARWIN).xpi build/enigmail-$(ENIG_ID_WIN).xpi
  11. build build/lib:
  12. mkdir -p build/lib
  13. ln -sf lib build/lib64
  14. .PHONY: clean distclean
  15. clean:
  16. rm -rf $(HOME)/build
  17. distclean: clean
  18. rm -rf yml2 libetpan asn1c pepengine libevent pepjsonserveradapter enigmail
  19. yml2: build
  20. hg clone https://cacert.pep.foundation/dev/repos/yml2/ yml2 || ( cd yml2 ; hg pull ; hg update )
  21. build/include/libetpan.h: | build
  22. git clone https://github.com/fdik/libetpan libetpan || ( cd libetpan ; git pull )
  23. cd libetpan ; ./autogen.sh --prefix="$$HOME/build"
  24. $(MAKE) -C libetpan install
  25. # touch $@
  26. build/bin/asn1c: | build
  27. git clone https://github.com/vlm/asn1c.git asn1c || true
  28. cd asn1c ; git checkout tags/v0.9.28
  29. cd asn1c ; autoreconf -iv
  30. cd asn1c ; ./configure --prefix="$$HOME/build"
  31. $(MAKE) -C asn1c install
  32. pepengine: build/include/libetpan.h build/bin/asn1c
  33. hg clone https://cacert.pep.foundation/dev/repos/pEpEngine/ pepengine || ( cd pepengine ; hg pull ; hg update )
  34. # pepengine/Makefile.conf: pepengine
  35. # cd pepengine ; hg revert Makefile.conf
  36. # patch $@ common/engine_Makefile.conf.patch
  37. pepengine/local.conf: | pepengine
  38. cp /build/common/local.conf $@
  39. .PHONY: engine-make engine-install
  40. engine-make: pepengine/local.conf | yml2 build/include/libetpan.h build/bin/asn1c pepengine
  41. make -C pepengine all db #test
  42. engine-install: engine-make build
  43. make -C pepengine install
  44. libevent/made: | build
  45. git clone https://github.com/libevent/libevent.git $(dir $@) -b release-2.1.8-stable || true
  46. mkdir -p $(dir $@)/
  47. cd $(dir $@)/ ; cmake .. ; $(MAKE) DESTDIR=$$HOME install
  48. touch libevent/made
  49. build/bin/pep-json-server: engine-install
  50. hg clone -r 302 https://cacert.pep.foundation/dev/repos/pEpJSONServerAdapter pepjsonserveradapter || ( cd pepjsonserveradapter ; hg revert --all ; hg pull ; hg update -r 302)
  51. sed -i "s/\techo '/\techo -e '/" pepjsonserveradapter/server/Makefile
  52. cd pepjsonserveradapter/server ; patch -N < ~/common/pepjsonserveradapter.Makefile.conf.patch || true
  53. cd pepjsonserveradapter/server ; patch -N < ~/common/pep-json-server-adapter_cstring.patch
  54. $(MAKE) -C pepjsonserveradapter/server prefix-config.cc
  55. sed -i 's/^-e //g' pepjsonserveradapter/server/prefix-config.cc
  56. make -C pepjsonserveradapter/server all
  57. cp pepjsonserveradapter/server/pep-json-server $@
  58. build/enigmail-$(ENIG_ID).xpi: build/bin/pep-json-server build/share/pEp/system.db
  59. git clone https://git.code.sf.net/p/enigmail/source enigmail || true # ( cd enigmail ; git pull )
  60. cd enigmail ; git checkout caece124642980eed67ae917dbca33926bed84ef
  61. -rm -rf enigmail/build/dist/pepmda
  62. bash -e common/prepareEnigmailTree.sh enigmail build/bin/pep-json-server build/share/pEp/system.db `which gpg` common/vanilla
  63. cd enigmail ; git checkout -- util/genxpi package/pEpAdapter.jsm package/pEp.jsm package/enigmail.js
  64. patch -N enigmail/util/genxpi common/enigmail.genxpi.patch
  65. patch -N enigmail/package/pEpAdapter.jsm common/enigmail_pEpAdapter.jsm.patch
  66. patch -N enigmail/package/pEp.jsm common/enigmail_pEp.jsm.patch
  67. patch -N enigmail/package/enigmail.js common/enigmail_enigmail.js.patch
  68. cd enigmail ; ./configure --prefix ~/build
  69. $(MAKE) -C enigmail
  70. cp enigmail/build/enigmail-2.0.xpi $@
  71. build/enigmail-$(ENIG_ID_DARWIN).xpi: MDA_ZIP=pepmda-darwin-x86_64.zip
  72. build/enigmail-$(ENIG_ID_WIN).xpi: MDA_ZIP=pepmda-winnt-x86.zip
  73. build/enigmail-$(ENIG_ID_DARWIN).xpi build/enigmail-$(ENIG_ID_WIN).xpi: $(MDA_ZIP) #pepmda-darwin-x86_64.zip pepmda-winnt-x86.zip build/enigmail-$(ENIG_ID).xpi
  74. rm -rf enigmail/build/dist/pepmda
  75. unzip $(MDA_ZIP) -d enigmail/build/dist
  76. $(MAKE) -C enigmail
  77. cp enigmail/build/enigmail-2.0.xpi $@
  78. build/share/pEp/system.db: build pepengine/local.conf
  79. mkdir -p $(dir $@)
  80. cp pepengine/db/system.db $@