[Debian-iot-packaging] [alljoyn-thin-client-1604] 02/02: Imported Debian patch 16.04-1

Thorsten Alteholz alteholz at moszumanska.debian.org
Mon Jun 27 18:04:37 UTC 2016


This is an automated email from the git hooks/post-receive script.

alteholz pushed a commit to branch master
in repository alljoyn-thin-client-1604.

commit 159ddabe5aa78aed6054f34a5358547d2c18b9f4
Author: Thorsten Alteholz <debian at alteholz.de>
Date:   Sat Jun 25 12:28:32 2016 +0200

    Imported Debian patch 16.04-1
---
 debian/README.Debian                    |  16 ++
 debian/alljoyn-thin-client-1604.install |  30 +++
 debian/changelog                        |   5 +
 debian/clean                            |   1 +
 debian/compat                           |   1 +
 debian/control                          |  70 ++++++
 debian/copyright                        |  48 ++++
 debian/libajtcl1604.install             |   2 +
 debian/liballjoyntcl-dev-1604.install   |   4 +
 debian/patches/hardening.patch          |  26 ++
 debian/patches/remove-makefile.patch    | 410 ++++++++++++++++++++++++++++++++
 debian/patches/series                   |   3 +
 debian/patches/soname.patch             |  13 +
 debian/rules                            |  54 +++++
 debian/source/format                    |   1 +
 debian/watch                            |   3 +
 16 files changed, 687 insertions(+)

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..f9439a2
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,16 @@
+1604 for Debian
+
+This is the thin client package of Alljoyn.
+
+There are several parts of the Alljoyn framework which are developed by
+different Workgroup. As all workgroups develop with varying speeds,
+several versions of the core library are needed to be able to use all 
+parts of the framework.
+
+At the moment following versions of the thin client are needed:
+        15.04 -> alljoyn-thin-client-1504
+        15.09 -> alljoyn-thin-client-1509
+        16.04 -> alljoyn-thin-client-1604
+
+ -- Thorsten Alteholz <debian at alteholz.de>  Tue, 14 Jun 2016 18:28:32 +0200
+
diff --git a/debian/alljoyn-thin-client-1604.install b/debian/alljoyn-thin-client-1604.install
new file mode 100755
index 0000000..6afb60a
--- /dev/null
+++ b/debian/alljoyn-thin-client-1604.install
@@ -0,0 +1,30 @@
+#! /usr/bin/dh-exec
+dist/test/aesbench /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/test/aestest /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/test/ajlite /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/test/base64 /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/test/bastress2 /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/test/certificate /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/test/clientlite /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/test/codisco /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/test/ctrdrbg /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/test/mutter /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/test/nvramdump /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/test/nvrampersistencetest /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/test/nvramtest /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/test/sessions /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/test/sessionslite /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/test/siglite /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/test/sigtest /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/test/svclite /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/test
+dist/bin/SecureClient /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/bin
+dist/bin/SecureClientECDHE /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/bin
+dist/bin/SecureService /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/bin
+dist/bin/SecureServiceECDHE /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/bin
+dist/bin/basic_client /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/bin
+dist/bin/basic_service /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/bin
+dist/bin/eventaction_service /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/bin
+dist/bin/nameChange_client /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/bin
+dist/bin/signalConsumer_client /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/bin
+dist/bin/signal_service /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/bin
+dist/bin/net_bus /usr/lib/${DEB_HOST_MULTIARCH}/alljoyn/ajtcl/1604/bin
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..fcd87b9
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+alljoyn-thin-client-1604 (16.04-1) unstable; urgency=medium
+
+  * Initial release (Closes: #828130)
+
+ -- Thorsten Alteholz <debian at alteholz.de>  Sat, 25 Jun 2016 12:28:32 +0200
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..4a97dfa
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1 @@
+# You must remove unused comment lines for the released package.
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..e3b4b97
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,70 @@
+Source: alljoyn-thin-client-1604
+Section: net
+Priority: extra
+Maintainer: Thorsten Alteholz <debian at alteholz.de>
+Build-Depends: dh-exec (>=0.3)
+               , debhelper (>=9)
+	       , liballjoyn-common-dev-1604
+	       , liballjoyn-dev-1604
+               , scons
+               , libssl-dev
+               , libgtest-dev
+#	       , javahelper
+#	       , junit
+#	       , libcsv-java
+#	       , libmatthew-debug-java
+#	       , libitext-java
+#               , ant
+#               , libcap-dev
+Standards-Version: 3.9.8
+Homepage: https://allseenalliance.org/framework
+
+Package: alljoyn-thin-client-1604
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libajtcl1604 (= ${binary:Version})
+Description: AllJoyn thin client for 1604
+ AllJoyn is a collaborative open-source software framework that makes 
+ it easy for developers to write applications that can discover nearby
+ devices, and communicate with each other directly regardless of 
+ brands, categories, transports, and OSes without the need of the cloud. 
+ .
+ The AllJoyn framework is extremely flexible with many features to help 
+ make the vision of the Internet of Things come to life.
+ .
+ This package contains the software for the thin-client 
+ in version 1604.
+
+
+# this package name is the upstream soname
+Package: libajtcl1604
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: AllJoyn thin client library
+ AllJoyn is a collaborative open-source software framework that makes 
+ it easy for developers to write applications that can discover nearby
+ devices, and communicate with each other directly regardless of 
+ brands, categories, transports, and OSes without the need of the cloud. 
+ .
+ The AllJoyn framework is extremely flexible with many features to help 
+ make the vision of the Internet of Things come to life.
+ .
+ This package contains the libraries for the thin client
+ in version 1604.
+
+Package: liballjoyntcl-dev-1604
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends},
+         libajtcl1604 (= ${binary:Version}),
+         liballjoyn-common-dev-1604
+Section: libdevel
+Description: AllJoyn thin client C++ development library
+ AllJoyn is a collaborative open-source software framework that makes
+ it easy for developers to write applications that can discover nearby
+ devices, and communicate with each other directly regardless of
+ brands, categories, transports, and OSes without the need of the cloud.
+ .
+ The AllJoyn framework is extremely flexible with many features to help
+ make the vision of the Internet of Things come to life.
+ .
+ This package contains the C++ development files for the thin client.
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..3fa1892
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,48 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: alljoyn
+Source: https://allseenalliance.org/framework
+
+Files:     *
+Copyright: 2003-2016 AllSeen Alliance
+           2000-2001 Aaron D. Gifford
+License:   ISC
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Files:     src/external/sha2/sha2.c
+           src/external/sha2/sha2.h
+Copyright: 1998-2000 Aaron D. Gifford
+License:   BSD3
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the copyright holder nor the names of contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+
diff --git a/debian/libajtcl1604.install b/debian/libajtcl1604.install
new file mode 100755
index 0000000..1342f65
--- /dev/null
+++ b/debian/libajtcl1604.install
@@ -0,0 +1,2 @@
+#! /usr/bin/dh-exec
+dist/lib/libajtcl.so.* /usr/lib/${DEB_HOST_MULTIARCH}
diff --git a/debian/liballjoyntcl-dev-1604.install b/debian/liballjoyntcl-dev-1604.install
new file mode 100755
index 0000000..f27a74d
--- /dev/null
+++ b/debian/liballjoyntcl-dev-1604.install
@@ -0,0 +1,4 @@
+#! /usr/bin/dh-exec
+dist/include/a* /usr/include/${DEB_HOST_MULTIARCH}
+dist/lib/libajtcl.a /usr/lib/${DEB_HOST_MULTIARCH}
+#XXX dist/lib/libajtcl.so /usr/lib/${DEB_HOST_MULTIARCH}
diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
new file mode 100644
index 0000000..a23b80c
--- /dev/null
+++ b/debian/patches/hardening.patch
@@ -0,0 +1,26 @@
+Author: Thorsten Alteholz <debian at alteholz.de>
+Description: add hardening flags
+Index: alljoyn-thin-client-1604/SConscript.target.linux
+===================================================================
+--- alljoyn-thin-client-1604.orig/SConscript.target.linux	2016-06-23 11:00:33.000000000 +0200
++++ alljoyn-thin-client-1604/SConscript.target.linux	2016-06-23 11:03:19.000000000 +0200
+@@ -37,6 +37,9 @@
+     '-pipe',
+     '-funsigned-char',
+     '-fno-strict-aliasing',
++    '-fPIE',
++    '-fPIC',
++    '-D_FORTIFY_SOURCE=2',
+     '-Wall',
+     '-Waggregate-return',
+     '-Wbad-function-cast',
+@@ -53,6 +56,9 @@
+     '-Werror=format-security',
+     '-Wwrite-strings'
+ ])
++env.Append(LINKFLAGS = ['-fPIE', '-pie', '-fPIC'])
++env.Append(LINKFLAGS = ['-z', 'relro', '-z', 'now'])
++env.Append(CPPFLAGS = ['-fPIE', '-fPIC', '-D_FORTIFY_SOURCE=2'])
+ 
+ if env['FORCE32']:
+     env.Append(CFLAGS = '-m32')
diff --git a/debian/patches/remove-makefile.patch b/debian/patches/remove-makefile.patch
new file mode 100644
index 0000000..53526d4
--- /dev/null
+++ b/debian/patches/remove-makefile.patch
@@ -0,0 +1,410 @@
+Author: Thorsten Alteholz <debian at alteholz.de>
+Description: remove makefile to prevent failure of clean target
+Index: alljoyn-thin-client-1509/Makefile
+===================================================================
+--- alljoyn-thin-client-1509.orig/Makefile	2016-06-23 08:44:25.000000000 +0200
++++ /dev/null	1970-01-01 00:00:00.000000000 +0000
+@@ -1,403 +0,0 @@
+-# Copyright AllSeen Alliance. All rights reserved.
+-#
+-#    Permission to use, copy, modify, and/or distribute this software for any
+-#    purpose with or without fee is hereby granted, provided that the above
+-#    copyright notice and this permission notice appear in all copies.
+-#
+-#    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+-#    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+-#    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+-#    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+-#    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+-#    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+-#    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+-
+-#
+-# This makefile is meant to be used solely for building WSL-enabled applications.
+-# It is intended to be invoked from IDEs that do not support building using SCons.
+-# All paths in this file are relative to the makefile location
+-#
+-# Some care has to be taken when passing string values into the makefile from the command-line.
+-# An extra level of backslash escaping required to get a string presented to the compiler's preprocessor.
+-# For example, passing the string "bar" to use as a character string initializer in a .c file:
+-#    const char foo_var[] = FOO_VAR;
+-#
+-# Is passed on the command line:
+-#    make target FOO_VAR=\\\"bar\\\"
+-#
+-# Which results in compiler arguments such as:
+-#    -DFOO_VAR=\"bar\"
+-#
+-# settings that can be defined:
+-#   AJ_CONFIGURE_WIFI_UPON_START: (boolean) should wifi network connections be started when the AllJoyn
+-#            application starts, 1 means yes, 0 or undef means no
+-#            example: AJ_CONFIGURE_WIFI_UPON_START=1
+-#   WIFI_DEVICE_NAME: (quoted string) the hostname to assign to your device when connecting to the network
+-#            example: WIFI_DEVICE_NAME=\\\"WSLNode001\\\"
+-#   WIFI_SCAN: (boolean) should a scan of access points be performed when the device starts up,
+-#            1 means yes, 0 or undef means no
+-#            example: WIFI_SCAN=1
+-#   WIFI_SSID: (quoted string) the SSID of the network to connect to
+-#            example: WIFI_SSID=\\\"AP_SSID01\\\"
+-#   WIFI_PASSPHRASE: (quoted string) the passphrase used to connect to WIFI_SSID
+-#            example: WIFI_PASSPHRASE=\\\"PassPhrase\\\"
+-#   SOFTAP_SSID: (quoted string) the SSID to use when the device is put into Access Point mode
+-#            example: SOFTAP_SSID=\\\"SoftAP_SSID01\\\"
+-#   SOFTAP_PASSPHRASE: (quoted string) the passphrase needed by clients to connect to SOFTAP_SSID
+-#            example: SOFTAP_PASSPHRASE=\\\"My_PassPhrase\\\"
+-
+-ALLJOYN_DEFINES =
+-
+-# Check which options are defined on the command-line
+-ifneq ($(AJ_DEBUG_RESTRICT), )
+-ALLJOYN_DEFINES += -DAJ_DEBUG_RESTRICT=${AJ_DEBUG_RESTRICT}
+-endif
+-
+-ifneq ($(AJ_CONFIGURE_WIFI_UPON_START), )
+-ALLJOYN_DEFINES += -DAJ_CONFIGURE_WIFI_UPON_START=${AJ_CONFIGURE_WIFI_UPON_START}
+-endif
+-
+-ifneq ($(WIFI_DEVICE_NAME),)
+-ALLJOYN_DEFINES += -DWIFI_DEVICE_NAME=${WIFI_DEVICE_NAME}
+-endif
+-
+-ifneq ($(WIFI_SCAN),)
+-ALLJOYN_DEFINES += -DWIFI_SCAN=${WIFI_SCAN}
+-endif
+-
+-ifneq ($(WIFI_SSID),)
+-ALLJOYN_DEFINES += -DWIFI_SSID=${WIFI_SSID}
+-endif
+-
+-ifneq ($(WIFI_PASSPHRASE),)
+-ALLJOYN_DEFINES += -DWIFI_PASSPHRASE=${WIFI_PASSPHRASE}
+-endif
+-
+-ifneq ($(SOFTAP_SSID),)
+-ALLJOYN_DEFINES += -DSOFTAP_SSID=${SOFTAP_SSID}
+-endif
+-
+-ifneq ($(SOFTAP_PASSPHRASE),)
+-ALLJOYN_DEFINES += -DSOFTAP_PASSPHRASE=${SOFTAP_PASSPHRASE}
+-endif
+-
+-
+-DEFINES = 	-D__SAM3X8E__ \
+-			-DARM_MATH_CM3=true \
+-			-DBOARD=ARDUINO_DUE_X \
+-			-Dprintf=iprintf 
+-
+-DEFINES += $(ALLJOYN_DEFINES)
+-
+-
+-
+-RELEASE_DEFINES = 	-DNDEBUG \
+-
+-
+-# Linker flags
+-LDFLAGS = 	-mthumb \
+-			-Wl,-Map=$@.map \
+-			-Wl,--start-group \
+-			-larm_cortexM3l_math \
+-			-lm \
+-			-Wl,--end-group \
+-			-L"$(ATMEL_DIR)/thirdparty/CMSIS/Lib/GCC" \
+-			-Wl,--gc-sections \
+-			-mcpu=cortex-m3 \
+-			-Wl,--entry=Reset_Handler \
+-			-Wl,--cref \
+-			-mthumb \
+-			-T$(ATMEL_DIR)/sam/utils/linker_scripts/sam3x/sam3x8/gcc/flash.ld 
+-
+-RELEASE_LDFLAGS = \
+-			-Os \
+-
+-
+-# Include Paths
+-INCLUDES = 	-I. \
+-			-Iconfig \
+-			-I$(FREE_RTOS_DIR)/Source/include \
+-			-I$(FREE_RTOS_DIR)/Source/portable/GCC/ARM_CM3 \
+-			-I$(ATMEL_DIR)/common/boards \
+-			-I$(ATMEL_DIR)/common/services/clock \
+-			-I$(ATMEL_DIR)/common/services/clock/sam3x \
+-			-I$(ATMEL_DIR)/common/services/gpio \
+-			-I$(ATMEL_DIR)/common/services/ioport \
+-			-I$(ATMEL_DIR)/common/services/freertos/sam \
+-			-I$(ATMEL_DIR)/common/services/serial/sam_uart \
+-			-I$(ATMEL_DIR)/common/services/serial \
+-			-I$(ATMEL_DIR)/common/services/spi \
+-			-I$(ATMEL_DIR)/common/services/sam_spi \
+-			-I$(ATMEL_DIR)/common/services/spi/sam_spi/module_config \
+-			-I$(ATMEL_DIR)/common/utils \
+-			-I$(ATMEL_DIR)/common/utils/stdio/stdio_serial \
+-			-I$(ATMEL_DIR)/common/drivers/nvm \
+-			-I$(ATMEL_DIR)/common/drivers/nvm/sam/module_config \
+-			-I$(ATMEL_DIR)/sam/boards \
+-			-I$(ATMEL_DIR)/sam/boards/arduino_due_x \
+-			-I$(ATMEL_DIR)/sam/drivers/dmac \
+-			-I$(ATMEL_DIR)/sam/drivers/pio \
+-			-I$(ATMEL_DIR)/sam/drivers/pmc \
+-			-I$(ATMEL_DIR)/sam/drivers/pdc \
+-			-I$(ATMEL_DIR)/sam/drivers/uart \
+-			-I$(ATMEL_DIR)/sam/drivers/usart \
+-			-I$(ATMEL_DIR)/sam/drivers/spi \
+-			-I$(ATMEL_DIR)/sam/drivers/efc \
+-			-I$(ATMEL_DIR)/sam/drivers/trng \
+-			-I$(ATMEL_DIR)/sam/utils \
+-			-I$(ATMEL_DIR)/sam/utils/cmsis/sam3x/include \
+-			-I$(ATMEL_DIR)/sam/utils/cmsis/sam3x/source/templates \
+-			-I$(ATMEL_DIR)/sam/utils/cmsis/sam3x/include/component \
+-			-I$(ATMEL_DIR)/sam/utils/header_files \
+-			-I$(ATMEL_DIR)/sam/utils/preprocessor \
+-			-I$(ATMEL_DIR)/sam/services/flash_efc \
+-			-I$(ATMEL_DIR)/thirdparty/CMSIS/Include \
+-			-I$(ATMEL_DIR)/thirdparty/CMSIS/Lib/GCC \
+-			-I$(ATMEL_DIR)/sam/boards/arduino_due_x/board_config \
+-			-I$(ATMEL_DIR)/common/services/clock/sam3x/module_config \
+-			-I$(ATMEL_DIR)/config \
+-			-I$(ATMEL_DIR)/common/services/clock/sam3x \
+-			-Iinc \
+-			-IRTOS \
+-			-IRTOS/FreeRTOS \
+-			-Ibsp \
+-			-Ibsp/due \
+-			-Ibsp/due/config \
+-			-Imalloc \
+-			-Iexternal\sha2 \
+-			-Icrypto \
+-			-Icrypto/ecc \
+-			-IWSL
+-	
+-# Compiler flags	
+-FLAGS = 	-mthumb \
+-			-fdata-sections \
+-			-ffunction-sections \
+-			-mlong-calls \
+-			-g3 \
+-			-Wall \
+-			-mcpu=cortex-m3 \
+-			-c \
+-			-pipe \
+-			-fno-strict-aliasing \
+-			-Wpointer-arith \
+-			-std=gnu99 \
+-			-Wchar-subscripts \
+-			-Wcomment \
+-			-Wformat=2 \
+-			-Wimplicit-int \
+-			-Wmain \
+-			-Wparentheses \
+-			-Wsequence-point \
+-			-Wreturn-type \
+-			-Wswitch \
+-			-Wtrigraphs \
+-			-Wunused \
+-			-Wuninitialized \
+-			-Wfloat-equal \
+-			-Wundef \
+-			-Wshadow \
+-			-Wbad-function-cast \
+-			-Wwrite-strings \
+-			-Wsign-compare \
+-			-Waggregate-return \
+-			-Wformat \
+-			-Wno-deprecated-declarations \
+-			-Wno-unknown-pragmas \
+-			-Wpacked \
+-			-Wunreachable-code \
+-			-Wcast-align \
+-			--param max-inline-insns-single=500 \
+-			-MD \
+-			-MP \
+-			-MF $(@:%.o=%.d)
+-
+-
+-			
+-COMPILER = arm-none-eabi-gcc.exe
+-
+-SOURCE_FILES :=	$(FREE_RTOS_DIR)/Source/croutine.c \
+-				$(FREE_RTOS_DIR)/Source/list.c \
+-				$(FREE_RTOS_DIR)/Source/queue.c \
+-				$(FREE_RTOS_DIR)/Source/tasks.c \
+-				$(FREE_RTOS_DIR)/Source/timers.c \
+-				$(FREE_RTOS_DIR)/Source/portable/MemMang/heap_3.c \
+-				$(FREE_RTOS_DIR)/Source/portable/GCC/ARM_CM3/port.c \
+-				$(ATMEL_DIR)/common/services/clock/sam3x/sysclk.c \
+-				$(ATMEL_DIR)/common/services/spi/sam_spi/spi_master.c \
+-				$(ATMEL_DIR)/common/services/freertos/sam/freertos_peripheral_control.c \
+-				$(ATMEL_DIR)/common/services/freertos/sam/freertos_usart_serial.c \
+-				$(ATMEL_DIR)/common/utils/interrupt/interrupt_sam_nvic.c \
+-				$(ATMEL_DIR)/common/utils/stdio/read.c \
+-				$(ATMEL_DIR)/common/utils/stdio/write.c \
+-				$(ATMEL_DIR)/common/drivers/nvm/sam/sam_nvm.c \
+-				$(ATMEL_DIR)/sam/boards/arduino_due_x/init.c \
+-				$(ATMEL_DIR)/sam/boards/arduino_due_x/led.c \
+-				$(ATMEL_DIR)/sam/drivers/dmac/dmac.c \
+-				$(ATMEL_DIR)/sam/drivers/pdc/pdc.c \
+-				$(ATMEL_DIR)/sam/drivers/pio/pio.c \
+-				$(ATMEL_DIR)/sam/drivers/pio/pio_handler.c \
+-				$(ATMEL_DIR)/sam/drivers/pmc/pmc.c \
+-				$(ATMEL_DIR)/sam/drivers/pmc/sleep.c \
+-				$(ATMEL_DIR)/sam/drivers/uart/uart.c \
+-				$(ATMEL_DIR)/sam/drivers/usart/usart.c \
+-				$(ATMEL_DIR)/sam/drivers/spi/spi.c \
+-				$(ATMEL_DIR)/sam/drivers/efc/efc.c \
+-				$(ATMEL_DIR)/sam/drivers/trng/trng.c \
+-				$(ATMEL_DIR)/sam/utils/cmsis/sam3x/source/templates/exceptions.c \
+-				$(ATMEL_DIR)/sam/utils/cmsis/sam3x/source/templates/system_sam3x.c \
+-				$(ATMEL_DIR)/sam/utils/cmsis/sam3x/source/templates/gcc/startup_sam3x.c \
+-				$(ATMEL_DIR)/sam/services/flash_efc/flash_efc.c \
+-				$(ATMEL_DIR)/sam/utils/syscalls/gcc/syscalls.c \
+-				crypto/aj_sw_crypto.c \
+-				crypto/ecc/aj_crypto_ecc.c \
+-				crypto/ecc/aj_crypto_sha2.c \
+-				src/aj_about.c \
+-				src/aj_bufio.c \
+-				src/aj_bus.c \
+-				src/aj_connect.c \
+-				src/aj_cert.c \
+-				src/aj_crc16.c \
+-				src/aj_creds.c \
+-				src/aj_crypto.c \
+-				src/aj_debug.c \
+-				src/aj_disco.c \
+-				src/aj_guid.c \
+-				src/aj_helper.c \
+-				src/aj_init.c \
+-				src/aj_introspect.c \
+-				src/aj_keyauthentication.c \
+-				src/aj_keyexchange.c \
+-				src/aj_link_timeout.c \
+-				src/aj_msg.c \
+-				src/aj_nvram.c \
+-				src/aj_peer.c \
+-				src/aj_serial.c \
+-				src/aj_serial_rx.c \
+-				src/aj_serial_tx.c \
+-				src/aj_std.c \
+-				src/aj_util.c \
+-				malloc/aj_malloc.c \
+-				external/sha2/sha2.c \
+-				WSL/aj_buf.c \
+-				WSL/aj_wsl_htc.c \
+-				WSL/aj_wsl_net.c \
+-				WSL/aj_wsl_spi_mbox.c \
+-				WSL/aj_wsl_unmarshal.c \
+-				WSL/aj_wsl_wmi.c \
+-				WSL/aj_wsl_marshal.c \
+-				WSL/aj_wsl_tasks.c \
+-				RTOS/main.c \
+-				RTOS/aj_net.c \
+-				RTOS/aj_wifi_ctrl.c \
+-				RTOS/Alljoyn.c \
+-				RTOS/FreeRTOS/aj_target_rtos.c \
+-				bsp/due/aj_spi.c \
+-				bsp/due/aj_trng.c \
+-				bsp/due/aj_target_platform.c
+-
+-
+-TEST_FILES = 	test/aestest.c
+-TEST_FILES +=	test/mutter.c
+-TEST_FILES +=	test/svclite.c
+-TEST_FILES +=	test/nvramtest.c
+-TEST_FILES += 	test/clientlite.c
+-TEST_FILES += 	test/sessionslite.c
+-
+-		
+-SAMPLE_FILES =  	samples/basic/basic_client.c
+-SAMPLE_FILES += 	samples/basic/basic_service.c
+-SAMPLE_FILES += 	samples/basic/nameChange_client.c
+-SAMPLE_FILES += 	samples/basic/signalConsumer_client.c
+-SAMPLE_FILES += 	samples/basic/signal_service.c
+-SAMPLE_FILES += 	samples/secure/SecureClient.c
+-
+-OBJECTS = $(SOURCE_FILES:.c=.o)
+-TEST_OBJECTS = $(TEST_FILES:.c=.o)
+-SAMPLE_OBJECTS = $(SAMPLE_FILES:.c=.o)
+-DFILES = $(SOURCE_FILES:.c=.d)
+-EXECUTABLES = $(TEST_FILES:.c=.elf)
+-
+-test: $(TEST_FILES) $(TEST_OBJECTS) $(OBJECTS)
+-sample: $(SAMPLE_FILES) $(SAMPLE_OBJECTS) $(OBJECTS)
+-
+-
+-
+-
+-Release: release
+-#release: FLAGS += -O3
+-release: DEFINES += -DNDEBUG
+-release: all
+-
+-Debug: debug
+-#debug: FLAGS += -g3
+-debug: all
+-
+-
+-# All the test elf's are linked here. Add more by using the same format as the others
+-# $(COMPILER) -o <name_of_elf>.elf $(OBJECTS) <any_extra_files_with_main()>.o $(LDFLAGS)
+-all: test \
+-	sample \
+-	due_mutter \
+-	due_svclite \
+-	due_nvram_test \
+-	due_clientlite \
+-	due_sessionslite \
+-	due_basic_client \
+-	due_basic_service \
+-
+-due_aestest:
+-	$(COMPILER) -o due_aestest.elf $(OBJECTS) test/aestest.o $(LDFLAGS)
+-
+-due_mutter:
+-	$(COMPILER) -o due_mutter.elf $(OBJECTS) test/mutter.o $(LDFLAGS)
+-
+-due_svclite:
+-	$(COMPILER) -o due_svclite.elf $(OBJECTS) test/svclite.o $(LDFLAGS)
+-	
+-due_nvram_test:
+-	$(COMPILER) -o due_nvram_test.elf $(OBJECTS) test/nvramtest.o $(LDFLAGS)
+-
+-due_clientlite:
+-	$(COMPILER) -o due_clientlite.elf $(OBJECTS) test/clientlite.o $(LDFLAGS)
+-
+-due_sessionslite:
+-	$(COMPILER) -o due_sessionslite.elf $(OBJECTS) test/sessionslite.o $(LDFLAGS)
+-
+-due_samplesecureclient:
+-	$(COMPILER) -o due_samplesecureclient.elf $(OBJECTS) samples/secure/secureclient.o $(LDFLAGS)
+-
+-due_samplesecureservice:
+-	$(COMPILER) -o due_samplesecureservice.elf $(OBJECTS) samples/secure/secureservice.o $(LDFLAGS)
+-
+-
+-due_basic_client:
+-	$(COMPILER) -o due_basic_client.elf $(OBJECTS) samples/basic/basic_client.o $(LDFLAGS)
+-
+-due_basic_service:
+-	$(COMPILER) -o due_basic_service.elf $(OBJECTS) samples/basic/basic_service.o $(LDFLAGS)
+-
+-due_nameChange_client:
+-	$(COMPILER) -o due_nameChange_client.elf $(OBJECTS) samples/basic/nameChange_client.o $(LDFLAGS)
+-
+-due_signalConsumer_client:
+-	$(COMPILER) -o due_signalConsumer_client.elf $(OBJECTS) samples/basic/signalConsumer_client.o $(LDFLAGS)
+-
+-due_signal_service:
+-	$(COMPILER) -o due_signal_service.elf $(OBJECTS) samples/basic/signal_service.o $(LDFLAGS)
+-
+-%.o : %.c
+-	$(COMPILER) $(DEFINES) $(INCLUDES) $(FLAGS) -o $@ $<
+-
+-clean:
+-	cmd /C del /S *.elf
+-	cmd /C for /r %i in (*.o, *.d, *.map) do del %i
+-
+-clean_c: 
+-	cmd /C del /S *.o
+-	cmd /C del /S *.d
+-	cd test; cmd /C del /S *.o
+-	cd test; cmd /C del /S *.d
+-	cd ajtcl; cmd /C del /S *.o
+-	cd ajtcl; cmd /C del /S *.d
+-
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b91d861
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+soname.patch
+remove-makefile.patch
+hardening.patch
diff --git a/debian/patches/soname.patch b/debian/patches/soname.patch
new file mode 100644
index 0000000..d42566b
--- /dev/null
+++ b/debian/patches/soname.patch
@@ -0,0 +1,13 @@
+Author: Thorsten Alteholz <debian at alteholz.de>
+Description: add soname to libraries
+Index: alljoyn-thin-client-1604/src/SConscript
+===================================================================
+--- alljoyn-thin-client-1604.orig/src/SConscript	2016-06-23 11:00:33.000000000 +0200
++++ alljoyn-thin-client-1604/src/SConscript	2016-06-23 11:00:33.000000000 +0200
+@@ -57,5 +57,5 @@
+ 
+ if src_env['build_shared']:
+     objs = src_env.SharedObject(src_env['srcs'])
+-    lib = src_env.SharedLibrary("ajtcl", objs)
++    lib = src_env.SharedLibrary("ajtcl", objs, SHLIBVERSION='1604')
+     src_env.Install('#dist/lib', lib)
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..653f7da
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,54 @@
+#!/usr/bin/make -f
+# You must remove unused comment lines for the released package.
+#export DH_VERBOSE = 1
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
+export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+export JAVA_HOME=/usr/lib/jvm/default-java
+export CLASSPATH=/usr/share/java/csv.jar:/usr/share/java/debug-disable.jar:/usr/share/java/itext.jar
+export GTEST_DIR=/usr/src/gtest
+
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+# mapping all i.86 to x86 for Alljoyn
+CPU=$(shell dpkg-architecture -qDEB_HOST_GNU_CPU | sed -e 's/i.86/x86/')
+OS=linux
+TARG=linux
+
+export VERSION := 16.04
+export SONAME := 1604
+export VARIANT := release
+export SCONS_ARGS := CPU=$(CPU) TARG=$(TARG) VARIANT=$(VARIANT) V=1 GTEST_DIR=$(GTEST_DIR)
+export BUILD_DIR := $(CURDIR)/build/$(OS)/$(CPU)/$(VARIANT)/dist
+export OBJ_DIR := $(CURDIR)/build/$(OS)/$(CPU)/$(VARIANT)/obj
+
+%:
+	dh $@
+
+override_dh_auto_build:
+	scons BINDINGS=cpp $(SCONS_ARGS) \
+		WS=off BT=off ICE=off 
+
+	touch ./to-be.removed-now.md5
+	find ./* |grep '\.md5'|xargs rm
+
+	dh_auto_build
+
+override_dh_auto_clean:
+	rm -f .sconsign.dblite
+	rm -rf .sconf_temp
+	rm -f config.log
+	rm -rf dist
+	touch ./to-be.removed-now.md5
+	find ./* |grep '\.md5'|xargs rm
+	touch ./to-be.removed-now.os
+	find ./* |grep '\.os'|xargs rm
+	touch ./to-be.removed-now.o
+	find ./* |grep '\.o'|xargs rm
+	rm -rf build
+	dh_auto_clean
+
+override_dh_install:
+	dh_install
+	## improve stuff
+	#chmod 644 debian/alljoyn-services-1509/etc/alljoyn/*.conf
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..d209b11
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts="dversionmangle=s/core/alljoyn-thin-client/" \
+https://git.allseenalliance.org/cgit/core/ajtcl.git/ /cgit/core/ajtcl.git/snapshot/ajtcl-(16\.04?)\.tar\.gz

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-iot/alljoyn-thin-client-1604.git



More information about the Debian-iot-packaging mailing list