mirror of
https://github.com/YunoHost-Apps/cops_ynh.git
synced 2024-09-03 18:25:57 +02:00
Use of ynh_package_install_from_equivs
This commit is contained in:
parent
0e49eddd8e
commit
8570567b5a
5 changed files with 39 additions and 6 deletions
15
conf/cops-deps.control
Normal file
15
conf/cops-deps.control
Normal file
|
@ -0,0 +1,15 @@
|
|||
Section: misc
|
||||
Priority: optional
|
||||
Homepage: http://blog.slucas.fr/fr/oss/calibre-opds-php-server
|
||||
Standards-Version: 1.0.1
|
||||
|
||||
Package: cops-deps
|
||||
Version: 1.2-1
|
||||
Depends: php5-gd, php5-sqlite, php5-json, php5-intl
|
||||
Architecture: all
|
||||
Description: meta package for cops dependencies
|
||||
COPS stands for Calibre OPDS (and HTML) Php Server.
|
||||
.
|
||||
.
|
||||
This meta-package is only responsible of installing its dependencies.
|
||||
|
|
@ -123,8 +123,13 @@ finalphpconf="/etc/php5/fpm/pool.d/${app}.conf"
|
|||
ynh_app_setting_set "$app" finalphpconf "$finalphpconf"
|
||||
|
||||
# We install dependencies
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install php5-gd php5-sqlite php5-json php5-intl -y
|
||||
#sudo apt-get update -y
|
||||
#sudo apt-get install php5-gd php5-sqlite php5-json php5-intl -y
|
||||
|
||||
# Install dependencies using Helpers
|
||||
ynh_package_install_from_equivs ../conf/cops-deps.control \
|
||||
|| ynh_die "Unable to install dependencies"
|
||||
|
||||
|
||||
# Creation of folder
|
||||
sudo mkdir -p $final_path
|
||||
|
|
|
@ -35,6 +35,11 @@ sudo rm -rf $final_path
|
|||
sudo rm -f $finalnginxconf
|
||||
sudo rm -f $finalphpconf
|
||||
|
||||
# Remove app dependencies
|
||||
if ynh_package_is_installed "cops-deps"; then
|
||||
ynh_package_autoremove "cops-deps"
|
||||
fi
|
||||
|
||||
# We reload the services
|
||||
sudo service php5-fpm reload
|
||||
sudo service nginx reload
|
||||
|
|
|
@ -30,8 +30,12 @@ runninguser=$(ynh_app_setting_get $app runninguser)
|
|||
basicauthcreate=$(ynh_app_setting_get $app basicauthcreate)
|
||||
|
||||
# We install dependencies
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install php5-gd php5-sqlite php5-json php5-intl -y
|
||||
#sudo apt-get update -y
|
||||
#sudo apt-get install php5-gd php5-sqlite php5-json php5-intl -y
|
||||
|
||||
# Install dependencies using Helpers
|
||||
ynh_package_install_from_equivs ../conf/cops-deps.control \
|
||||
|| ynh_die "Unable to install dependencies"
|
||||
|
||||
# Restore sources & data
|
||||
sudo mkdir -p $final_path
|
||||
|
|
|
@ -55,8 +55,12 @@ CHECK_CALIBRE () { # Vérifie la présence du / en début de path. Et son absen
|
|||
CHECK_CALIBRE
|
||||
|
||||
# We install dependencies
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install php5-gd php5-sqlite php5-json php5-intl -y
|
||||
#sudo apt-get update -y
|
||||
#sudo apt-get install php5-gd php5-sqlite php5-json php5-intl -y
|
||||
|
||||
# Install dependencies using Helpers
|
||||
ynh_package_install_from_equivs ../conf/cops-deps.control \
|
||||
|| ynh_die "Unable to install dependencies"
|
||||
|
||||
# Removal of old folder and restart from fresh
|
||||
sudo rm -rf $final_path
|
||||
|
|
Loading…
Add table
Reference in a new issue