diff options
author | Magnus <mfeuer@jaguarlandrover.com> | 2014-09-14 16:45:13 -0700 |
---|---|---|
committer | Magnus <mfeuer@jaguarlandrover.com> | 2014-09-14 16:45:13 -0700 |
commit | f0f53cf69a83980af80c664b304493dd90b0f006 (patch) | |
tree | a44c6ef894ba2d9f10f85b5b32726ea996c3fbc8 | |
parent | 7b13e3a6e0b330c5e991a73fd415cebd4f11fb27 (diff) | |
download | rvi_core-f0f53cf69a83980af80c664b304493dd90b0f006.tar.gz |
Now builds RPM files correctly. Still need to %install rpm/rvi start/stop script in /etc/init.d
Signed-off-by: Magnus <mfeuer@jaguarlandrover.com>
-rw-r--r-- | Makefile | 36 | ||||
-rw-r--r-- | hvac_demo/backend.config | 2 | ||||
-rw-r--r-- | rpm/BUILD/.gitignore | 4 | ||||
-rw-r--r-- | rpm/RPMS/.gitignore | 4 | ||||
-rw-r--r-- | rpm/SOURCES/.gitignore | 4 | ||||
-rw-r--r-- | rpm/SPECS/.gitignore | 4 | ||||
-rw-r--r-- | rpm/SPECS/rvi-0.2.spec (renamed from rpm/rvi-0.2.spec) | 5 | ||||
-rw-r--r-- | rpm/SRPMS/.gitignore | 4 | ||||
-rwxr-xr-x | rpm/rvi | 45 | ||||
-rw-r--r-- | tizen_vehicle.config | 2 |
10 files changed, 97 insertions, 13 deletions
@@ -1,7 +1,14 @@ # +# Copyright (C) 2014, Jaguar Land Rover +# +# This program is licensed under the terms and conditions of the +# Mozilla Public License, version 2.0. The full text of the +# Mozilla Public License is at https://www.mozilla.org/MPL/2.0/ +# + +# # Makefile for the RVI node. # -# .PHONY: all deps compile clean rpm rpmclean @@ -26,12 +33,21 @@ clean: rpmclean ./rebar clean rpmclean: - rm -rf ./rpm/BUILD ./rpm/BUILDROOT ./rpm/RPM ./rpm/RPMS - rm -rf ./rpm/SOURCES ./rpm/SPECS ./rpm/SRPM ./rpm/SRPMS - -rpm: deps compile - ./setup_rvi_node.sh -n rvi-$(VERSION) -c rvi_sample.config - mkdir -p ./rpm/BUILD ./rpm/BUILDROOT ./rpm/RPM ./rpm/RPMS - mkdir -p ./rpm/SOURCES ./rpm/SPECS ./rpm/SRPM ./rpm/SRPMS - (cd rel; tar czf ../rpm/SOURCES/rvi-$(VERSION).tgz rvi-$(VERSION)) - rpmbuild --define "_topdir $$PWD/rpm" -ba rpm/rvi-0.2.spec + rm -rf ./rpm/BUILD/* \ + ./rpm/BUILDROOT/* \ + ./rpm/RPMS/* \ + ./rpm/SOURCES/* \ + ./rpm/SRPMS/* + + +# Create a SOURCES tarball for RPM +rpm_tarball: rpmclean clean + tar czf /tmp/rvi-$(VERSION).tgz BUILD.md CONFIGURE.md doc \ + hvac_demo LICENSE Makefile README.md rebar rebar.config rel \ + RELEASE.md rpm rvi_node.sh rvi_sample.config setup_rvi_node.sh \ + src tizen_vehicle.config TODO + mv /tmp/rvi-$(VERSION).tgz ./rpm/SOURCES/ + + +rpm: rpm_tarball + rpmbuild --define "_topdir $$PWD/rpm" -ba rpm/SPECS/rvi-$(VERSION).spec diff --git a/hvac_demo/backend.config b/hvac_demo/backend.config index e07d7c3..68aa837 100644 --- a/hvac_demo/backend.config +++ b/hvac_demo/backend.config @@ -94,7 +94,7 @@ %% The bert_rpc_server port will be used to listen to incoming %% traffic from remote nodes. %% Must match the port given in node_address - { bert_rpc_server, [ {port, 8817 }]} + { bert_rpc_server, [ {port, 8807 }]} ] } diff --git a/rpm/BUILD/.gitignore b/rpm/BUILD/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/rpm/BUILD/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/rpm/RPMS/.gitignore b/rpm/RPMS/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/rpm/RPMS/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/rpm/SOURCES/.gitignore b/rpm/SOURCES/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/rpm/SOURCES/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/rpm/SPECS/.gitignore b/rpm/SPECS/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/rpm/SPECS/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/rpm/rvi-0.2.spec b/rpm/SPECS/rvi-0.2.spec index 920bb28..2e7d335 100644 --- a/rpm/rvi-0.2.spec +++ b/rpm/SPECS/rvi-0.2.spec @@ -20,9 +20,12 @@ environment. # %prep -%setup +%setup -c rvi-$RPM_PACKAGE_VERSION %build +make deps +make compile +./setup_rvi_node.sh -n rvi-$RPM_PACKAGE_VERSION -c rvi_sample.config %install rm -rf $RPM_BUILD_ROOT diff --git a/rpm/SRPMS/.gitignore b/rpm/SRPMS/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/rpm/SRPMS/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore @@ -0,0 +1,45 @@ +#! /bin/sh +# +# Copyright (C) 2014, Jaguar Land Rover +# +# This program is licensed under the terms and conditions of the +# Mozilla Public License, version 2.0. The full text of the +# Mozilla Public License is at https://www.mozilla.org/MPL/2.0/ +# + +export PATH="/bin/:/usr/bin:/sbin:/usr/sbin" +. /lib/lsb/init-functions + +set -e + +case "$1" in + start) + log_daemon_msg "Starting Remote Vehicle Interaction Node..." "rvi" + if /opt/rvi-0.2/rvi/bin/rvi start; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + stop) + log_daemon_msg "Stopping Remote Vehicle Interaction Node..." "rvi" + if /opt/rvi-0.2/rvi/bin/rvi stop; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + restart) + log_daemon_msg "Restarting Remote Vehicle Interaction Node..." "rvi" + if /opt/rvi-0.2/rvi/bin/rvi restart; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + *) + log_action_msg "Usage: /etc/init.d/sdbd {start|stop|restart}" + exit 1 +esac + +exit 0 diff --git a/tizen_vehicle.config b/tizen_vehicle.config index ab00d00..72d0d57 100644 --- a/tizen_vehicle.config +++ b/tizen_vehicle.config @@ -166,7 +166,7 @@ { data_link, [ { url, "http://127.0.0.1:8816" }, { exo_http_opts, [ { port, 8816 } ] }, - { bert_rpc_client, [ {port, 8817 }]} + { bert_rpc_server, [ {port, 8817 }]} ] } ] |