aboutsummaryrefslogtreecommitdiffstats
path: root/conf.d/packaging
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-04-12 09:42:39 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-07-10 23:59:53 +0200
commitd67d4335f05635d06b433f7d3fa0f6a4e401ec92 (patch)
treeb5d57ea1620278f65008f8faf34648f58d04da42 /conf.d/packaging
Initial commit
Change-Id: Ia434e5b4869ea19b0b78b1c586c44c15cb93c7e8 Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'conf.d/packaging')
-rw-r--r--conf.d/packaging/agl-xds-service.dsc18
-rw-r--r--conf.d/packaging/agl-xds-service.spec66
-rw-r--r--conf.d/packaging/debian.agl-xds-service.install2
-rw-r--r--conf.d/packaging/debian.changelog5
-rw-r--r--conf.d/packaging/debian.compat1
-rw-r--r--conf.d/packaging/debian.control19
-rw-r--r--conf.d/packaging/debian.rules87
7 files changed, 198 insertions, 0 deletions
diff --git a/conf.d/packaging/agl-xds-service.dsc b/conf.d/packaging/agl-xds-service.dsc
new file mode 100644
index 0000000..d99d92d
--- /dev/null
+++ b/conf.d/packaging/agl-xds-service.dsc
@@ -0,0 +1,18 @@
+Format: 1.0
+Source: agl-xds-service
+Binary: agl-xds-service-bin
+Architecture: any
+Version: 2.0-0
+Maintainer: Iot-Team <secretaria@iot.bzh>
+Standards-Version: 3.8.2
+Homepage: https://github.com/iotbzh/xds-service
+Build-Depends: debhelper (>= 5),
+ pkg-config,
+ cmake,
+ gcc,
+ g++,
+ libjson-c-dev ,
+ libsystemd-dev (>= 222),
+ agl-app-framework-binder-dev ,
+ agl-libmicrohttpd-dev (>= 0.9.55)
+Debtransform-Tar: agl-xds-service_1.0.orig.tar.gz
diff --git a/conf.d/packaging/agl-xds-service.spec b/conf.d/packaging/agl-xds-service.spec
new file mode 100644
index 0000000..b8b96ab
--- /dev/null
+++ b/conf.d/packaging/agl-xds-service.spec
@@ -0,0 +1,66 @@
+###########################################################################
+# Copyright 2018 IoT.bzh
+#
+# author: Iot-Team <secretaria@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: agl-xds-service
+Version: 1.0
+Release: 1
+Group: AGL
+License: APL2.0
+Summary: Provide an AGL XDS collector Binding
+Url: https://github.com/iotbzh/xds-service
+Source0: %{name}_%{version}.orig.tar.gz
+
+BuildRequires: cmake
+BuildRequires: gcc gcc-c++
+BuildRequires: pkgconfig(json-c)
+BuildRequires: pkgconfig(libsystemd) >= 222
+BuildRequires: pkgconfig(afb-daemon)
+BuildRequires: pkgconfig(libmicrohttpd) >= 0.9.55
+
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+%define _prefix /opt/AGL/xds-service
+%define __cmake cmake
+
+%description
+Provide an AGL xds collector Binding
+
+%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/conf.d/packaging/debian.agl-xds-service.install b/conf.d/packaging/debian.agl-xds-service.install
new file mode 100644
index 0000000..5858efd
--- /dev/null
+++ b/conf.d/packaging/debian.agl-xds-service.install
@@ -0,0 +1,2 @@
+/opt/AGL/*
+/etc/profile.d/*
diff --git a/conf.d/packaging/debian.changelog b/conf.d/packaging/debian.changelog
new file mode 100644
index 0000000..721428c
--- /dev/null
+++ b/conf.d/packaging/debian.changelog
@@ -0,0 +1,5 @@
+agl-xds-service (1.0-0) UNRELEASED; urgency=low
+
+ * init build
+
+ -- Iot-Team <secretaria@iot.bzh> Mon, 2 Apr 2018 10:50:38 +0100
diff --git a/conf.d/packaging/debian.compat b/conf.d/packaging/debian.compat
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/conf.d/packaging/debian.compat
@@ -0,0 +1 @@
+8
diff --git a/conf.d/packaging/debian.control b/conf.d/packaging/debian.control
new file mode 100644
index 0000000..aab9de9
--- /dev/null
+++ b/conf.d/packaging/debian.control
@@ -0,0 +1,19 @@
+Priority: optional
+Maintainer: Iot-Team <secretaria@iot.bzh>
+Source: agl-xds-service
+Build-Depends: debhelper (>= 5),
+ pkg-config,
+ cmake,
+ gcc,
+ g++,
+ libjson-c-dev ,
+ libsystemd-dev (>= 222),
+ agl-app-framework-binder-dev ,
+ agl-libmicrohttpd-dev (>= 0.9.55)
+Standards-Version: 3.8.2
+Homepage: https://github.com/iotbzh/xds-service
+
+Package: agl-xds-service
+Section: libs
+Architecture: any
+Description: Provide an AGL xds Binding
diff --git a/conf.d/packaging/debian.rules b/conf.d/packaging/debian.rules
new file mode 100644
index 0000000..7a5bcb6
--- /dev/null
+++ b/conf.d/packaging/debian.rules
@@ -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/xds-service -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/xds-service;cd build;make populate;cp -r package/* ../debian/tmp/opt/AGL/xds-service/
+ mkdir -p debian/tmp/etc/profile.d
+ echo '#---------- AGL xds-service options Start ---------" ' > debian/tmp/etc/profile.d/AGL_xds-service.sh
+ echo '# Object: AGL cmake option for binder/bindings' >> debian/tmp/etc/profile.d/AGL_xds-service.sh
+ echo 'export LD_LIBRARY_PATH=/opt/AGL/xds-service/lib/$(DEB_HOST_MULTIARCH):$$LD_LIBRARY_PATH' >> debian/tmp/etc/profile.d/AGL_xds-service.sh
+ echo 'export LIBRARY_PATH=/opt/AGL/xds-service/lib/$(DEB_HOST_MULTIARCH):$$LIBRARY_PATH' >> debian/tmp/etc/profile.d/AGL_xds-service.sh
+ echo 'export PATH=/opt/AGL/xds-service/bin:$$PATH' >> debian/tmp/etc/profile.d/AGL_xds-service.sh
+ echo '#---------- AGL options End ---------' >> debian/tmp/etc/profile.d/AGL_xds-service.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