1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/friendica_ynh.git synced 2024-09-03 18:36:14 +02:00

Git auto update

This commit is contained in:
Amo 2021-07-02 01:44:37 +05:30
parent bccd3aacf1
commit 0377dac6bb
7 changed files with 172 additions and 66 deletions

View file

@ -1,6 +0,0 @@
SOURCE_URL=https://files.friendi.ca/friendica-addons-2021.04.tar.gz
SOURCE_SUM=6c798634ce75d25bb71c80a00fcd3b6dd48be3ca2e233ca0f9ed80981cba83af
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=

View file

@ -1,6 +0,0 @@
SOURCE_URL=https://files.friendi.ca/friendica-full-2021.04.tar.gz
SOURCE_SUM=440d3a39cd701c3a4179f89fcb1a7197c3bf03f02c087c4a6e1bbe88932a1ce4
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=2
SOURCE_FILENAME=

View file

@ -1,52 +1,52 @@
{
"name": "Friendica",
"id": "friendica",
"packaging_format": 1,
"description": {
"en": "Social Communication Server",
"fr": "Serveur de Communication Social"
},
"url": "http://friendi.ca",
"license": "AGPL-3.0-only",
"version": "2021.04~ynh2",
"maintainer": {
"name": "Anmol Sharma",
"email": ""
},
"requirements": {
"yunohost": ">= 4.1.0"
},
"previous_maintainers": {
"name": "aymhce",
"email": "aymhce@gmail.com"
},
"multi_instance": true,
"services": [
"nginx",
"php7.3-fpm",
"mysql"
"name": "Friendica",
"id": "friendica",
"packaging_format": 1,
"description": {
"en": "Social Communication Server",
"fr": "Serveur de Communication Social"
},
"url": "http://friendi.ca",
"license": "AGPL-3.0-only",
"version": "2021.04~ynh2",
"maintainer": {
"name": "Anmol Sharma",
"email": ""
},
"requirements": {
"yunohost": ">= 4.1.0"
},
"previous_maintainers": {
"name": "aymhce",
"email": "aymhce@gmail.com"
},
"multi_instance": true,
"services": [
"nginx",
"php7.3-fpm",
"mysql"
],
"arguments": {
"install" : [
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain for Friendica. Friendica must be installed on the ROOT domain, so be careful!",
"fr": "Choisissez un domaine pour Friendica.Friendica doit etre installe a la racine, soyez prudent"
},
"example": "domain.org"
},
{
"name": "admin",
"type": "user",
"ask": {
"en": "Choose the Friendica administrator (must be an existing YunoHost user)",
"fr": "Choisissez l'administrateur pour Friendica (l'utilisateur YunoHost doit exister)"
},
"example": "homer"
}
"install" : [
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain for Friendica. Friendica must be installed on the ROOT domain, so be careful!",
"fr": "Choisissez un domaine pour Friendica.Friendica doit etre installe a la racine, soyez prudent"
},
"example": "domain.org"
},
{
"name": "admin",
"type": "user",
"ask": {
"en": "Choose the Friendica administrator (must be an existing YunoHost user)",
"fr": "Choisissez l'administrateur pour Friendica (l'utilisateur YunoHost doit exister)"
},
"example": "homer"
}
]
]
}
}

View file

@ -8,3 +8,36 @@
YNH_PHP_VERSION="7.3"
extra_php_dependencies="php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-gd"
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
ynh_smart_mktemp () {
local min_size="${1:-300}"
# Transform the minimum size from megabytes to kilobytes
min_size=$(( $min_size * 1024 ))
# Check if there's enough free space in a directory
is_there_enough_space () {
local free_space=$(df --output=avail "$1" | sed 1d)
test $free_space -ge $min_size
}
if is_there_enough_space /tmp; then
local tmpdir=/tmp
elif is_there_enough_space /var; then
local tmpdir=/var
elif is_there_enough_space /; then1
local tmpdir=/
elif is_there_enough_space /home; then
local tmpdir=/home
else
ynh_die "Insufficient free space to continue..."
fi
echo "$(mktemp --directory --tmpdir="$tmpdir")"
}
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================

View file

@ -119,7 +119,7 @@ ynh_system_user_create --username=$app
#=================================================
ynh_script_progression --message="Configuring php-fpm..."
# Create a dedicated php-fpm config
# Create a dedicated php-fpm configy
ynh_add_fpm_config --package="$extra_php_dependencies"
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)

View file

@ -120,16 +120,14 @@ else
# 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"
# 1- Clone stable repo
$git clone https://github.com/friendica/friendica.git -b stable "$final_path"
# Remove the addon directory securely
ynh_secure_remove "$final_path/addon"
# Remove addon
ynh_secure_remove "$final_path/addon"
# Download, check integrity, uncompress and patch addons
ynh_setup_source --dest_dir="$final_path/addon" --source_id="addons"
# 2 - Clone addons repo
git clone https://github.com/friendica/friendica-addons.git -b stable "$final_path/addon"
# Restore the smarty3 folder
cp -a "$tmpdir/view/smarty3" "${final_path}"
@ -147,7 +145,7 @@ ynh_replace_string --match_string="mysqlusername" --replace_string="$db_nam
ynh_replace_string --match_string="mysqldatabasename" --replace_string="$db_name" --target_file="$config"
ynh_replace_string --match_string="mysqlpassword" --replace_string="$db_pwd" --target_file= "$config"
ynh_replace_string --match_string="'admin_email' => ''," --replace_string="'admin_email' => '$admin_mail'," --target_file="$config"
ynh_replace_string --match_string="OPEN" --replace_string="CLOSED" --target_file="$config"
#ynh_replace_string --match_string="OPEN" --replace_string="CLOSED" --target_file="$config"
# ldap addon config
cp -f "../conf/addon.config.php" "$final_path/config/."

87
tags Normal file
View file

@ -0,0 +1,87 @@
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_OUTPUT_FILESEP slash /slash or backslash/
!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/
!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_PROGRAM_VERSION 0.0.0 //
0 manifest.json /^ {$/;" o array:arguments.install
0 manifest.json /^ "nginx",$/;" s array:services
1 manifest.json /^ {$/;" o array:arguments.install
1 manifest.json /^ "php7.3-fpm",$/;" s array:services
2 manifest.json /^ "mysql"$/;" s array:services
Developers info README.md /^## Developers info$/;" s chapter:Friendica for YunoHost
Friendica README.md /^## Friendica$/;" s chapter:Friendica for YunoHost
Friendica for YunoHost README.md /^# Friendica for YunoHost$/;" c
Install Friendica README.md /^### Install Friendica$/;" S section:Friendica for YunoHost""Installation
Installation README.md /^## Installation$/;" s chapter:Friendica for YunoHost
Links README.md /^## Links$/;" s chapter:Friendica for YunoHost
Overview README.md /^## Overview$/;" s chapter:Friendica for YunoHost
PR Status pull_request_template.md /^## PR Status$/;" s
Package_check results pull_request_template.md /^## Package_check results$/;" s
Problem pull_request_template.md /^## Problem$/;" s
Register a new domain and add it to YunoHost README.md /^### Register a new domain and add it to YunoHost$/;" S section:Friendica for YunoHost""Installation
Solution pull_request_template.md /^## Solution$/;" s
Supported architectures README.md /^#### Supported architectures$/;" t section:Friendica for YunoHost""User with ldap admin rights
This app claims following features: README.md /^## This app claims following features:$/;" s chapter:Friendica for YunoHost
User with ldap admin rights README.md /^## User with ldap admin rights$/;" s chapter:Friendica for YunoHost
__NAMETOCHANGE__ conf/php-fpm.conf /^[__NAMETOCHANGE__]$/;" s
arguments manifest.json /^ "arguments": {$/;" o
ask manifest.json /^ "ask": {$/;" o object:arguments.install.0
ask manifest.json /^ "ask": {$/;" o object:arguments.install.1
chdir conf/php-fpm.conf /^chdir = __FINALPATH__$/;" k section:__NAMETOCHANGE__
db_data conf/htconfig.php /^ $db_data = getenv('MYSQL_DATABASE');$/;" v
db_data conf/htconfig.php /^$db_data = 'mysqldatabasename';$/;" v
db_host conf/htconfig.php /^ $db_host = getenv('MYSQL_HOST') . ':' . getenv('MYSQL_PORT');$/;" v
db_host conf/htconfig.php /^$db_host = 'your.mysqlhost.com';$/;" v
db_pass conf/htconfig.php /^ $db_pass = getenv('MYSQL_PASSWORD');$/;" v
db_pass conf/htconfig.php /^$db_pass = 'mysqlpassword';$/;" v
db_user conf/htconfig.php /^ $db_user = getenv('MYSQL_USER');$/;" v
db_user conf/htconfig.php /^ $db_user = getenv('MYSQL_USERNAME');$/;" v
db_user conf/htconfig.php /^$db_user = 'mysqlusername';$/;" v
default_timezone conf/htconfig.php /^$default_timezone = 'America\/Los_Angeles';$/;" v
description manifest.json /^ "description": {$/;" o
email manifest.json /^ "email": ""$/;" s object:maintainer
email manifest.json /^ "email": "aymhce@gmail.com"$/;" s object:previous_maintainers
en manifest.json /^ "en": "Choose a domain for Friendica. Friendica must be installed on the ROOT domain/;" s object:arguments.install.0.ask
en manifest.json /^ "en": "Choose the Friendica administrator (must be an existing YunoHost user)",$/;" s object:arguments.install.1.ask
en manifest.json /^ "en": "Social Communication Server",$/;" s object:description
example manifest.json /^ "example": "domain.org"$/;" s object:arguments.install.0
example manifest.json /^ "example": "homer"$/;" s object:arguments.install.1
fr manifest.json /^ "fr": "Choisissez l'administrateur pour Friendica (l'utilisateur YunoHost doit exist/;" s object:arguments.install.1.ask
fr manifest.json /^ "fr": "Choisissez un domaine pour Friendica.Friendica doit etre installe a la racine/;" s object:arguments.install.0.ask
fr manifest.json /^ "fr": "Serveur de Communication Social"$/;" s object:description
group conf/php-fpm.conf /^group = __USER__$/;" k section:__NAMETOCHANGE__
group conf/php-fpm.conf /^listen.group = www-data$/;" k section:__NAMETOCHANGE__
id manifest.json /^ "id": "friendica",$/;" s
install manifest.json /^ "install" : [$/;" a object:arguments
is_there_enough_space scripts/_common.sh /^ is_there_enough_space () {$/;" f
license manifest.json /^ "license": "AGPL-3.0-only",$/;" s
listen conf/php-fpm.conf /^listen = \/var\/run\/php\/php__PHPVERSION__-fpm-__NAMETOCHANGE__.sock$/;" k section:__NAMETOCHANGE__
maintainer manifest.json /^ "maintainer": {$/;" o
max_children conf/php-fpm.conf /^pm.max_children = 5$/;" k section:__NAMETOCHANGE__
max_spare_servers conf/php-fpm.conf /^pm.max_spare_servers = 3$/;" k section:__NAMETOCHANGE__
min_spare_servers conf/php-fpm.conf /^pm.min_spare_servers = 1$/;" k section:__NAMETOCHANGE__
multi_instance manifest.json /^ "multi_instance": true,$/;" b
name manifest.json /^ "name": "admin",$/;" s object:arguments.install.1
name manifest.json /^ "name": "domain",$/;" s object:arguments.install.0
name manifest.json /^ "name": "Anmol Sharma",$/;" s object:maintainer
name manifest.json /^ "name": "aymhce",$/;" s object:previous_maintainers
name manifest.json /^ "name": "Friendica",$/;" s
owner conf/php-fpm.conf /^listen.owner = www-data$/;" k section:__NAMETOCHANGE__
packaging_format manifest.json /^ "packaging_format": 1,$/;" n
pm conf/php-fpm.conf /^pm = dynamic$/;" k section:__NAMETOCHANGE__
previous_maintainers manifest.json /^ "previous_maintainers": {$/;" o
request_terminate_timeout conf/php-fpm.conf /^request_terminate_timeout = 1d$/;" k section:__NAMETOCHANGE__
requirements manifest.json /^ "requirements": {$/;" o
services manifest.json /^ "services": [$/;" a
start_servers conf/php-fpm.conf /^pm.start_servers = 2$/;" k section:__NAMETOCHANGE__
type manifest.json /^ "type": "domain",$/;" s object:arguments.install.0
type manifest.json /^ "type": "user",$/;" s object:arguments.install.1
url manifest.json /^ "url": "http:\/\/friendi.ca",$/;" s
user conf/php-fpm.conf /^user = __USER__$/;" k section:__NAMETOCHANGE__
version manifest.json /^ "version": "2021.04~ynh2",$/;" s
ynh_smart_mktemp scripts/_common.sh /^ynh_smart_mktemp () {$/;" f
yunohost manifest.json /^ "yunohost": ">= 4.1.0"$/;" s object:requirements