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.

96 lines
3.7KB

  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. ENGINEREV?=default
  9. JSONREV?=default
  10. .PHONY: all zip xpis
  11. all: build/bin/pep-json-server build/enigmail-$(ENIG_ID).zip build/share/pEp/system.db
  12. xpis: build/enigmail-$(ENIG_ID).xpi build/enigmail-$(ENIG_ID_DARWIN).xpi build/enigmail-$(ENIG_ID_WIN).xpi
  13. build build/lib:
  14. mkdir -p build/lib
  15. ln -sf lib build/lib64
  16. .PHONY: clean distclean
  17. clean:
  18. rm -rf $(HOME)/build
  19. distclean: clean
  20. rm -rf yml2 libetpan asn1c pepengine libevent pepjsonserveradapter enigmail
  21. .PHONY: yml2
  22. yml2:
  23. hg clone https://pep.foundation/dev/repos/yml2/ yml2 || ( cd yml2 ; hg pull ; hg update )
  24. build/include/libetpan.h: | build
  25. git clone https://github.com/fdik/libetpan libetpan || ( cd libetpan ; git pull )
  26. cd libetpan ; ./autogen.sh --prefix="$$HOME/build"
  27. $(MAKE) -C libetpan install
  28. build/bin/asn1c: | build
  29. git clone https://github.com/vlm/asn1c.git asn1c || true
  30. cd asn1c ; git checkout tags/v0.9.28
  31. cd asn1c ; autoreconf -iv
  32. cd asn1c ; ./configure --prefix="$$HOME/build"
  33. $(MAKE) -C asn1c install
  34. .PHONY: pepengine
  35. pepengine: build/include/libetpan.h | build/bin/asn1c
  36. hg clone -r $(ENGINEREV) https://pep.foundation/dev/repos/pEpEngine/ pepengine || ( cd $@ ; hg pull ; hg update -r $(ENGINEREV) )
  37. pepengine/local.conf: ~/common/local.conf pepengine
  38. cp $< $@
  39. pepengine/src/libpEpEngine.so: pepengine/local.conf yml2 build/include/libetpan.h build/bin/asn1c pepengine
  40. $(MAKE) -C pepengine all db #test
  41. build/lib/libpEpEngine.so: pepengine/src/libpEpEngine.so
  42. $(MAKE) -C pepengine install
  43. build/share/pEp/system.db: pepengine/src/libpEpEngine.so
  44. mkdir -p $(dir $@)
  45. cp pepengine/db/system.db $@
  46. .PHONY: pepjsonserveradapter
  47. pepjsonserveradapter:
  48. hg clone -r $(JSONREV) https://pep.foundation/dev/repos/pEpJSONServerAdapter pepjsonserveradapter || ( cd $@ ; hg pull ; hg update -r $(JSONREV) )
  49. -cd pepjsonserveradapter/server ; patch -N < ~/common/pepjsonserveradapter.Makefile.conf.patch
  50. -cd pepjsonserveradapter/server ; patch -N < ~/common/pep-json-server-adapter_cstring.patch
  51. sed -i "s/\techo '/\techo -e '/" pepjsonserveradapter/server/Makefile
  52. build/bin/pep-json-server: build/lib/libpEpEngine.so pepjsonserveradapter
  53. $(MAKE) -C pepjsonserveradapter/server prefix-config.cc
  54. sed -i 's/^-e //g' pepjsonserveradapter/server/prefix-config.cc
  55. $(MAKE) -C pepjsonserveradapter/server all
  56. cp pepjsonserveradapter/server/pep-json-server $@
  57. build/enigmail-$(ENIG_ID).zip: build/bin/pep-json-server build/share/pEp/system.db
  58. mkdir -p build/pepmda
  59. bash -e common/prepareEnigmailTree.sh build/pepmda build/bin/pep-json-server build/share/pEp/system.db `which gpg` common/vanilla
  60. cd build ; zip -r ~/$@ pepmda
  61. enigmail enigmail/build/enigmail-2.0.xpi: build/enigmail-$(ENIG_ID).zip
  62. git clone https://git.code.sf.net/p/enigmail/source enigmail || ( cd enigmail ; git pull )
  63. cd enigmail ; ./configure --prefix ~/build
  64. -patch -N enigmail/util/genxpi common/enigmail.genxpi.patch
  65. -patch -N enigmail/package/pEpAdapter.jsm common/enigmail_pEpAdapter_extensionRelative.patch
  66. $(MAKE) -C enigmail
  67. build/enigmail-$(ENIG_ID_DARWIN).xpi: MDA_ZIP=pepmda-darwin-x86_64.zip
  68. build/enigmail-$(ENIG_ID_WIN).xpi: MDA_ZIP=pepmda-winnt-x86.zip
  69. build/enigmail-$(ENIG_ID).xpi: MDA_ZIP=build/enigmail-$(ENIG_ID).zip
  70. build/enigmail-$(ENIG_ID_DARWIN).xpi build/enigmail-$(ENIG_ID_WIN).xpi build/enigmail-$(ENIG_ID).xpi: $(MDA_ZIP) enigmail/build/enigmail-2.0.xpi
  71. -rm -rf enigmail/build/dist/pepmda
  72. unzip $(MDA_ZIP) -d enigmail/build/dist
  73. $(MAKE) -C enigmail
  74. cp enigmail/build/enigmail-2.0.xpi $@
  75. serve:
  76. common/serve.py