Repository: nifi-minifi-cpp Updated Branches: refs/heads/master 0af30b1e5 -> fb8573fe4
MINIFICPP-361: Add debian bootstrap Add license headers This closes #229. Signed-off-by: Aldrin Piri <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/commit/fb8573fe Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/fb8573fe Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/fb8573fe Branch: refs/heads/master Commit: fb8573fe42cd9ce4ad6199bbec9af04b491bb7ba Parents: 0af30b1 Author: Marc Parisi <[email protected]> Authored: Fri Jan 5 14:12:24 2018 -0500 Committer: Aldrin Piri <[email protected]> Committed: Fri Jan 5 15:47:27 2018 -0500 ---------------------------------------------------------------------- aptitude.sh | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ bootstrap.sh | 22 ++++++++++++-- centos.sh | 16 ++++++++++ darwin.sh | 16 ++++++++++ fedora.sh | 16 ++++++++++ rheldistro.sh | 16 ++++++++++ ubuntu.sh | 69 -------------------------------------------- 7 files changed, 169 insertions(+), 71 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fb8573fe/aptitude.sh ---------------------------------------------------------------------- diff --git a/aptitude.sh b/aptitude.sh new file mode 100644 index 0000000..271f97d --- /dev/null +++ b/aptitude.sh @@ -0,0 +1,85 @@ +# 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. +#!/bin/bash +verify_enable(){ + feature="$1" + feature_status=${!1} + if [ "$feature" = "USB_ENABLED" ]; then + echo "false" + else + echo "true" + fi +} +add_os_flags() { + CMAKE_BUILD_COMMAND="${CMAKE_BUILD_COMMAND} -DFAIL_ON_WARNINGS= " +} +bootstrap_cmake(){ + sudo apt-get -y install cmake +} +build_deps(){ + + COMMAND="sudo apt-get -y install cmake gcc g++ zlib1g-dev libssl-dev uuid uuid-dev" + export DEBIAN_FRONTEND=noninteractive + INSTALLED=() + sudo apt-get -y update + for option in "${OPTIONS[@]}" ; do + option_value="${!option}" + if [ "$option_value" = "${TRUE}" ]; then + # option is enabled + FOUND_VALUE="" + for cmake_opt in "${DEPENDENCIES[@]}" ; do + KEY=${cmake_opt%%:*} + VALUE=${cmake_opt#*:} + if [ "$KEY" = "$option" ]; then + FOUND_VALUE="$VALUE" + if [ "$FOUND_VALUE" = "libcurl" ]; then + INSTALLED+=("libcurl4-openssl-dev") + elif [ "$FOUND_VALUE" = "libpcap" ]; then + INSTALLED+=("libpcap-dev") + elif [ "$FOUND_VALUE" = "openssl" ]; then + INSTALLED+=("openssl") + elif [ "$FOUND_VALUE" = "libusb" ]; then + INSTALLED+=("libusb-dev") + elif [ "$FOUND_VALUE" = "libpng" ]; then + INSTALLED+=("libpng-dev") + elif [ "$FOUND_VALUE" = "bison" ]; then + INSTALLED+=("bison") + elif [ "$FOUND_VALUE" = "flex" ]; then + INSTALLED+=("flex") + elif [ "$FOUND_VALUE" = "python" ]; then + INSTALLED+=("libpython3-dev") + elif [ "$FOUND_VALUE" = "lua" ]; then + INSTALLED+=("liblua5.1-0-dev") + elif [ "$FOUND_VALUE" = "gpsd" ]; then + INSTALLED+=("libgps-dev") + elif [ "$FOUND_VALUE" = "libarchive" ]; then + INSTALLED+=("liblzma-dev") + fi + fi + done + + fi + done + + for option in "${INSTALLED[@]}" ; do + COMMAND="${COMMAND} $option" + done + + echo "Ensuring you have all dependencies installed..." + ${COMMAND} + +} http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fb8573fe/bootstrap.sh ---------------------------------------------------------------------- diff --git a/bootstrap.sh b/bootstrap.sh index 00830bb..270a4a5 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,3 +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. #!/bin/bash @@ -115,10 +131,12 @@ OS_REVISION=`echo $EVR | cut -d. -f3` if [[ "$OS" = "Darwin" ]]; then source darwin.sh +elif [[ "$OS" = Deb* ]]; then + source aptitude.sh elif [[ "$OS" = Rasp* ]]; then - source ubuntu.sh + source aptitude.sh elif [[ "$OS" = Ubuntu* ]]; then - source ubuntu.sh + source aptitude.sh elif [[ "$OS" = Red* ]]; then source rheldistro.sh elif [[ "$OS" = CentOS* ]]; then http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fb8573fe/centos.sh ---------------------------------------------------------------------- diff --git a/centos.sh b/centos.sh index 8f6bf0a..03d3b56 100644 --- a/centos.sh +++ b/centos.sh @@ -1,3 +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. #!/bin/bash verify_enable() { http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fb8573fe/darwin.sh ---------------------------------------------------------------------- diff --git a/darwin.sh b/darwin.sh index 85032f8..85d91cb 100644 --- a/darwin.sh +++ b/darwin.sh @@ -1,3 +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. #!/bin/bash verify_enable() { http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fb8573fe/fedora.sh ---------------------------------------------------------------------- diff --git a/fedora.sh b/fedora.sh index d0026e0..9b2b859 100644 --- a/fedora.sh +++ b/fedora.sh @@ -1,3 +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. #!/bin/bash verify_enable(){ echo "true" http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fb8573fe/rheldistro.sh ---------------------------------------------------------------------- diff --git a/rheldistro.sh b/rheldistro.sh index 537f6d3..0b745d4 100644 --- a/rheldistro.sh +++ b/rheldistro.sh @@ -1,3 +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. #!/bin/bash verify_enable() { feature="$1" http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fb8573fe/ubuntu.sh ---------------------------------------------------------------------- diff --git a/ubuntu.sh b/ubuntu.sh deleted file mode 100644 index 95b8e25..0000000 --- a/ubuntu.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash -verify_enable(){ - feature="$1" - feature_status=${!1} - if [ "$feature" = "USB_ENABLED" ]; then - echo "false" - else - echo "true" - fi -} -add_os_flags() { - CMAKE_BUILD_COMMAND="${CMAKE_BUILD_COMMAND} -DFAIL_ON_WARNINGS= " -} -bootstrap_cmake(){ - sudo apt-get -y install cmake -} -build_deps(){ - - COMMAND="sudo apt-get -y install cmake gcc g++ libssl-dev uuid uuid-dev" - export DEBIAN_FRONTEND=noninteractive - INSTALLED=() - sudo apt-get -y update - for option in "${OPTIONS[@]}" ; do - option_value="${!option}" - if [ "$option_value" = "${TRUE}" ]; then - # option is enabled - FOUND_VALUE="" - for cmake_opt in "${DEPENDENCIES[@]}" ; do - KEY=${cmake_opt%%:*} - VALUE=${cmake_opt#*:} - if [ "$KEY" = "$option" ]; then - FOUND_VALUE="$VALUE" - if [ "$FOUND_VALUE" = "libcurl" ]; then - INSTALLED+=("libcurl4-openssl-dev") - elif [ "$FOUND_VALUE" = "libpcap" ]; then - INSTALLED+=("libpcap-dev") - elif [ "$FOUND_VALUE" = "openssl" ]; then - INSTALLED+=("openssl") - elif [ "$FOUND_VALUE" = "libusb" ]; then - INSTALLED+=("libusb-dev") - elif [ "$FOUND_VALUE" = "libpng" ]; then - INSTALLED+=("libpng-dev") - elif [ "$FOUND_VALUE" = "bison" ]; then - INSTALLED+=("bison") - elif [ "$FOUND_VALUE" = "flex" ]; then - INSTALLED+=("flex") - elif [ "$FOUND_VALUE" = "python" ]; then - INSTALLED+=("libpython3-dev") - elif [ "$FOUND_VALUE" = "lua" ]; then - INSTALLED+=("liblua5.1-0-dev") - elif [ "$FOUND_VALUE" = "gpsd" ]; then - INSTALLED+=("libgps-dev") - elif [ "$FOUND_VALUE" = "libarchive" ]; then - INSTALLED+=("liblzma-dev") - fi - fi - done - - fi - done - - for option in "${INSTALLED[@]}" ; do - COMMAND="${COMMAND} $option" - done - - echo "Ensuring you have all dependencies installed..." - ${COMMAND} - -}
