You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@madlib.apache.org by ok...@apache.org on 2022/01/06 16:40:47 UTC
[madlib] 03/04: Build: Add OSX tarball for release
This is an automated email from the ASF dual-hosted git repository.
okislal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/madlib.git
commit ccb0314347d512e9c8bf3e5c01ee91a14f9eaad5
Author: Orhan Kislal <ok...@apache.org>
AuthorDate: Mon Dec 20 20:38:35 2021 -0500
Build: Add OSX tarball for release
JIRA: MADLIB-1493
Since the usual OSX package is not supported anymore, MADlib will
release a compressed file that contains the build folder.
To ensure portability, this commit adds a script to update symlinks
Current, bin, and doc as well as a Readme file.
---
CMakeLists.txt | 30 ++++++++++++++++++++++++++++--
deploy/CMakeLists.txt | 12 ++++++++++++
deploy/Readme_OSX | 24 ++++++++++++++++++++++++
deploy/link_madlib_folders.sh | 19 +++++++++++++++++++
4 files changed, 83 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d9199e..2990a55 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -313,8 +313,14 @@ install(
DESTINATION .
COMPONENT core
)
-
-
+if(APPLE)
+ install(
+ FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/deploy/Readme_OSX"
+ "${CMAKE_CURRENT_SOURCE_DIR}/deploy/link_madlib_folders.sh"
+ DESTINATION .
+ )
+endif()
# -- Add subdirectories --------------------------------------------------------
add_subdirectory(src)
@@ -383,3 +389,23 @@ install(CODE "
)
")
+if(APPLE)
+ install(CODE "
+ EXECUTE_PROCESS(COMMAND mv
+ ${CMAKE_MADLIB_ROOT}/Current/Readme_OSX
+ ${CMAKE_MADLIB_ROOT}/Readme_OSX
+ )
+ ")
+ install(CODE "
+ EXECUTE_PROCESS(COMMAND mv
+ ${CMAKE_MADLIB_ROOT}/Current/link_madlib_folders.sh
+ ${CMAKE_MADLIB_ROOT}/link_madlib_folders.sh
+ )
+ ")
+ install(CODE "
+ EXECUTE_PROCESS(COMMAND chmod
+ a+x
+ ${CMAKE_MADLIB_ROOT}/link_madlib_folders.sh
+ )
+ ")
+endif()
diff --git a/deploy/CMakeLists.txt b/deploy/CMakeLists.txt
index e727e92..6cb8c62 100644
--- a/deploy/CMakeLists.txt
+++ b/deploy/CMakeLists.txt
@@ -129,3 +129,15 @@ foreach(PORT_COMPONENT ${PORT_COMPONENTS})
include("${PORT_COMPONENT}")
endforeach(PORT_COMPONENT)
+if(APPLE)
+ configure_file(
+ link_madlib_folders.sh
+ "${CMAKE_CURRENT_BINARY_DIR}/link_madlib_folders.sh"
+ USE_SOURCE_PERMISSIONS
+ )
+ configure_file(
+ Readme_OSX
+ "${CMAKE_CURRENT_BINARY_DIR}/Readme_OSX"
+ @ONLY
+ )
+endif()
diff --git a/deploy/Readme_OSX b/deploy/Readme_OSX
new file mode 100644
index 0000000..f430734
--- /dev/null
+++ b/deploy/Readme_OSX
@@ -0,0 +1,24 @@
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+MADlib Package Usage for OSX
+
+This tarball is generated for using MADlib on OSX devices.
+Please run the link_madlib_folders.sh file to create links necessary for usage.
+Note that this file needs to be run from the directory that it's located in. If
+it's run from somewhere else, it will not work and that it might have unintended
+side effects like an unrelated file getting deleted.
+
+Please note that this package cannot be used in any other operation system.
diff --git a/deploy/link_madlib_folders.sh b/deploy/link_madlib_folders.sh
new file mode 100755
index 0000000..ceb78df
--- /dev/null
+++ b/deploy/link_madlib_folders.sh
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+rm Current bin doc
+ln -nsf Versions/$(ls -r Versions/ | head -1) ./Current
+ln -nsf Current/bin ./bin
+ln -nsf Current/doc ./doc