Skip to content
This repository has been archived by the owner on Jan 17, 2020. It is now read-only.

Commit

Permalink
RPM packaging & requirements.sh file updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ashish-jabble committed May 14, 2019
1 parent 7b9ac06 commit db6a59c
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
1 change: 1 addition & 0 deletions Description
@@ -0,0 +1 @@
FogLAMP South TI SensorTag CC2650 plugin
26 changes: 26 additions & 0 deletions Package
@@ -0,0 +1,26 @@
# A set of variables that define how we package this repository
#
plugin_name=cc2650
plugin_type=south
plugin_install_dirname=${plugin_name}

# Now build up the runtime requirements list. This has 3 components
# 1. Generic packages we depend on in all architectures and package managers
# 2. Architecture specific packages we depend on
# 3. Package manager specific packages we depend on
requirements="foglamp,bluez"

case "$arch" in
x86_64)
;;
armhf)
;;
aarch64)
;;
esac
case "$package_manager" in
deb)
;;
rpm)
;;
esac
19 changes: 17 additions & 2 deletions requirements.sh
Expand Up @@ -22,5 +22,20 @@

set -e

sudo apt install -y bluez
pip3 install -Ir python/requirements-cc2650.txt --no-cache-dir
os_name=`(grep -o '^NAME=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')`
os_version=`(grep -o '^VERSION_ID=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')`
echo "Platform is ${os_name}, Version: ${os_version}"

if [[ ( $os_name == *"Red Hat"* || $os_name == *"CentOS"* ) && $os_version == *"7"* ]]; then
sudo yum -y install bluez
elif apt --version 2>/dev/null; then
sudo apt -y install bluez
else
echo "Requirements cannot be automatically installed, please refer README.rst to install requirements manually"
fi

if pip3 --version 2>/dev/null; then
pip3 install -Ir python/requirements-cc2650.txt --no-cache-dir
else
echo "pip3 package is not installed, please install it and then run python/requirements-cc2650.txt manually with pip3"
fi

0 comments on commit db6a59c

Please sign in to comment.