diff --git a/README.md b/README.md index a98ae90..95261ac 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ If you don't have a dh.pem file in `/etc/yunohost/certs/YOUR DOMAIN/dh.pem` you You could built it by this cmd : `sudo openssl dhparam -out /etc/yunohost/certs/YOUR DOMAIN/dh.pem 2048 > /dev/null` After that you can install it without problem. -The install use the python virtualenvironement. Everything is built on the install and some package a compiled so it could take a long time if the processor is slow. +The package use a prebuild python virtualenvironnement. The binary are taken from this repos : https://github.com/Josue-T/synapse_python_build +The script to build the binary is also available. ### Package update package diff --git a/conf/armv7.src b/conf/armv7.src new file mode 100644 index 0000000..5e3feda --- /dev/null +++ b/conf/armv7.src @@ -0,0 +1,12 @@ + +SOURCE_URL=https://github.com/Josue-T/synapse_python_build/releases/download/v0.24.1/matrix-synapse_0.24.1-bin1_armv7l.tar.gz +SOURCE_SUM=20b6b3b195210aa778a017796a310b4327d8ecbd1b423214e83603aae319957c +# (Optional) Program to check the integrity (sha256sum, md5sum...) +# default: sha256 +SOURCE_SUM_PRG=sha256sum +# (Optional) Archive format +# default: tar.gz +SOURCE_FORMAT=tar.gz +# (Optional) Put false if sources are directly in the archive root +# default: true +SOURCE_IN_SUBDIR=true diff --git a/scripts/_common.sh b/scripts/_common.sh index cc15aab..d8496af 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,7 +8,7 @@ synapse_db_user="matrix_synapse" synapse_version="0.24.1" install_dependances() { - ynh_install_app_dependencies coturn build-essential python2.7-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libpq-dev postgresql + ynh_install_app_dependencies coturn build-essential python2.7-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libxml2-dev libxslt1-dev python-lxml libjpeg-dev libpq-dev postgresql pip install --upgrade pip pip install --upgrade virtualenv } @@ -25,15 +25,23 @@ setup_dir() { } install_source() { - # Install synapse in virtualenv - PS1="" - cp ../conf/virtualenv_activate $final_path/bin/activate - source $final_path/bin/activate - pip install --upgrade pip - pip install --upgrade setuptools - pip install --upgrade cffi ndg-httpsclient psycopg2 lxml - pip install --upgrade https://github.com/matrix-org/synapse/tarball/master - deactivate + if [ -n "$(uname -m | grep arm)" ] + then + ynh_setup_source $final_path/ "armv7" + else + # Install virtualenv if it don't exist + test -e $final_path/bin || virtualenv -p python2.7 $final_path + + # Install synapse in virtualenv + PS1="" + cp ../conf/virtualenv_activate $final_path/bin/activate + source $final_path/bin/activate + pip install --upgrade pip + pip install --upgrade setuptools + pip install --upgrade cffi ndg-httpsclient psycopg2 lxml + pip install --upgrade https://github.com/matrix-org/synapse/tarball/master + deactivate + fi # Set permission chown $synapse_user:root -R $final_path