1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/osticket_ynh.git synced 2024-09-03 19:56:17 +02:00

Merge pull request #34 from YunoHost-Apps/bullseye

Bullseye
This commit is contained in:
yalh76 2022-01-27 19:24:49 +01:00 committed by GitHub
commit c764db6045
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 60 deletions

2
.gitignore vendored
View file

@ -1,2 +0,0 @@
*~
*.sw[op]

View file

@ -4,9 +4,7 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
YNH_PHP_VERSION="7.3" pkg_dependencies="curl php${YNH_PHP_VERSION}-gd php-php-gettext php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-apcu php${YNH_PHP_VERSION}-curl"
pkg_dependencies="curl php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-gettext php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-apcu php${YNH_PHP_VERSION}-curl"
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS

View file

@ -102,6 +102,8 @@ ynh_setup_source --dest_dir="$final_path/include/plugins/build/microsoft-teams"
ynh_setup_source --dest_dir="$final_path/include/plugins/build/slack" --source_id="plugin-slack" ynh_setup_source --dest_dir="$final_path/include/plugins/build/slack" --source_id="plugin-slack"
ynh_setup_source --dest_dir="$final_path/include/plugins/build/preventautoscroll" --source_id="plugin-preventautoscroll" ynh_setup_source --dest_dir="$final_path/include/plugins/build/preventautoscroll" --source_id="plugin-preventautoscroll"
rsync -a "../conf/i18n" "$final_path/include/."
chmod 750 "$final_path" chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
@ -147,40 +149,33 @@ chown $app:www-data "$final_path/include/ost-config.php"
#================================================= #=================================================
ynh_script_progression --message="Building plugins..." ynh_script_progression --message="Building plugins..."
mkdir -p "$final_path/include/plugins/build/.config/composer" ynh_exec_as $app mkdir -p "$final_path/include/plugins/build/.config/composer"
export COMPOSER_HOME="$final_path/include/plugins/build/.config/composer" export COMPOSER_HOME="$final_path/include/plugins/build/.config/composer"
pushd "$final_path/include/plugins/build" pushd "$final_path/include/plugins/build"
php${phpversion} make.php hydrate ynh_exec_warn_less ynh_exec_as $app php$phpversion make.php hydrate
php${phpversion} -dphar.readonly=0 make.php build auth-cas ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build auth-cas
php${phpversion} -dphar.readonly=0 make.php build auth-ldap ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build auth-ldap
php${phpversion} -dphar.readonly=0 make.php build auth-oauth ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build auth-oauth
php${phpversion} -dphar.readonly=0 make.php build auth-passthru ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build auth-passthru
php${phpversion} -dphar.readonly=0 make.php build storage-fs ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build storage-fs
php${phpversion} -dphar.readonly=0 make.php build storage-s3 ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build storage-s3
php${phpversion} -dphar.readonly=0 make.php build archiver ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build archiver
php${phpversion} -dphar.readonly=0 make.php build attachment_preview ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build attachment_preview
php${phpversion} -dphar.readonly=0 make.php build autocloser ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build autocloser
php${phpversion} -dphar.readonly=0 make.php build fetch-note ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build fetch-note
php${phpversion} -dphar.readonly=0 make.php build field-radiobuttons ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build field-radiobuttons
php${phpversion} -dphar.readonly=0 make.php build fwd-rewriter ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build fwd-rewriter
php${phpversion} -dphar.readonly=0 make.php build mattermost ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build mattermost
php${phpversion} -dphar.readonly=0 make.php build mentioner ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build mentioner
php${phpversion} -dphar.readonly=0 make.php build microsoft-teams ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build microsoft-teams
php${phpversion} -dphar.readonly=0 make.php build slack ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build slack
php${phpversion} -dphar.readonly=0 make.php build preventautoscroll ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build preventautoscroll
cp *.phar $final_path/include/plugins/. ynh_exec_warn_less ynh_exec_as $app cp *.phar $final_path/include/plugins/.
popd popd
ynh_secure_remove --file="$final_path/include/plugins/build" ynh_secure_remove --file="$final_path/include/plugins/build"
#=================================================
# INSTALL LANGUAGE
#=================================================
ynh_script_progression --message="Installing language..."
rsync -a "../conf/i18n" "$final_path/include/."
#================================================= #=================================================
# SETUP APPLICATION WITH CURL # SETUP APPLICATION WITH CURL
#================================================= #=================================================

View file

@ -84,7 +84,7 @@ then
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" ynh_setup_source --dest_dir="$final_path"
ynh_setup_source --dest_dir="$final_path/include/plugins/build" --source_id="core-plugins" ynh_setup_source --dest_dir="$final_path/include/plugins/build" --source_id="core-plugins"
ynh_replace_string --match_string="net_ldap2" --replace_string="Net_LDAP2" --target_file="$final_path/include/plugins/build/auth-ldap/plugin.php" ynh_replace_string --match_string="net_ldap2" --replace_string="Net_LDAP2" --target_file="$final_path/include/plugins/build/auth-ldap/plugin.php"
ynh_setup_source --dest_dir="$final_path/include/plugins/build/archiver" --source_id="plugin-archiver" ynh_setup_source --dest_dir="$final_path/include/plugins/build/archiver" --source_id="plugin-archiver"
ynh_setup_source --dest_dir="$final_path/include/plugins/build/attachment_preview" --source_id="plugin-attachment_preview" ynh_setup_source --dest_dir="$final_path/include/plugins/build/attachment_preview" --source_id="plugin-attachment_preview"
ynh_setup_source --dest_dir="$final_path/include/plugins/build/autocloser" --source_id="plugin-autocloser" ynh_setup_source --dest_dir="$final_path/include/plugins/build/autocloser" --source_id="plugin-autocloser"
@ -102,6 +102,8 @@ ynh_replace_string --match_string="net_ldap2" --replace_string="Net_LDAP2" --tar
ynh_secure_remove --file="$tmpdir" ynh_secure_remove --file="$tmpdir"
fi fi
rsync -a "../conf/i18n" "$final_path/include/."
chmod 750 "$final_path" chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
@ -149,40 +151,33 @@ ynh_script_progression --message="Building plugins..."
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
mkdir -p "$final_path/include/plugins/build/.config/composer" ynh_exec_as $app mkdir -p "$final_path/include/plugins/build/.config/composer"
COMPOSER_HOME="$final_path/include/plugins/build/.config/composer" COMPOSER_HOME="$final_path/include/plugins/build/.config/composer"
pushd "$final_path/include/plugins/build" pushd "$final_path/include/plugins/build"
php${phpversion} make.php hydrate ynh_exec_warn_less ynh_exec_as $app php$phpversion make.php hydrate
php${phpversion} -dphar.readonly=0 make.php build auth-cas ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build auth-cas
php${phpversion} -dphar.readonly=0 make.php build auth-ldap ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build auth-ldap
php${phpversion} -dphar.readonly=0 make.php build auth-oauth ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build auth-oauth
php${phpversion} -dphar.readonly=0 make.php build auth-passthru ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build auth-passthru
php${phpversion} -dphar.readonly=0 make.php build storage-fs ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build storage-fs
php${phpversion} -dphar.readonly=0 make.php build storage-s3 ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build storage-s3
php${phpversion} -dphar.readonly=0 make.php build archiver ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build archiver
php${phpversion} -dphar.readonly=0 make.php build attachment_preview ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build attachment_preview
php${phpversion} -dphar.readonly=0 make.php build autocloser ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build autocloser
php${phpversion} -dphar.readonly=0 make.php build fetch-note ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build fetch-note
php${phpversion} -dphar.readonly=0 make.php build field-radiobuttons ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build field-radiobuttons
php${phpversion} -dphar.readonly=0 make.php build fwd-rewriter ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build fwd-rewriter
php${phpversion} -dphar.readonly=0 make.php build mattermost ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build mattermost
php${phpversion} -dphar.readonly=0 make.php build mentioner ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build mentioner
php${phpversion} -dphar.readonly=0 make.php build microsoft-teams ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build microsoft-teams
php${phpversion} -dphar.readonly=0 make.php build slack ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build slack
php${phpversion} -dphar.readonly=0 make.php build preventautoscroll ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build preventautoscroll
cp -f *.phar $final_path/include/plugins/. ynh_exec_warn_less ynh_exec_as $app cp -f *.phar $final_path/include/plugins/.
popd popd
ynh_secure_remove --file="$final_path/include/plugins/build" ynh_secure_remove --file="$final_path/include/plugins/build"
ynh_secure_remove --file="$final_path/setup" ynh_secure_remove --file="$final_path/setup"
fi fi
#=================================================
# UPGRADE LANGUAGE
#=================================================
ynh_script_progression --message="UPGRADING language..."
rsync -a "../conf/i18n" "$final_path/include/."
#================================================= #=================================================
# SET THE CRON FILE # SET THE CRON FILE
#================================================= #=================================================