diff --git a/conf/.env b/conf/.env index 3b88222..146c2d4 100644 --- a/conf/.env +++ b/conf/.env @@ -29,7 +29,7 @@ MAILGUN_SECRET= #POSTMARK_API_TOKEN= -PHANTOMJS_BIN_PATH=/usr/local/bin/phantomjs +PHANTOMJS_BIN_PATH=__INSTALL_DIR__/phantomjs/bin/phantomjs PHANTOMJS_SECRET=__PHANTOMJS_KEY__ LOG=single diff --git a/scripts/_common.sh b/scripts/_common.sh index 48f7e8a..fd0fb7d 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,15 +9,16 @@ #================================================= _install_phantomjs() { - tmpdir="$(mktemp -d)" + source_dir="$install_dir/phantomjs/source" + destdir="$install_dir/phantomjs" + ynh_setup_source --dest_dir="$source_dir" --source_id="phantomjs" - ynh_setup_source --dest_dir="$tmpdir" --source_id="phantomjs" - pushd "$tmpdir" - ynh_exec_warn_less ./configure && ynh_exec_warn_less make + pushd "$source_dir" + ynh_exec_warn_less DESTDIR="$destdir" ./configure + ynh_exec_warn_less make -j "$(nproc)" ynh_exec_warn_less make install popd - - ynh_secure_remove --file="$tmpdir" + ynh_secure_remove --file="$source_dir" } #================================================= # EXPERIMENTAL HELPERS diff --git a/scripts/remove b/scripts/remove index 107c3c4..b88f6a3 100755 --- a/scripts/remove +++ b/scripts/remove @@ -23,8 +23,6 @@ ynh_remove_fpm_config # Remove a cron file ynh_secure_remove --file="/etc/cron.d/$app" -ynh_secure_remove --file="/usr/local/bin/phantomjs" - #================================================= # END OF SCRIPT #=================================================