1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/limesurvey_ynh.git synced 2024-09-03 19:36:32 +02:00

[fix] Use github link for source file

- Fix https://github.com/YunoHost-Apps/limesurvey_ynh/issues/17
- Here get a specific commit (specific command action for plugin)
This commit is contained in:
Denis Chenu 2017-02-18 20:10:20 +01:00
parent 3a5de2c49d
commit d065dbbb32
4 changed files with 22 additions and 22 deletions

View file

@ -1,3 +1,3 @@
SOURCE_URL=https://www.limesurvey.org/stable-release?download=1994:limesurvey2622%20170203targz
SOURCE_SUM=04aef224292ebacbfdf5c92cedc94de2f5900688bde33481a8908b15023df933
SOURCE_FILE=limesurvey2.62.2+170203.tar.gz
SOURCE_URL=https://github.com/LimeSurvey/LimeSurvey/archive/a46075a10b6244c850ee11dcf283d38bdd7d8ad5.tar.gz
SOURCE_SUM=b06778cd6747e4106953810d5aefe9f12d968a3910ce48159bcbb2fe5a61d486
SOURCE_FILE=limesurvey_2.6.2.1.tar.gz

View file

@ -2,7 +2,7 @@
"name": "LimeSurvey",
"id": "limesurvey",
"packaging_format": 1,
"version": "2.62.2",
"version": "2.62.2.1",
"description": {
"en": "LimeSurvey is used to create advanced poll.",
"fr": "LimeSurvey est un outil de création et diffusion de sondage en ligne."

View file

@ -7,14 +7,14 @@ ynh_check_var () {
test -n "$1" || ynh_die "$2"
}
ynh_exit_properly () {
ynh_exit_properly () {
exit_code=$?
if [ "$exit_code" -eq 0 ]; then
exit 0
exit 0
fi
trap '' EXIT
set +eu
echo -e "\e[91m \e[1m"
echo -e "\e[91m \e[1m"
err "$app script has encountered an error."
if type -t CLEAN_SETUP > /dev/null; then
@ -89,7 +89,7 @@ ynh_local_path_available () {
fi
}
# Save listed var in YunoHost app settings
# Save listed var in YunoHost app settings
# usage: ynh_save_args VARNAME1 [VARNAME2 [...]]
ynh_save_args () {
for var in $@;
@ -113,7 +113,7 @@ ynh_mysql_generate_db () {
export db_pwd=$(ynh_string_random) # Generate a random password
ynh_check_var "$db_pwd" "db_pwd empty"
ynh_mysql_create_db "$db_name" "$db_user" "$db_pwd" # Create the database
ynh_app_setting_set $app mysqlpwd $db_pwd # Store the password in the app's config
@ -161,9 +161,9 @@ ynh_setup_source () {
fi
echo "$SOURCE_SUM $SOURCE_FILE" |$SUM_PRG -c --status \
|| ynh_die "Corrupt source"
sudo mkdir -p "$DEST"
sudo chown $AS_USER: "$DEST"
sudo chown $AS_USER: "$DEST"
if [ "$(echo ${SOURCE_FILE##*.})" == "gz" ]; then
ynh_exec_as "$AS_USER" tar xf $SOURCE_FILE -C "$DEST" --strip-components 1
elif [ "$(echo ${SOURCE_FILE##*.})" == "bz2" ]; then
@ -171,18 +171,18 @@ ynh_setup_source () {
elif [ "$(echo ${SOURCE_FILE##*.})" == "zip" ]; then
mkdir -p "/tmp/$SOURCE_FILE"
ynh_exec_as "$AS_USER" unzip -q $SOURCE_FILE -d "/tmp/$SOURCE_FILE"
ynh_exec_as "$AS_USER" mv "/tmp/$SOURCE_FILE"/./. "$DEST"
ynh_exec_as "$AS_USER" mv "/tmp/$SOURCE_FILE"/./. "$DEST"
rmdir "$/tmp/$SOURCE_FILE"
else
false
fi
# Apply patches
if [ -f ${PKG_DIR}/patches/$SOURCE_ID-*.patch ]; then
(cd "$DEST" \
&& for p in ${PKG_DIR}/patches/$SOURCE_ID-*.patch; do \
ynh_exec_as "$AS_USER" patch -p1 < $p; done) \
|| ynh_die "Unable to apply patches"
|| ynh_die "Unable to apply patches"
fi
@ -324,13 +324,13 @@ Homepage: {{ project_url }}
Standards-Version: 3.9.2
Package: {{ dep_app }}-ynh-deps
Version: {{ version }}
Version: {{ version }}
Depends: {{ dependencies }}
Architecture: all
Description: meta package for {{ app }} (YunoHost app) dependencies
This meta-package is only responsible of installing its dependencies.
EOF
ynh_configure app-ynh-deps.control ./$dep_app-ynh-deps.control
ynh_package_install_from_equivs ./$dep_app-ynh-deps.control \
|| ynh_die "Unable to install dependencies"
@ -387,11 +387,11 @@ ynh_configure_php_fpm () {
finalphpconf=/etc/php5/fpm/pool.d/$app.conf
ynh_configure php-fpm.conf /etc/php5/fpm/pool.d/$app.conf
sudo chown root: $finalphpconf
finalphpini=/etc/php5/fpm/conf.d/20-$app.ini
sudo cp ../conf/php-fpm.ini $finalphpini
sudo chown root: $finalphpini
sudo service php5-fpm reload
}

View file

@ -34,10 +34,10 @@ ynh_mysql_generate_db "$user" "$app"
ynh_system_user_create "$user" "$local_path"
ynh_setup_source "$local_path" "$user"
ynh_configure config.php "$local_path/application/config/config.php"
# Fill LimeSurvey database
# Fill LimeSurvey database @todo replace by command action from limesurvey
sed "s/\`prefix_/\`$prefix/g" $local_path/installer/sql/create-mysql.sql > ./structure.sql
mysql -u $db_user -p$db_pwd $db_user < ./structure.sql
ynh_configure data.sql ./data.sql
@ -53,10 +53,10 @@ set -x
ynh_set_default_perm $local_path
sudo chmod -R u+w $local_path/tmp
sudo chmod -R u+w $local_path/upload
sudo chmod -R u+w $local_path/application/config/
#~ sudo chmod -R u+w $local_path/application/config/
sudo yunohost app addaccess $app -u $admin
ynh_sso_access "/index.php?r=admin,/index.php?r=plugins,/scripts"
ynh_sso_access "/index.php?r=admin"
ynh_configure_php_fpm
ynh_configure_nginx