diff options
author | Loïc Collignon <loic.collignon@iot.bzh> | 2017-10-24 13:34:38 +0200 |
---|---|---|
committer | Loïc Collignon <loic.collignon@iot.bzh> | 2017-10-24 13:34:38 +0200 |
commit | 97325dd67f3b7858bd093fc161d0a56e7c7bc9bd (patch) | |
tree | 6478f34c28889205ddd7f000e3dd75aef68316cd /ll-database-binding/conf.d/app-templates/template.d | |
parent | 4f50493fc0ef4d0c33124ebf52908849196ad685 (diff) |
replaced store binding with a database binding based on a berkeley db
Change-Id: I03978ecbf996ebc6d53a88dfd2b275051080016f
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'll-database-binding/conf.d/app-templates/template.d')
12 files changed, 292 insertions, 0 deletions
diff --git a/ll-database-binding/conf.d/app-templates/template.d/config.xml.in b/ll-database-binding/conf.d/app-templates/template.d/config.xml.in new file mode 100644 index 0000000..35d20b8 --- /dev/null +++ b/ll-database-binding/conf.d/app-templates/template.d/config.xml.in @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<widget xmlns="http://www.w3.org/ns/widgets" id="@PROJECT_NAME@" version="@PROJECT_VERSION@"> + <name>@PROJECT_NAME@</name> + <icon src="@PROJECT_ICON@"/> + <content src="@WIDGET_ENTRY_POINT@" type="@WIDGET_TYPE@"/> + <description>@PROJECT_DESCRIPTION@</description> + <author>@PROJECT_AUTHOR@ <@PROJECT_AUTHOR_MAIL@></author> + <license>@PROJECT_LICENSE@</license> +</widget> diff --git a/ll-database-binding/conf.d/app-templates/template.d/deb-config.dsc.in b/ll-database-binding/conf.d/app-templates/template.d/deb-config.dsc.in new file mode 100644 index 0000000..28a4835 --- /dev/null +++ b/ll-database-binding/conf.d/app-templates/template.d/deb-config.dsc.in @@ -0,0 +1,15 @@ +Format: @PROJECT_VERSION@ +Source: @NPKG_PROJECT_NAME@ +Binary: @NPKG_PROJECT_NAME@-bin +Architecture: any +Version: 2.0-0 +Maintainer: @PROJECT_AUTHOR@ <@PROJECT_AUTHOR_MAIL@> +Standards-Version: 3.8.2 +Homepage: @PROJECT_URL@ +Build-Depends: debhelper (>= 5), + pkg-config, + cmake, + gcc, + g++, +@DEB_PKG_DEPS@ +Debtransform-Tar: @NPKG_PROJECT_NAME@_@PROJECT_VERSION@.orig.tar.gz diff --git a/ll-database-binding/conf.d/app-templates/template.d/deb-config.install.in b/ll-database-binding/conf.d/app-templates/template.d/deb-config.install.in new file mode 100644 index 0000000..5858efd --- /dev/null +++ b/ll-database-binding/conf.d/app-templates/template.d/deb-config.install.in @@ -0,0 +1,2 @@ +/opt/AGL/* +/etc/profile.d/* diff --git a/ll-database-binding/conf.d/app-templates/template.d/debian.changelog.in b/ll-database-binding/conf.d/app-templates/template.d/debian.changelog.in new file mode 100644 index 0000000..f72c717 --- /dev/null +++ b/ll-database-binding/conf.d/app-templates/template.d/debian.changelog.in @@ -0,0 +1,5 @@ +@NPKG_PROJECT_NAME@ (@PROJECT_VERSION@-0) UNRELEASED; urgency=low + + * init build + + -- @PROJECT_AUTHOR@ <@PROJECT_AUTHOR_MAIL@> Mon, 25 Dec 2007 10:50:38 +0100 diff --git a/ll-database-binding/conf.d/app-templates/template.d/debian.compat.in b/ll-database-binding/conf.d/app-templates/template.d/debian.compat.in new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/ll-database-binding/conf.d/app-templates/template.d/debian.compat.in @@ -0,0 +1 @@ +8 diff --git a/ll-database-binding/conf.d/app-templates/template.d/debian.control.in b/ll-database-binding/conf.d/app-templates/template.d/debian.control.in new file mode 100644 index 0000000..ea4ad8a --- /dev/null +++ b/ll-database-binding/conf.d/app-templates/template.d/debian.control.in @@ -0,0 +1,16 @@ +Priority: optional +Maintainer: @PROJECT_AUTHOR@ <@PROJECT_AUTHOR_MAIL@> +Source: @NPKG_PROJECT_NAME@ +Build-Depends: debhelper (>= 5), + pkg-config, + cmake, + gcc, + g++, +@DEB_PKG_DEPS@ +Standards-Version: 3.8.2 +Homepage: @PROJECT_URL@ + +Package: @NPKG_PROJECT_NAME@ +Section: libs +Architecture: any +Description: @PROJECT_DESCRIPTION@ diff --git a/ll-database-binding/conf.d/app-templates/template.d/debian.rules.in b/ll-database-binding/conf.d/app-templates/template.d/debian.rules.in new file mode 100644 index 0000000..6bb2825 --- /dev/null +++ b/ll-database-binding/conf.d/app-templates/template.d/debian.rules.in @@ -0,0 +1,87 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + # + touch configure-stamp + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + mkdir -p build + cd build;cmake ../ -DCMAKE_INSTALL_PREFIX:PATH=/opt/AGL/@PROJECT_NAME@ -DCMAKE_INSTALL_LIBDIR:PATH=lib/$(DEB_HOST_MULTIARCH);$(MAKE) + # + touch build-stamp + +clean: + #dh_testdir + dh_testroot + rm -f configure-stamp build-stamp + [ ! -f Makefile ] || $(MAKE) distclean + #dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + # Add here commands to install the package into debian/tmp + mkdir -p debian/tmp/opt/AGL/@PROJECT_NAME@;cd build;make populate;cp -r package/* ../debian/tmp/opt/AGL/@PROJECT_NAME@/ + mkdir -p debian/tmp/etc/profile.d + echo '#---------- AGL @PROJECT_NAME@ options Start ---------" ' > debian/tmp/etc/profile.d/AGL_@PROJECT_NAME@.sh + echo '# Object: AGL cmake option for binder/bindings' >> debian/tmp/etc/profile.d/AGL_@PROJECT_NAME@.sh + echo 'export LD_LIBRARY_PATH=/opt/AGL/@PROJECT_NAME@/lib/$(DEB_HOST_MULTIARCH):$$LD_LIBRARY_PATH' >> debian/tmp/etc/profile.d/AGL_@PROJECT_NAME@.sh + echo 'export LIBRARY_PATH=/opt/AGL/@PROJECT_NAME@/lib/$(DEB_HOST_MULTIARCH):$$LIBRARY_PATH' >> debian/tmp/etc/profile.d/AGL_@PROJECT_NAME@.sh + echo 'export PATH=/opt/AGL/@PROJECT_NAME@/bin:$$PATH' >> debian/tmp/etc/profile.d/AGL_@PROJECT_NAME@.sh + echo '#---------- AGL options End ---------' >> debian/tmp/etc/profile.d/AGL_@PROJECT_NAME@.sh + # Move all files in their corresponding package + dh_install --list-missing -s --sourcedir=debian/tmp + # empty dependency_libs in .la files + #sed -i "/dependency_libs/ s/'.*'/''/" `find debian/ -name '*.la'` + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_makeshlibs -V + dh_installdeb + dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/ll-database-binding/conf.d/app-templates/template.d/gdb-on-target.ini.in b/ll-database-binding/conf.d/app-templates/template.d/gdb-on-target.ini.in new file mode 100644 index 0000000..20c8d30 --- /dev/null +++ b/ll-database-binding/conf.d/app-templates/template.d/gdb-on-target.ini.in @@ -0,0 +1,39 @@ +# gdb-remote.init file for IDE +# Object: allow to use standard gdb to remote debug a target +# Usage: remote-target-populate update script under ./build directory +# Author: Fulup Ar Foll (IoT.bzh) +# Reference: https://blog.flameeyes.eu/2010/02/remote-debugging-with-gdb-part-2-gdb/ +# +# Warning: +# - on target start with $GDB ./target/gdb-cross-root@$TARGET.ini +# - Netbeans impose debug-command to point on a local instance of afb-daemon binary +# - --ldpath should be absolute as solib-search-path refuse to work as documented + +# xds-gdb annotation to point where it should +# :XDS-ENV: XDS_PROJECT_ID=@XDS_PROJECT_ID@ +# :XDS-ENV: XDS_SDK_ID=@XDS_SDK_ID@ +# :XDS-ENV: XDS_SERVER_URL=@XDS_SERVER_URL@ + +# Start gdbserver on target and connect through SSH link WARNING: +target remote | ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null @RSYNC_TARGET@ gdbserver - \ + /usr/bin/afb-daemon --port=@AFB_REMPORT@ --workdir=@RSYNC_PREFIX@/@PROJECT_NAME@ --roothttp=htdocs --ldpaths=@RSYNC_PREFIX@/@PROJECT_NAME@/lib --verbose --token=@AFB_TOKEN@ + +# Disable auto answer no on questions and to set breakpoint +set confirm off + +# Disable auto load of libraries to improved perf +set auto-solib-add off + +# Define path for project libraries +set solib-search-path ${PROJECT_PKG_BUILD_DIR} + +# Replace run by continue done by xds-gdb + +# Manually load project libraries when loaded by afb-daemon +tbreak @GDB_INITIAL_BREAK@ +commands +sharedlibrary @RSYNC_PREFIX@/@PROJECT_NAME@ +continue +end + + diff --git a/ll-database-binding/conf.d/app-templates/template.d/install-wgt-on-target.sh.in b/ll-database-binding/conf.d/app-templates/template.d/install-wgt-on-target.sh.in new file mode 100755 index 0000000..39a69d5 --- /dev/null +++ b/ll-database-binding/conf.d/app-templates/template.d/install-wgt-on-target.sh.in @@ -0,0 +1,19 @@ +#!/bin/sh +# +# File: install-wgt-on-target.sh +# Author: Sebastien Douheret @ IoT.bzh +# Object: install widget on target +# Created on 24-May-2017, 09:23:37 +# Usage: + +# Do not change manually use 'make remote-target-populate' +export RSYNC_TARGET=@RSYNC_TARGET@ +export WGT_FILE_L=@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.wgt +export WGT_FILE_T=/tmp/@PROJECT_NAME@.wgt + +scp $WGT_FILE_L $RSYNC_TARGET:$WGT_FILE_T \ + && ssh -o "StrictHostKeyChecking no" -tt $RSYNC_TARGET -- \ + afm-util install $WGT_FILE_T + +# && rm -f $WGT_FILE_T + diff --git a/ll-database-binding/conf.d/app-templates/template.d/rpm-config.spec.in b/ll-database-binding/conf.d/app-templates/template.d/rpm-config.spec.in new file mode 100644 index 0000000..34a605d --- /dev/null +++ b/ll-database-binding/conf.d/app-templates/template.d/rpm-config.spec.in @@ -0,0 +1,62 @@ +########################################################################### +# Copyright 2015, 2016, 2017 IoT.bzh +# +# author: @PROJECT_AUTHOR@ <@PROJECT_AUTHOR_MAIL@> +# +# 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. +########################################################################### + + +Name: @NPKG_PROJECT_NAME@ +Version: @PROJECT_VERSION@ +Release: 1 +Group: AGL +License: @PROJECT_LICENSE@ +Summary: @PROJECT_DESCRIPTION@ +Url: @PROJECT_URL@ +Source0: %{name}_%{version}.orig.tar.gz + +BuildRequires: cmake +BuildRequires: gcc gcc-c++ +@RPM_PKG_DEPS@ + +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%define _prefix /opt/AGL/@PROJECT_NAME@ +%define __cmake cmake + +%description +@PROJECT_DESCRIPTION@ + +%prep +%setup -q + +%build +%cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_libdir} +make %{?_smp_mflags} + +%install +CURDIR=$(pwd) +[ -d build ] && cd build +make populate +mkdir -p %{?buildroot}%{_prefix} +cp -r package/* %{?buildroot}%{_prefix} + +cd $CURDIR +find %{?buildroot}%{_prefix} -type d -exec echo "%dir {}" \;>> pkg_file +find %{?buildroot}%{_prefix} -type f -exec echo "{}" \;>> pkg_file +sed -i 's@%{?buildroot}@@g' pkg_file + + +%files -f pkg_file +%defattr(-,root,root) diff --git a/ll-database-binding/conf.d/app-templates/template.d/start-on-target.sh.in b/ll-database-binding/conf.d/app-templates/template.d/start-on-target.sh.in new file mode 100755 index 0000000..9baab37 --- /dev/null +++ b/ll-database-binding/conf.d/app-templates/template.d/start-on-target.sh.in @@ -0,0 +1,25 @@ +#!/bin/sh +# +# File: start-on-target.sh +# Author: Fulup Ar Foll @ IoT.bzh +# Object: Forward signal (SIGTERM) to remote process +# Created on 24-May-2017, 09:23:37 +# Usage: remote-target-populate update script under ./build directory + +# Do not change manually use 'make remote-target-populate' +export RSYNC_TARGET=@RSYNC_TARGET@ +export PROJECT_NAME=@PROJECT_NAME@ +export RSYNC_PREFIX=@RSYNC_PREFIX@/@PROJECT_NAME@ +export AFB_REMPORT=@AFB_REMPORT@ +export AFB_TOKEN=@AFB_TOKEN@ + +exec ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -tt $RSYNC_TARGET << EOF + afb-daemon --workdir=$RSYNC_PREFIX --monitoring --port=$AFB_REMPORT --roothttp=./htdocs --ldpath=./lib --verbose --token=$AFB_TOKEN & + PID_DAEMON=\$! + trap "echo REMOTE-SIGNAL TRAP; kill -15 \$PID_DAEMON" INT QUIT TERM EXIT + echo "Target Process Waiting for command" + + # wait for daemon to finish + wait \$PID_DAEMON + exit +EOF diff --git a/ll-database-binding/conf.d/app-templates/template.d/xds-project-target.conf.in b/ll-database-binding/conf.d/app-templates/template.d/xds-project-target.conf.in new file mode 100644 index 0000000..814597c --- /dev/null +++ b/ll-database-binding/conf.d/app-templates/template.d/xds-project-target.conf.in @@ -0,0 +1,12 @@ +# +# Cmake generated Do Not Edit +# +# Template: conf.d/app-templates/template.d/xds-project.conf.in +# Values: $HOME/.config/app-templates/cmake/xx-projectname-xds.cmake +# +# WARNING: in Xdev mode $HOME is ~devel HOME on xds-docker +# +export XDS_SERVER_URL=@XDS_SERVER_URL@ +export XDS_PROJECT_ID=@XDS_PROJECT_ID@ +export XDS_SDK_ID=@XDS_SDK_ID@ + |