Skip to content

Commit 67c76d4

Browse files
Merge pull request #52 from fledge-iot/FOGL-6134
FOGL-6134 iec 60870 and 61850 additional library package added
2 parents 164bf82 + 52e9972 commit 67c76d4

File tree

6 files changed

+61
-0
lines changed

6 files changed

+61
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ packages/Debian/build/
1313
packages/RPM/build/
1414
others/paho.mqtt.c/
1515
others/jansson
16+
others/lib60870
17+
others/libiec61850
1618

1719
# Archived packages
1820
plugins/archive

others/make_deb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ if [ "${ADDITIONAL_LIB_NAME}" == "gcp" ]; then
131131
cp -R --preserve=links /usr/local/lib/libjwt* usr/local/lib
132132
cp -R --preserve=links /usr/local/lib/libjansson* usr/local/lib
133133
fi
134+
if [ "${ADDITIONAL_LIB_NAME}" == "iec" ]; then
135+
cp -R --preserve=links /usr/local/lib/liblib60870* usr/local/lib
136+
cp -R --preserve=links /usr/local/lib/libiec61850* usr/local/lib
137+
fi
134138
echo "Done."
135139

136140
# Build the package

others/make_rpm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ fi
153153
# cp -R --preserve=links /usr/local/lib64/libjwt* usr/local/lib64
154154
# cp -R --preserve=links /usr/local/lib64/libjansson* usr/local/lib64
155155
#fi
156+
if [ "${ADDITIONAL_LIB_NAME}" == "iec" ]; then
157+
mkdir -p usr/local/lib
158+
cp -R --preserve=links /usr/local/lib/liblib60870* usr/local/lib
159+
cp -R --preserve=links /usr/local/lib64/libiec61850* usr/local/lib64
160+
fi
156161
echo "Done."
157162
find -L . -type f -exec echo '/'{} \; >> ../../SPECS/others.spec
158163
echo "Building the RPM package..."

others/scripts/iec/Description

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
IEC library for IEC 60870-5-101|104 and IEC 61850 based protocols in C

others/scripts/iec/VERSION

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
fledge_iec_version=1.9.2
2+
fledge_version>=1.9

others/scripts/iec/requirements.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/usr/bin/env bash
2+
3+
##-------------------------------------------------------------------------
4+
## Copyright (c) 2022 Dianomic Systems Inc.
5+
##
6+
## Licensed under the Apache License, Version 2.0 (the "License");
7+
## you may not use this file except in compliance with the License.
8+
## You may obtain a copy of the License at
9+
##
10+
## http://www.apache.org/licenses/LICENSE-2.0
11+
##
12+
## Unless required by applicable law or agreed to in writing, software
13+
## distributed under the License is distributed on an "AS IS" BASIS,
14+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
## See the License for the specific language governing permissions and
16+
## limitations under the License.
17+
##--------------------------------------------------------------------------
18+
19+
##
20+
## Author: Ashish Jabble
21+
##
22+
23+
set -e
24+
25+
echo "Fetching MZA lib60870 library..."
26+
rm -rf lib60870
27+
git clone https://github.com/mz-automation/lib60870.git
28+
cd lib60870/lib60870-C
29+
cd dependencies
30+
wget https://tls.mbed.org/download/mbedtls-2.6.0-apache.tgz
31+
tar xf mbedtls-2.6.0-apache.tgz
32+
cd ..
33+
mkdir build
34+
cd build
35+
cmake -DBUILD_TESTS=NO -DBUILD_EXAMPLES=NO ..
36+
make
37+
sudo make install
38+
39+
echo "Fetching MZA libiec61850 library..."
40+
rm -rf libiec61850
41+
git clone https://github.com/mz-automation/libiec61850.git
42+
cd libiec61850
43+
mkdir build
44+
cd build
45+
cmake -DBUILD_TESTS=NO -DBUILD_EXAMPLES=NO ..
46+
make
47+
sudo make install

0 commit comments

Comments
 (0)