summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-09-05 15:46:04 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-09-13 15:42:16 +0200
commit6849b490ccfe2f5ed2bb577758edf30445691378 (patch)
tree5a4194f86623ec1b78c13d16f04eef59dac96b81
parentf1ba9d6e9a69a5982ea4821a6b78f0ca5f224bc7 (diff)
Add packaging files used by OBS.
xds-server is now packaging in OBS: https://build.opensuse.org/package/show/isv:LinuxAutomotive:app-Development/agl-xds-server Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
-rw-r--r--Makefile7
-rw-r--r--conf.d/.config/xds/server/config.json12
-rw-r--r--conf.d/etc/default/xds-server11
-rw-r--r--conf.d/service/xds-server.service2
-rw-r--r--config.json.in4
5 files changed, 30 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index c46aaf4..d731be4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# Makefile used to build XDS daemon Web Server
# Application Version
-VERSION := 0.2.1
+VERSION := 0.2.2
# Syncthing version to install
SYNCTHING_VERSION = 0.14.28
@@ -36,7 +36,7 @@ ifeq ($(origin DESTDIR), undefined)
DESTDIR := /usr/local/bin
endif
ifeq ($(origin DESTDIR_WWW), undefined)
- DESTDIR_WWW := $(DESTDIR)/www-xds-server
+ DESTDIR_WWW := $(DESTDIR)/www
endif
HOST_GOOS=$(shell go env GOOS)
@@ -145,7 +145,8 @@ install:
.PHONY: package
package: clean
make -f $(ROOT_SRCDIR)/Makefile all install DESTDIR=$(PACKAGE_DIR)/xds-server
- make -f $(ROOT_SRCDIR)/Makefile conffile DESTDIR=$(PACKAGE_DIR)/xds-server DESTDIR_WWW=www-xds-server
+ make -f $(ROOT_SRCDIR)/Makefile conffile DESTDIR=$(PACKAGE_DIR)/xds-server DESTDIR_WWW=www
+ cp -r $(ROOT_SRCDIR)/conf.d $(PACKAGE_DIR)/xds-server
rm -f $(ROOT_SRCDIR)/$(PACKAGE_ZIPFILE)
(cd $(PACKAGE_DIR) && zip -r $(ROOT_SRCDIR)/$(PACKAGE_ZIPFILE) ./xds-server)
diff --git a/conf.d/.config/xds/server/config.json b/conf.d/.config/xds/server/config.json
new file mode 100644
index 0000000..19700cf
--- /dev/null
+++ b/conf.d/.config/xds/server/config.json
@@ -0,0 +1,12 @@
+{
+ "webAppDir": "www",
+ "httpPort": "8000",
+ "shareRootDir": "${HOME}/.xds/share",
+ "logsDir": "/tmp/xds-server/logs",
+ "sdkRootDir": "/xdt/sdk",
+ "syncthing": {
+ "binDir": "",
+ "home": "${HOME}/.xds/syncthing-config",
+ "gui-address": "http://localhost:8384"
+ }
+}
diff --git a/conf.d/etc/default/xds-server b/conf.d/etc/default/xds-server
new file mode 100644
index 0000000..858530d
--- /dev/null
+++ b/conf.d/etc/default/xds-server
@@ -0,0 +1,11 @@
+# defaults file for XDS Server
+# this file is used for service environment in /lib/systemd/system/xds-server.service
+
+# JSON config file to use
+#APP_CONFIG=/home/devel/.config/xds/server/config.json
+
+# Logging level (supported levels: panic, fatal, error, warn, info, debug)
+#LOG_LEVEL=info
+
+# Filename where logs will be redirected (default stdout)
+#LOG_FILENAME=/tmp/xds/logs/xds-server.logs
diff --git a/conf.d/service/xds-server.service b/conf.d/service/xds-server.service
index 378de97..e938d3f 100644
--- a/conf.d/service/xds-server.service
+++ b/conf.d/service/xds-server.service
@@ -5,7 +5,7 @@ Description=XDS Server
User=devel
Type=forking
EnvironmentFile=-/etc/default/xds-server
-ExecStart=/usr/local/bin/xds-server-start.sh
+ExecStart=/opt/AGL/xds/xds-server-start.sh
[Install]
WantedBy=multi-user.target
diff --git a/config.json.in b/config.json.in
index 1668e05..274c7b4 100644
--- a/config.json.in
+++ b/config.json.in
@@ -1,12 +1,12 @@
{
"webAppDir": "webapp/dist",
"httpPort": "8000",
- "shareRootDir": "${ROOT_DIR}/tmp/builder_dev_host/share",
+ "shareRootDir": "${HOME}/.xds/share",
"logsDir": "/tmp/xds-server/logs",
"sdkRootDir": "/xdt/sdk",
"syncthing": {
"binDir": "./bin",
- "home": "${ROOT_DIR}/tmp/builder_dev_host/syncthing-config",
+ "home": "${HOME}/.xds/syncthing-config",
"gui-address": "http://localhost:8384"
}
}