aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonan Le Martret <ronan.lemartret@iot.bzh>2017-06-07 14:22:21 +0200
committerRonan Le Martret <ronan.lemartret@iot.bzh>2017-06-07 14:22:21 +0200
commitb19816ca72db0dd66d820dc2afaa3a5c0cc67fa0 (patch)
tree4b23c9284b7881cccc552851c82d641ce524844b
parent2cca6592aa29a043c5bb4e41a24d79a9626f2299 (diff)
add packaging
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
-rw-r--r--README.md13
-rw-r--r--packaging/debian.changelog5
-rw-r--r--packaging/debian.compat1
-rw-r--r--packaging/debian.control27
-rw-r--r--packaging/debian.rules80
-rw-r--r--packaging/debian.unicens-agent-bin.install1
-rw-r--r--packaging/unicens-agent.spec54
-rw-r--r--packaging/unicens2-binding.dsc25
8 files changed, 204 insertions, 2 deletions
diff --git a/README.md b/README.md
index f1cd7b5..bf82f3f 100644
--- a/README.md
+++ b/README.md
@@ -16,10 +16,10 @@ AFB_daemon dependency on Standard Linux Distributions
libopenssl-devel libgcrypt-devel libgnutls-devel (optional but requested by libmicrohttpd for https)
OpenSuse >=42.2
- zypper in gcc5 gdb gcc5-c++ git make ElectricFence systemd-devel libopenssl-devel libuuid-devel alsa-devel libgcrypt-devel libgnutls-devel libjson-c-devel file-devel
+ zypper in gcc5 gdb gcc5-c++ git make ElectricFence systemd-devel libopenssl-devel libuuid-devel alsa-devel libgcrypt-devel libgnutls-devel libjson-c-devel file-devel mxml-devel
Ubuntu >= 16.4 libuuid-devel
- apt-get install cmake git electric-fence libsystemd-dev libssl-dev uuid-dev libasound2-dev libgcrypt20-dev libgnutls-dev libgnutls-dev libjson-c-dev libmagic-dev
+ apt-get install cmake git electric-fence libsystemd-dev libssl-dev uuid-dev libasound2-dev libgcrypt20-dev libgnutls-dev libgnutls-dev libjson-c-dev libmagic-dev libmxml-dev
libmicrohttpd>=0.9.54 (as today OpenSuse-42.2 or Ubuntu-.16.4 ship older versions)
afb-daemon from AGL Gerrit git clone https://gerrit.automotivelinux.org/gerrit/src/app-framework-binder
@@ -75,6 +75,15 @@ AFB_daemon dependency on Standard Linux Distributions
firefox http://localhost:1234
```
+# Archive
+
+```
+VERSION=0.1
+GIT_TAG=master
+PKG_NAME=unicens-agent
+git archive --format=tar.gz --prefix=${PKG_NAME}-${VERSION}/ ${GIT_TAG} -o ${PKG_NAME}_${VERSION}.orig.tar.gz
+```
+
# Local Source Debug with GDB
Warning: technically AGL bindings are shared libraries loaded thought 'dlopen'. GDB supports source debug of dynamically
diff --git a/packaging/debian.changelog b/packaging/debian.changelog
new file mode 100644
index 0000000..50bfd63
--- /dev/null
+++ b/packaging/debian.changelog
@@ -0,0 +1,5 @@
+unicens2-binding (0.1-0) unstable; urgency=low
+
+ * init build
+
+ -- Ronan Le Martret <ronan.lemartret@iot.bzh> Mon, 25 Dec 2007 10:50:38 +0100
diff --git a/packaging/debian.compat b/packaging/debian.compat
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/packaging/debian.compat
@@ -0,0 +1 @@
+8
diff --git a/packaging/debian.control b/packaging/debian.control
new file mode 100644
index 0000000..5e52b16
--- /dev/null
+++ b/packaging/debian.control
@@ -0,0 +1,27 @@
+Priority: optional
+Maintainer: Ronan Le Martret <ronan.lemartret@iot.bzh>
+Source: unicens2-binding
+Build-Depends: debhelper (>= 5),
+ libmicrohttpd-dev ,
+ cmake,
+ libsystemd-dev,
+ libssl-dev,
+ gcc,
+ g++,
+ libjson-c-dev,
+ electric-fence,
+ uuid-dev,
+ libasound2-dev,
+ libgcrypt20-dev,
+ libmagic-dev,
+ libmxml-dev,
+ app-framework-binder-bin,
+ app-framework-binder-dev
+Standards-Version: 3.8.2
+Homepage: https://github.com/iotbzh/unicens-agent
+
+Package: unicens2-binding
+Section: libs
+Architecture: any
+Depends: electric-fence
+Description: unicens2-binding
diff --git a/packaging/debian.rules b/packaging/debian.rules
new file mode 100644
index 0000000..a8a7ba9
--- /dev/null
+++ b/packaging/debian.rules
@@ -0,0 +1,80 @@
+#!/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 ../ -DBINDINGS_INSTALL_PREFIX:PATH=/usr/lib;$(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
+ cd build;make install DESTDIR=/usr/src/packages/BUILD/debian/tmp
+ # 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
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
diff --git a/packaging/debian.unicens-agent-bin.install b/packaging/debian.unicens-agent-bin.install
new file mode 100644
index 0000000..0f6fe5c
--- /dev/null
+++ b/packaging/debian.unicens-agent-bin.install
@@ -0,0 +1 @@
+/usr/lib/unicens-agent/afb-ucs2.so
diff --git a/packaging/unicens-agent.spec b/packaging/unicens-agent.spec
new file mode 100644
index 0000000..fa0f5a0
--- /dev/null
+++ b/packaging/unicens-agent.spec
@@ -0,0 +1,54 @@
+###########################################################################
+# Copyright 2015, 2016, 2017 IoT.bzh
+#
+# author: Fulup Ar Foll <fulup@iot.bzh>
+#
+# 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: unicens-agent
+Version: 0.1
+Release: 1
+License: Apache-V2
+Summary: Expose MicroChip UnicensV2 through AGL AppFw
+Url: https://github.com/iotbzh/unicens-agent
+Source0: %{name}_%{version}.orig.tar.gz
+
+Prefix: /opt/unicens-agent
+BuildRequires: cmake
+BuildRequires: gcc gcc-c++
+BuildRequires: pkgconfig(libsystemd) >= 222,
+BuildRequires: pkgconfig(libmicrohttpd) >= 0.9.54
+BuildRequires: pkgconfig(afb-daemon), pkgconfig(json-c), pkgconfig(mxml)
+
+BuildRoot:%{_tmppath}/%{name}-%{version}-build
+
+%description
+Expose MicroChip UnicensV2 through AGL AppFw
+
+%prep
+%setup -q
+
+%build
+%cmake -DBINDINGS_INSTALL_PREFIX:PATH=%{_libdir}
+%__make %{?_smp_mflags}
+
+%install
+[ -d build ] && cd build
+%make_install
+
+%files
+%defattr(-,root,root)
+%dir %{_libdir}/unicens-agent
+%{_libdir}/unicens-agent/afb-ucs2.so
diff --git a/packaging/unicens2-binding.dsc b/packaging/unicens2-binding.dsc
new file mode 100644
index 0000000..16f31ee
--- /dev/null
+++ b/packaging/unicens2-binding.dsc
@@ -0,0 +1,25 @@
+Format: 0.1
+Source: unicens-agent
+Binary: unicens-agent-bin
+Architecture: any
+Version: 2.0-0
+Maintainer: Ronan Le Martret <ronan.lemartret@iot.bzh>
+Standards-Version: 3.8.2
+Homepage: https://github.com/iotbzh/unicens-agent
+Build-Depends: debhelper (>= 5),
+ libmicrohttpd-dev ,
+ cmake,
+ libsystemd-dev,
+ libssl-dev,
+ gcc,
+ g++,
+ libjson-c-dev,
+ electric-fence,
+ uuid-dev,
+ libasound2-dev,
+ libgcrypt20-dev,
+ libmagic-dev,
+ libmxml-dev,
+ app-framework-binder-bin,
+ app-framework-binder-dev
+Debtransform-Tar: unicens-agent_0.1.orig.tar.gz