diff --git a/manifest.toml b/manifest.toml index fff4f6f..6d85b43 100644 --- a/manifest.toml +++ b/manifest.toml @@ -54,14 +54,6 @@ ram.runtime = "200M" autoupdate.strategy = "latest_github_release" - [resources.sources.libheif] - url = "https://github.com/strukturag/libheif/releases/download/v1.12.0/libheif-1.12.0.tar.gz" - sha256 = "e1ac2abb354fdc8ccdca71363ebad7503ad731c84022cf460837f0839e171718" - - autoupdate.strategy = "latest_github_release" - autoupdate.upstream = "https://github.com/strukturag/libheif" - autoupdate.asset = ".*\\.tar\\.gz" - [resources.system_user] [resources.install_dir] @@ -91,33 +83,34 @@ ram.runtime = "200M" "gpg", "ffmpeg", "exiftool", + "libheif1", - "ca-certificates", - "golang", - "libdlib-dev", - "libblas-dev", "libatlas-base-dev", - "liblapack-dev", + "libblas-dev", + "libdlib-dev", "libjpeg-dev", - "libheif-dev", - "build-essential", - "pkg-config", - "autoconf", - "automake", - "libx265-dev", - "libde265-dev", - "libaom-dev", + # "libjpeg62-turbo-dev", + "liblapack-dev", # "darktable", "mariadb-server", ] - packages_from_raw_bash = """ - if [[ $YNH_DEBIAN_VERSION == "bullseye" ]]; then - echo "libdlib19"; - elif [[ $YNH_DEBIAN_VERSION == "bookworm" ]]; then - echo "libdlib19.1"; - fi - """ + [resources.apt.extras.strukturag_libde265] + repo = "deb https://ppa.launchpadcontent.net/strukturag/libde265/ubuntu focal main" + key = "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xc6610628a707a7e5e391d27a9641080a705c2b92" + packages = [ + "libde265-0", + "libde265-dev", + ] + + [resources.apt.extras.strukturag_libheif] + repo = "deb https://ppa.launchpadcontent.net/strukturag/libheif/ubuntu focal main" + key = "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xc6610628a707a7e5e391d27a9641080a705c2b92" + packages = [ + "libheif-dev", + "libaom-dev", + "libx265-dev", + ] [resources.apt.extras.yarn] repo = "deb https://dl.yarnpkg.com/debian/ stable main" diff --git a/scripts/_common.sh b/scripts/_common.sh index 1ce2711..5229d35 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -19,25 +19,6 @@ function set_go_vars { go_shims_path=$goenv_install_dir/shims go_path_full="$go_shims_path":"$(sudo -u $app bash -c 'echo $PATH')" - heif_lib_path="$install_dir/local/lib":"$(sudo -u $app bash -c 'echo $LIBRARY_PATH')" - heif_ld_lib_path="$install_dir/local/lib":"$(sudo -u $app bash -c 'echo $LD_LIBRARY_PATH')" - heif_cgo_cflags="-I$install_dir/local/include" -} - -function build_libheif { - export GOPATH="$install_dir/build/go" - export GOCACHE="$install_dir/build/.cache" - - pushd "$install_dir/libheif" || ynh_die - # mkdir -p "$install_dir/local" - # chown -R $app:$app "$install_dir/local" - ynh_exec_as "$app" ./autogen.sh 2>&1 - ynh_exec_as "$app" ./configure --prefix="$install_dir/local" --disable-gdk-pixbuf 2>&1 - ynh_exec_as "$app" make clean 2>&1 - ynh_exec_as "$app" make 2>&1 - ynh_exec_as "$app" make install 2>&1 - ynh_exec_as "$app" make clean 2>&1 - popd || ynh_die } function build_api { @@ -45,11 +26,8 @@ function build_api { gobuild_env=( "PATH=$go_path_full" - "LIBRARY_PATH=$heif_lib_path" - "LD_LIBRARY_PATH=$heif_ld_lib_path" - "CGO_CFLAGS=$heif_cgo_cflags" "GOENV_VERSION=$go_version" - CGO_ENABLED=1 + "CGO_ENABLED=1" ) pushd "$install_dir/sources/api" || ynh_die diff --git a/scripts/install b/scripts/install index 0db6ebf..ca64ac0 100755 --- a/scripts/install +++ b/scripts/install @@ -27,7 +27,6 @@ ynh_install_nodejs --nodejs_version="$node_version" ynh_script_progression --message="Setting up source files..." --weight=10 ynh_setup_source --dest_dir="$install_dir/sources" -ynh_setup_source --source_id=libheif --dest_dir="$install_dir/libheif" mkdir -p "$install_dir/output/"{data,ui} @@ -37,9 +36,6 @@ chown -R "$app:$app" "$data_dir" #================================================= # BUILD APP #================================================= -ynh_script_progression --message="Compiling libheif..." --weight=10 -build_libheif - ynh_script_progression --message="Compiling Go API..." --weight=10 build_api diff --git a/scripts/upgrade b/scripts/upgrade index d2ae849..703c6ac 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -46,7 +46,6 @@ ynh_install_nodejs --nodejs_version="$node_version" ynh_script_progression --message="Upgrading source files..." --weight=5 ynh_setup_source --dest_dir="$install_dir/sources" --full_replace=1 -ynh_setup_source --source_id=libheif --dest_dir="$install_dir/libheif" --full_replace=1 mkdir -p "$install_dir/output/"{data,ui} chown -R "$app:$app" "$install_dir" @@ -55,9 +54,6 @@ chown -R "$app:$app" "$data_dir" #================================================= # BUILD APP #================================================= -ynh_script_progression --message="Compiling libheif..." --weight=70 -build_libheif - ynh_script_progression --message="Compiling Go API..." --weight=165 build_api