1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/synapse_ynh.git synced 2024-09-03 20:26:38 +02:00

Improve source setup

This commit is contained in:
Josué Tille 2018-02-06 11:04:54 +01:00
parent 686eb7adaa
commit 257a25f591
3 changed files with 8 additions and 4 deletions

2
conf/python_source.src Normal file
View file

@ -0,0 +1,2 @@
SOURCE_URL=https://github.com/matrix-org/synapse/archive/v0.26.0.tar.gz
SOURCE_SUM=234dd5fa44895e855d11fbf50de9184d057977b10b296f594d2c3758f693eff3

View file

@ -1,3 +0,0 @@
#!/bin/bash
src_sum="234dd5fa44895e855d11fbf50de9184d057977b10b296f594d2c3758f693eff3"

View file

@ -158,7 +158,12 @@ else
pip install --upgrade pip pip install --upgrade pip
pip install --upgrade setuptools pip install --upgrade setuptools
pip install --upgrade cffi ndg-httpsclient psycopg2 lxml pip install --upgrade cffi ndg-httpsclient psycopg2 lxml
wget -nv -O synapse_source.tar.gz https://github.com/matrix-org/synapse/archive/v$upstream_version.tar.gz
# Download and check the checksum for the synapse source
src_url=$(grep 'SOURCE_URL=' "$YNH_CWD/../conf/python_source.src" | cut -d= -f2-)
src_sum=$(grep 'SOURCE_SUM=' "$YNH_CWD/../conf/python_source.src" | cut -d= -f2-)
wget -nv -O synapse_source.tar.gz "$src_url"
echo "${src_sum} synapse_source.tar.gz" | sha256sum -c --status \ echo "${src_sum} synapse_source.tar.gz" | sha256sum -c --status \
|| ynh_die "Corrupt source" || ynh_die "Corrupt source"
pip install --upgrade synapse_source.tar.gz pip install --upgrade synapse_source.tar.gz