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

Commit

Permalink
Merge pull request #23 from foglamp/FOGL-2771
Browse files Browse the repository at this point in the history
FOGL-2771 Add dht11 Coral Package
  • Loading branch information
MarkRiddoch authored May 22, 2019
2 parents 5bd5d24 + 510aa36 commit 13c6e5a
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 7 deletions.
19 changes: 12 additions & 7 deletions make_deb
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,18 @@ do
done


# If the architecture has not been defined, then the script is complete
if [ "$(dpkg --print-architecture)" != "armhf" ]; then
echo "Package building is only supported on armhf architecture!!"
exit 0
fi

architecture="armhf"
architecture="$(dpkg --print-architecture)"

case "${architecture}" in
arm64)
;;
armhf)
;;
*)
echo "Package building is only supported on arm architectures!!"
exit 0
;;
esac

version=`cat ${GIT_ROOT}/VERSION.south.dht11 | tr -d ' ' | grep 'foglamp_south_dht11_version=' | head -1 | sed -e 's/\(.*\)=\(.*\)/\2/g'`
foglamp_version=`cat ${GIT_ROOT}/VERSION.south.dht11 | tr -d ' ' | grep 'foglamp_version' | head -1 | sed -e 's/\(.*\)version\(.*\)/\2/g'`
Expand Down
10 changes: 10 additions & 0 deletions packages/Debian/arm64/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Package: foglamp-south-dht11
Version: 1.0.0
Section: devel
Priority: optional
Architecture: armh64
Depends: foglamp,wiringpi
Conflicts:
Maintainer: Dianomic Systems, Inc. <[email protected]>
Homepage: http://www.dianomic.com
Description: South plugin for the DHT11
40 changes: 40 additions & 0 deletions packages/Debian/arm64/DEBIAN/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/sh

##--------------------------------------------------------------------
## Copyright (c) 2019 Dianomic Systems Inc
##
## Licensed 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.
##--------------------------------------------------------------------

##--------------------------------------------------------------------
##
## @postinst DEBIAN/postinst
## This script is used to execute post installation tasks.
##
## Author: Ivan Zoratti, Praveen Garg, Mark Riddoch
##
##--------------------------------------------------------------------

set -e

install_deps () {
pip3 install -Ir /usr/local/foglamp/python/requirements-dht.txt --no-cache-dir
}

set_files_ownership () {
chown -R root:root /usr/local/foglamp/python/foglamp/plugins/south/dht11
}

install_deps
set_files_ownership
echo "dht11 plugin installed."

0 comments on commit 13c6e5a

Please sign in to comment.