make repos configurable

master
Arian Sanusi (p≡p Foundation) 5 years ago
parent 7404a757e1
commit 5af0043728
No known key found for this signature in database
GPG Key ID: 049B08FCFF6BC3B2
  1. 25
      Makefile

@ -1,3 +1,13 @@
ENGINEREV?=default
JSONREV?=default
YML2REPO?=https://pep.foundation/dev/repos/yml2
ETPANREPO?=https://github.com/fdik/libetpan
ASN1CREPO?=https://github.com/vlm/asn1c.git
ENGINEREPO?=https://pep.foundation/dev/repos/pEpEngine
JSONREPO?=https://pep.foundation/dev/repos/pEpJSONServerAdapter
ENIGREPO?=https://gitlab.com/enigmail/enigmail
include /etc/os-release
ID:=$(subst ",,$(ID))
VERSION_ID:=$(subst ",,$(VERSION_ID))
@ -6,9 +16,6 @@ ENIG_ID=$(ID)-$(VERSION_ID)-$(ID_POSTFIX)
ENIG_ID_DARWIN=macos-$(ID_POSTFIX)
ENIG_ID_WIN=windows-x86-$(shell date --rfc-3339=date)
ENGINEREV?=default
JSONREV?=default
.PHONY: all zip xpis
all: build/bin/pep-json-server build/enigmail-$(ENIG_ID).zip build/share/pEp/system.db
xpis: build/enigmail-$(ENIG_ID).xpi build/enigmail-$(ENIG_ID_DARWIN).xpi build/enigmail-$(ENIG_ID_WIN).xpi
@ -26,15 +33,15 @@ distclean: clean
.PHONY: yml2
yml2:
hg clone https://pep.foundation/dev/repos/yml2/ yml2 || ( cd yml2 ; hg pull ; hg update )
hg clone $(YML2REPO) yml2 || ( cd yml2 ; hg pull ; hg update )
build/include/libetpan.h: | build
git clone https://github.com/fdik/libetpan libetpan || ( cd libetpan ; git pull )
git clone $(ETPANREPO) libetpan || ( cd libetpan ; git pull )
cd libetpan ; ./autogen.sh --prefix="$$HOME/build"
$(MAKE) -C libetpan install
build/bin/asn1c: | build
git clone https://github.com/vlm/asn1c.git asn1c || true
git clone $(ASN1CREPO) asn1c || true
cd asn1c ; git checkout tags/v0.9.28
cd asn1c ; autoreconf -iv
cd asn1c ; ./configure --prefix="$$HOME/build"
@ -42,7 +49,7 @@ build/bin/asn1c: | build
.PHONY: pepengine
pepengine: build/include/libetpan.h | build/bin/asn1c
hg clone -r $(ENGINEREV) https://pep.foundation/dev/repos/pEpEngine/ pepengine || ( cd $@ ; hg pull ; hg update -r $(ENGINEREV) )
hg clone -r $(ENGINEREV) $(ENGINEREPO) pepengine || ( cd $@ ; hg pull ; hg update -r $(ENGINEREV) )
pepengine/%.conf: ~/common/%.conf pepengine
cp $< $@
@ -59,7 +66,7 @@ build/share/pEp/system.db: pepengine/src/libpEpEngine.so
.PHONY: pepjsonserveradapter
pepjsonserveradapter:
hg clone -r $(JSONREV) https://pep.foundation/dev/repos/pEpJSONServerAdapter pepjsonserveradapter || ( cd $@ ; hg pull ; hg update -r $(JSONREV) )
hg clone -r $(JSONREV) $(JSONREPO) pepjsonserveradapter || ( cd $@ ; hg pull ; hg update -r $(JSONREV) )
-cd pepjsonserveradapter/server ; patch -N < ~/common/pepjsonserveradapter.Makefile.conf.patch
-cd pepjsonserveradapter/server ; patch -N < ~/common/pep-json-server-adapter_cstring.patch
sed -i "s/\techo '/\techo -e '/" pepjsonserveradapter/server/Makefile
@ -76,7 +83,7 @@ build/enigmail-$(ENIG_ID).zip: build/bin/pep-json-server build/share/pEp/system.
cd build ; zip -r ~/$@ pepmda
enigmail enigmail/build/enigmail-2.0.xpi: build/enigmail-$(ENIG_ID).zip
git clone https://git.code.sf.net/p/enigmail/source enigmail || ( cd enigmail ; git pull )
git clone $(ENIGREPO) enigmail || ( cd enigmail ; git pull )
cd enigmail ; ./configure --prefix ~/build
-patch -N enigmail/util/genxpi common/enigmail.genxpi.patch
-patch -N enigmail/package/pEpAdapter.jsm common/enigmail_pEpAdapter_extensionRelative.patch

Loading…
Cancel
Save