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 #19 from foglamp/1.6.0RC
Browse files Browse the repository at this point in the history
1.6.0RC to master
  • Loading branch information
praveen-garg authored May 24, 2019
2 parents bdad22c + 9e1198d commit 75c3874
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 8 deletions.
1 change: 1 addition & 0 deletions Description
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FogLAMP South PT100 plugin for Raspberry PI
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018 Dianomic Systems
Copyright 2018 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.
Expand Down
32 changes: 32 additions & 0 deletions Package
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# A set of variables that define how we package this repository
#
plugin_name=pt100
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,python3-rpi.gpio"

case "$arch" in
x86_64)
;;
armhf)
;;
aarch64)
;;
esac
case "$package_manager" in
deb)
if [ "$arch" != "armhf" ]; then
echo "Deb Package building for ${plugin_name} is only supported on armhf architecture!!"
exit 0
fi
;;
rpm)
echo "RPM Package building for ${plugin_name} is not supported on $arch architecture!!"
exit 0
;;
esac
4 changes: 2 additions & 2 deletions VERSION.south.pt100
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
foglamp_south_pt100_version=1.5.2
foglamp_version>=1.5
foglamp_south_pt100_version=1.6.0
foglamp_version>=1.6
16 changes: 11 additions & 5 deletions make_deb
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,18 @@ do
esac
done

if [ "$(dpkg --print-architecture)" != "armhf" ]; then
echo "Package building is only supported on armhf architecture!!"
exit 0
fi
architecture="$(dpkg --print-architecture)"
case "${architecture}" in
armhf)
;;
arm64)
;;
*)
echo "Package building is only supported on arm architectures!!"
exit 0
;;
esac

architecture="armhf"
version=`cat ${GIT_ROOT}/VERSION.south.pt100 | tr -d ' ' | grep 'foglamp_south_pt100_version=' | head -1 | sed -e 's/\(.*\)=\(.*\)/\2/g'`
foglamp_version=`cat ${GIT_ROOT}/VERSION.south.pt100 | tr -d ' ' | grep 'foglamp_version' | head -1 | sed -e 's/\(.*\)version\(.*\)/\2/g'`
BUILD_ROOT="${GIT_ROOT}/packages/build"
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-pt100
Version: 0.0
Section: devel
Priority: optional
Architecture: arm64
Depends: foglamp,python3-rpi.gpio
Conflicts:
Maintainer: Dianomic Systems, Inc. <[email protected]>
Homepage: http://www.dianomic.com
Description: South plugin for the PT100 on a Raspberry PI
35 changes: 35 additions & 0 deletions packages/Debian/arm64/DEBIAN/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/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: Mark Riddoch
##
##--------------------------------------------------------------------

set -e

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

set_files_ownership
echo "PT100 plugin is now installed."

0 comments on commit 75c3874

Please sign in to comment.