1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hubzilla_ynh.git synced 2024-09-03 19:26:21 +02:00

Merge pull request #65 from YunoHost-Apps/testing

App updated and using git now
This commit is contained in:
anmol26s 2021-02-21 05:43:00 +05:30 committed by GitHub
commit ee8df74ec5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 100 additions and 27 deletions

View file

@ -12,7 +12,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
## Overview ## Overview
[Hubzilla](https://hub.libranet.de/directory?f=&global=1&pubforums=1) is a social networking platform built with control of your privacy at center stage. Your online communications can be as public as you wish or as private as you require. Private conversations, private photos, private videos. Your media isn't hidden behind an obscure URL which can be guessed, it is protected by state-of-the-art cross-domain authentication. What this all means for you: **less drama**. [Hubzilla](https://hub.libranet.de/directory?f=&global=1&pubforums=1) is a social networking platform built with control of your privacy at center stage. Your online communications can be as public as you wish or as private as you require. Private conversations, private photos, private videos. Your media isn't hidden behind an obscure URL which can be guessed, it is protected by state-of-the-art cross-domain authentication. What this all means for you: **less drama**.
**Shipped version:** 5.2.1 **Shipped version:** 5.2.2
## Screenshots ## Screenshots

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://framagit.org/hubzilla/core/-/archive/5.2.1/core-5.2.1.tar.gz SOURCE_URL=https://framagit.org/hubzilla/core/-/archive/5.2.2/core-5.2.2.tar.gz
SOURCE_SUM=0fe17e7ce47e02e90159ad4be9b2343d55f7aabdcc2bd996cb88e205aa6cc986 SOURCE_SUM=827068a332f464d3ebd49531943169f1eef3e1b23102b9a9ddfb52e44b9138d8
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR= SOURCE_IN_SUBDIR=

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://framagit.org/hubzilla/addons/-/archive/5.2.1/addons-5.2.1.tar.gz SOURCE_URL=https://framagit.org/hubzilla/addons/-/archive/5.2.2/addons-5.2.2.tar.gz
SOURCE_SUM=fbe5268f7e764edfcf2137362762cf3b0e29bf74dbae23b76fb1e418597cd74f SOURCE_SUM=074559f51107f27d6eb4806c77ede213ca77b608a9c2c5b870138f587d8776ca
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR= SOURCE_IN_SUBDIR=

View file

@ -8,7 +8,7 @@
}, },
"url": "https://zotlabs.org/page/hubzilla/hubzilla-project", "url": "https://zotlabs.org/page/hubzilla/hubzilla-project",
"license": "MIT", "license": "MIT",
"version": "5.2.1~ynh1", "version": "5.2.2~ynh1",
"maintainer": { "maintainer": {
"name": "Anmol Sharma" "name": "Anmol Sharma"
}, },

View file

@ -76,18 +76,48 @@ fi
# 1 - Hubzilla # 1 - Hubzilla
ynh_script_progression --message="Setting up Hubzilla source files..." ynh_script_progression --message="Setting up Hubzilla source files..."
git clone https://framagit.org/hubzilla/core.git "$final_path"
ynh_app_setting_set --app=$app --key=final_path --value=$final_path ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# 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"
# 2 - Hubzilla Addons # 2 - Hubzilla Addons
# Make addon Directory and unpack the Hubzilla addons to this directory # Make addon Directory and unpack the Hubzilla addons to this directory
ynh_script_progression --message="Create addon directory inside Hubzilla root folder..." ynh_script_progression --message="Create addon directory inside Hubzilla root folder..."
mkdir $final_path/addon # mkdir $final_path/addon
ynh_script_progression --message="Setting up Hubzilla addons source files..." # ynh_script_progression --message="Setting up Hubzilla addons source files..."
ynh_setup_source --dest_dir="$final_path/addon" --source_id="app_addons" # ynh_setup_source --dest_dir="$final_path/addon" --source_id="app_addons"
pushd "$final_path"
mkdir -p extend/addon/hzaddons
mkdir addon
git clone https://framagit.org/hubzilla/addons.git $final_path/extend/addon/hzaddons
filelist=(`ls extend/addon/hzaddons`)
cd addon
for a in "${filelist[@]}" ; do
base=`basename $a`
if [ $base = '.git' ]; then
#echo 'ignoring git'
continue;
fi
if [ ! -d ../extend/addon/hzaddons/$base ]; then
#echo $a 'not a directory'
continue;
fi
if [ -x $base ]; then
#echo $base 'file exists'
continue;
fi
echo linking $base
ln -s ../extend/addon/hzaddons/$base $base
done
popd
# 3 - Some extra folders # 3 - Some extra folders
ynh_script_progression --message="Creating smarty3 folder for personal data..." ynh_script_progression --message="Creating smarty3 folder for personal data..."

View file

@ -56,15 +56,7 @@ ynh_abort_if_errors
#================================================= #=================================================
ynh_print_info "Upgrading source files..." ynh_print_info "Upgrading source files..."
# Create a temporary directory
tmpdir="$(ynh_smart_mktemp 6000)"
# Backup the config file in the temp dir
cp -a "$final_path/.htconfig.php" "$tmpdir/.htconfig.php"
cp -a "$final_path/store" "$tmpdir/store"
cp -a "$final_path/php.log" "$tmpdir/php.log"
# Remove the app directory securely
ynh_secure_remove "$final_path"
# If final_path doesn't exist, create it # If final_path doesn't exist, create it
if [ -z "$final_path" ]; then if [ -z "$final_path" ]; then
@ -79,16 +71,67 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Upgrading source files..." ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src if [ `cd $final_path && git rev-parse --is-inside-work-tree` ]; then
ynh_setup_source --dest_dir="$final_path" pushd "$final_path"
git pull
cd extend/addon/hzaddons
git pull
cd ../../..
filelist=(`ls extend/addon/hzaddons`)
cd addon
for a in "${filelist[@]}" ; do
base=`basename $a`
if [ $base = '.git' ]; then
#echo 'ignoring git'
continue;
fi
if [ ! -d ../extend/addon/hzaddons/$base ]; then
#echo $a 'not a directory'
continue;
fi
if [ -x $base ]; then
#echo $base 'file exists'
continue;
fi
echo linking $base
ln -s ../extend/addon/hzaddons/$base $base
done
for x in `ls` ; do
if [ -L "$x" ] && ! [ -e "$x" ]; then
echo "removing dead symlink $x" ;
rm -- "$x";
fi;
done
popd
chmod -R 777 $final_path/store
else
# Create a temporary directory
tmpdir="$(ynh_smart_mktemp 6000)"
# Backup the config file in the temp dir
cp -a "$final_path/.htconfig.php" "$tmpdir/.htconfig.php"
cp -a "$final_path/store" "$tmpdir/store"
cp -a "$final_path/php.log" "$tmpdir/php.log"
# Remove the app directory securely
ynh_secure_remove "$final_path"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path"
cp -a "$tmpdir/store" "${final_path}"
cp -a "$tmpdir/.htconfig.php" "${final_path}"
cp -a "$tmpdir/php.log" "${final_path}"
ynh_secure_remove "$tmpdir"
chmod -R 777 $final_path/store
mkdir $final_path/addon
ynh_setup_source --dest_dir="$final_path/addon" --source_id="app_addons"
fi
cp -a "$tmpdir/store" "${final_path}"
cp -a "$tmpdir/.htconfig.php" "${final_path}"
cp -a "$tmpdir/php.log" "${final_path}"
ynh_secure_remove "$tmpdir"
chmod -R 777 $final_path/store
mkdir $final_path/addon
ynh_setup_source --dest_dir="$final_path/addon" --source_id="app_addons"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION