mirror of
https://github.com/YunoHost-Apps/paperless-ngx_ynh.git
synced 2024-09-03 19:56:33 +02:00
Build Ghostscript
This commit is contained in:
parent
fd9c577ac8
commit
1f27bde29e
4 changed files with 40 additions and 1 deletions
|
@ -81,7 +81,7 @@ PAPERLESS_CONSUMER_IGNORE_PATTERNS=[".DS_STORE/*", "._*", ".stfolder/*", ".*"]
|
||||||
# Binaries
|
# Binaries
|
||||||
|
|
||||||
#PAPERLESS_CONVERT_BINARY=/usr/bin/convert
|
#PAPERLESS_CONVERT_BINARY=/usr/bin/convert
|
||||||
#PAPERLESS_GS_BINARY=/usr/bin/gs
|
PAPERLESS_GS_BINARY=__INSTALL_DIR__/ghostscript/bin/gs
|
||||||
#PAPERLESS_OPTIPNG_BINARY=/usr/bin/optipng
|
#PAPERLESS_OPTIPNG_BINARY=/usr/bin/optipng
|
||||||
|
|
||||||
# YunoHost tweaks
|
# YunoHost tweaks
|
||||||
|
|
|
@ -61,6 +61,10 @@ ram.runtime = "350M"
|
||||||
autoupdate.strategy = "latest_github_release"
|
autoupdate.strategy = "latest_github_release"
|
||||||
autoupdate.asset = "paperless-ngx-.*.tar.xz"
|
autoupdate.asset = "paperless-ngx-.*.tar.xz"
|
||||||
|
|
||||||
|
[resources.sources.gs]
|
||||||
|
url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10021/ghostpdl-10.02.1.tar.gz"
|
||||||
|
sha256 = "25399af0ef5bb94f2a13c91dc785c128d14f16744c4c92fa7c86e011c23151d8"
|
||||||
|
|
||||||
[resources.system_user]
|
[resources.system_user]
|
||||||
|
|
||||||
[resources.install_dir]
|
[resources.install_dir]
|
||||||
|
|
|
@ -17,6 +17,8 @@ ynh_script_progression --message="Setting up source files..." --weight=1
|
||||||
|
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
|
||||||
|
ynh_setup_source --dest_dir="$install_dir/ghostscript" --source_id="gs"
|
||||||
|
|
||||||
chmod 750 "$install_dir"
|
chmod 750 "$install_dir"
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:$app "$install_dir"
|
chown -R $app:$app "$install_dir"
|
||||||
|
@ -55,6 +57,20 @@ pushd $install_dir
|
||||||
)
|
)
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# BUILD GHOSTCRIPT SPECIFIC VERSION
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Building Ghostscript dependency..."
|
||||||
|
|
||||||
|
pushd $install_dir/ghostscript
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
popd
|
||||||
|
|
||||||
|
chown -R $app:$app "$install_dir/ghostscript"
|
||||||
|
chmod 755 $install_dir/ghostscript/bin/gs
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DATA DIRECTORY
|
# CREATE DATA DIRECTORY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -95,6 +95,25 @@ pushd $install_dir
|
||||||
)
|
)
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# BUILD GHOSTCRIPT SPECIFIC VERSION
|
||||||
|
#=================================================
|
||||||
|
if [ ! -f $install_dir/ghostscript/bin/gs ] && [ grep -q "10.02.1" $($install_dir/ghostscript/bin/gs -v) ]
|
||||||
|
then
|
||||||
|
ynh_script_progression --message="Building Ghostscript dependency..."
|
||||||
|
|
||||||
|
ynh_setup_source --dest_dir="$install_dir/ghostscript" --source_id="gs" --full_replace
|
||||||
|
|
||||||
|
pushd $install_dir/ghostscript
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
popd
|
||||||
|
|
||||||
|
chown -R $app:$app "$install_dir/ghostscript"
|
||||||
|
chmod 755 $install_dir/ghostscript/bin/gs
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE A CONFIG FILE
|
# UPDATE A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue