mirror of
https://github.com/YunoHost-Apps/pgadmin_ynh.git
synced 2024-09-03 19:56:38 +02:00
Add specific prebuild package for stretch/jessie
This commit is contained in:
parent
e903ea3457
commit
8cfaa20d9e
3 changed files with 35 additions and 19 deletions
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-3.0/pgadmin_4-3.0-bin1_armv7l.tar.gz
|
||||
SOURCE_SUM=21b39847e258349831eaee51cf6aaa6e529a475ae39a4d5927fc8ddc0bffcd8b
|
||||
SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-3.0/pgadmin_4-3.0-jessie-bin1_armv7l.tar.gz
|
||||
SOURCE_SUM=23268e987ff162a487f87a46b88b5573d8c6b1859a8d1ec14e35c7f73e485752
|
||||
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
||||
# default: sha256
|
||||
SOURCE_SUM_PRG=sha256sum
|
11
conf/armv7_stretch.src
Normal file
11
conf/armv7_stretch.src
Normal file
|
@ -0,0 +1,11 @@
|
|||
SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-3.0/pgadmin_4-3.0-stretch-bin1_armv7l.tar.gz
|
||||
SOURCE_SUM=6e1d1e686a2ad98576257d9a25075bbc8d7eba87cf4ce378631ba028a7082a61
|
||||
# (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
|
|
@ -16,7 +16,7 @@ app_sub_version=$(echo $APP_VERSION | cut -d'-' -f2)
|
|||
#=================================================
|
||||
|
||||
install_dependance() {
|
||||
ynh_install_app_dependencies python-pip build-essential python-dev python-virtualenv postgresql uwsgi uwsgi-plugin-python expect
|
||||
ynh_install_app_dependencies python-pip build-essential python-dev python-virtualenv postgresql uwsgi uwsgi-plugin-python expect
|
||||
}
|
||||
|
||||
psql_create_admin() {
|
||||
|
@ -32,21 +32,26 @@ setup_dir() {
|
|||
}
|
||||
|
||||
install_source() {
|
||||
if [ -n "$(uname -m | grep arm)" ]
|
||||
then
|
||||
ynh_setup_source $final_path/ "armv7"
|
||||
else
|
||||
if [ -n "$(uname -m | grep arm)" ]
|
||||
then
|
||||
if [ "$(lsb_release --codename --short)" != "jessie" ]
|
||||
then
|
||||
ynh_setup_source $final_path/ "armv7_jessie"
|
||||
else
|
||||
ynh_setup_source $final_path/ "armv7_stretch"
|
||||
fi
|
||||
else
|
||||
# Install virtualenv if it don't exist
|
||||
test -e $final_path/bin || virtualenv -p python2.7 $final_path
|
||||
test -e $final_path/bin || virtualenv -p python2.7 $final_path
|
||||
|
||||
# Install pgadmin in virtualenv
|
||||
PS1=""
|
||||
cp ../conf/virtualenv_activate $final_path/bin/activate
|
||||
source $final_path/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install --upgrade https://ftp.postgresql.org/pub/pgadmin/pgadmin$app_main_version/v$app_sub_version/pip/pgadmin${APP_VERSION}-py2.py3-none-any.whl
|
||||
deactivate
|
||||
fi
|
||||
PS1=""
|
||||
cp ../conf/virtualenv_activate $final_path/bin/activate
|
||||
source $final_path/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install --upgrade https://ftp.postgresql.org/pub/pgadmin/pgadmin$app_main_version/v$app_sub_version/pip/pgadmin${APP_VERSION}-py2.py3-none-any.whl
|
||||
deactivate
|
||||
fi
|
||||
}
|
||||
|
||||
set_permission() {
|
||||
|
@ -64,9 +69,9 @@ config_pgadmin() {
|
|||
}
|
||||
|
||||
config_uwsgi() {
|
||||
ynh_replace_string __USER__ $pgadmin_user ../conf/pgadmin.ini
|
||||
ynh_replace_string __FINALPATH__ $final_path ../conf/pgadmin.ini
|
||||
ynh_replace_string __PATH__ $path_url ../conf/pgadmin.ini
|
||||
cp ../conf/pgadmin.ini /etc/uwsgi/apps-enabled/
|
||||
ynh_replace_string __USER__ $pgadmin_user ../conf/pgadmin.ini
|
||||
ynh_replace_string __FINALPATH__ $final_path ../conf/pgadmin.ini
|
||||
ynh_replace_string __PATH__ $path_url ../conf/pgadmin.ini
|
||||
cp ../conf/pgadmin.ini /etc/uwsgi/apps-enabled/
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue