Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
blavka committed Jul 25, 2017
1 parent 5abfc27 commit c41e9bd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bc_gateway/bc-gateway.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Requires=mosquitto.service
Requisite=dev-stm32ACM0.device

[Service]
ExecStart=/usr/bin/bc-gateway -d /dev/stm32ACM0
ExecStart=/usr/bin/bc-gateway -c /etc/bc-gateway.yml
User=bigclown
Restart=on-failure
RestartSec=10s
Expand Down
2 changes: 1 addition & 1 deletion bc_gateway/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
device: /dev/ttyACM0
device: /dev/stm32ACM0
mqtt:
host: localhost
port: 1883
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
paho-mqtt>=1.0 # deb:python3-paho-mqtt>=1.0
pyserial>=2.6 # deb:python3-serial>=2.6
PyYAML>=3.11 # deb:python3-yaml>=3.11
simplejson>=3.6.0 # deb:python3-simplejson>=3.6.0
simplejson>=3.6.0 # deb:python3-simplejson>=3.6.0
9 changes: 6 additions & 3 deletions script/build
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ build_bc_gateway() {
einfo 'Building debian package bc-gateway'

cp -r bc_gateway "$BUILD_DIR"/
cp requirements.txt "$BUILD_DIR/bc_gateway"
cd "$BUILD_DIR"/bc_gateway

# Prepare symlink
Expand All @@ -126,8 +127,10 @@ build_bc_gateway() {
_fpm --name bc-gateway \
--depends bc-common \
$(python_depends) \
--config-files /etc \
--deb-systemd bc-gateway.service \
gateway.py="$GATEWAY_DEST_DIR/bc-gateway.py" \
config.yml=etc/bc-gateway.yml \
"$tmp_dir/bc-gateway"=/usr/bin

rm -Rf "$tmp_dir"
Expand All @@ -146,8 +149,8 @@ rm -rf "$TARGET_DIR"/*.deb
mkdir -p "$BUILD_DIR" "$TARGET_DIR"


build_pip
build_paho_mqtt
# build_pip
# build_paho_mqtt
build_bc_gateway

rm -Rf "$BUILD_DIR"
# rm -Rf "$BUILD_DIR"
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
name='bc-gateway',
version='@@VERSION@@',
description='BigClown gateway between USB and MQTT broker.',
author='Roger Light',
author_email='[email protected]',
author='BigClownLabs',
author_email='[email protected]',
url='https://github.com/bigclownlabs/bch-usb-gateway',
packages=['bc_gateway'],
package_dir={'': '.'},
Expand Down

0 comments on commit c41e9bd

Please sign in to comment.