Skip to content

Commit

Permalink
Add correct shipping for V8 and check for post install script in depl…
Browse files Browse the repository at this point in the history
…oyment in order to avoid netcore to be installed multiple times.
  • Loading branch information
viferga committed Jan 18, 2019
1 parent 698fecf commit b09c84f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 19 deletions.
2 changes: 1 addition & 1 deletion cmake
Submodule cmake updated from 6d88cc to 3cdc56
5 changes: 2 additions & 3 deletions deploy/packages/pack-metacall.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,16 @@ endif()
set(CPACK_DEBIAN_PACKAGE_NAME "${package_name}")
set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "all")
set(CPACK_DEBIAN_RUNTIME_PACKAGE_DEPENDS "bash (>= 4.4-5), curl (>= 7.52.1-5), libc6 (>= 2.24-11), libgcc1 (>= 1:6.3.0-18), libpython3.5 (>= 3.5.3-1), libruby (>= 1:2.3.3), libicu57 (>= 57.1-6), libunwind8 (>= 1.1-4.1)")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${package_maintainer}")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "bash (>= 4.4-5), curl (>= 7.52.1-5), libc6 (>= 2.24-11), libgcc1 (>= 1:6.3.0-18), libpython3.5 (>= 3.5.3-1), libruby (>= 1:2.3.3), libicu57 (>= 57.1-6), libunwind8 (>= 1.1-4.1)")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "")
set(CPACK_DEB_COMPONENT_INSTALL ${PACK_COMPONENT_INSTALL})
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/packages/postinst")
#set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "")
#set(CPACK_DEBIAN_PACKAGE_SUGGESTS "")
#set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON)
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/packages/postinst")

#
# RPM package
Expand Down
14 changes: 9 additions & 5 deletions deploy/packages/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@
# limitations under the License.
#

NETCORE_INSTALL_DIR=/usr/share/dotnet

# Download and install NetCore
curl -s https://dot.net/v1/dotnet-install.sh &> dotnet-install.sh \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh --runtime dotnet --channel 1.0 --version 1.1.10 --install-dir /usr/share/dotnet \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
&& rm dotnet-install.sh
if [ ! -f $NETCORE_INSTALL_DIR/dotnet ]; then
curl -s https://dot.net/v1/dotnet-install.sh &> dotnet-install.sh \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh --runtime dotnet --channel 1.0 --version 1.1.10 --install-dir $NETCORE_INSTALL_DIR \
&& ln -s $NETCORE_INSTALL_DIR/dotnet /usr/bin/dotnet \
&& rm dotnet-install.sh
fi
6 changes: 4 additions & 2 deletions source/loaders/js_loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ endif()
# External dependencies
#

find_package(V8 5.1.117)
set(ICU_FIND_VERSION 52.1)

find_package(V8 5.1.117) # 5.8.283

if(NOT V8_FOUND)
message(STATUS "V8 libraries not found")
Expand Down Expand Up @@ -227,7 +229,7 @@ install(TARGETS ${target}

# Runtime (pack the runtime meanwhile V8 is not distributed correctly as a library)
install(FILES
${V8_LIBRARIES_VERSION}
${V8_LIBRARIES_DEPENDS}
DESTINATION ${INSTALL_LIB}
COMPONENT runtime
)
15 changes: 7 additions & 8 deletions tools/metacall-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ sub_netcore(){
sub_v8repo(){
echo "configure v8 from repository"
cd $ROOT_DIR
$SUDO_CMD apt-get -y --no-install-recommends install add-apt-key
$SUDO_CMD apt-get $APT_CACHE_CMD -y --no-install-recommends install software-properties-common

# V8 5.1
Expand Down Expand Up @@ -183,19 +182,19 @@ sub_v8repo(){
$SUDO_CMD apt-get $APT_CACHE_CMD -y --no-install-recommends install libicu55 libv8-5.2-dev
fi

# V8 5.8
if [ $INSTALL_V8REPO58 = 1 ]; then
$SUDO_CMD add-apt-repository -y ppa:pinepain/libv8-5.8
$SUDO_CMD apt-get update
$SUDO_CMD apt-get $APT_CACHE_CMD -y --no-install-recommends install libicu55 libv8-5.8-dev
fi

# V8 5.7
if [ $INSTALL_V8REPO57 = 1 ]; then
$SUDO_CMD add-apt-repository -y ppa:pinepain/libv8-5.7
$SUDO_CMD apt-get update
$SUDO_CMD apt-get $APT_CACHE_CMD -y --no-install-recommends install libicu55 libv8-5.7-dev
fi

# V8 5.8
if [ $INSTALL_V8REPO58 = 1 ]; then
$SUDO_CMD sh -c "echo \"deb http://ppa.launchpad.net/pinepain/libv8-archived/ubuntu trusty main\" > /etc/apt/sources.list.d/libv8-archived.list"
$SUDO_CMD apt-get update
$SUDO_CMD apt-get $APT_CACHE_CMD -y --no-install-recommends install libicu57 libv8-5.8.283 libv8-5.8-dev
fi
}

# V8
Expand Down

0 comments on commit b09c84f

Please sign in to comment.