From 02ad9197d7d188b8b47992d7ea848e8881583b7d Mon Sep 17 00:00:00 2001 From: John Arnold Date: Thu, 3 Mar 2016 09:57:22 -0800 Subject: [PATCH] packaging: Adding debian packaging (debian/*) Signed-off-by: John Arnold --- debian/changelog | 6 ++++++ debian/compat | 1 + debian/control | 23 +++++++++++++++++++++ debian/libswsscommon-dev.dirs | 2 ++ debian/libswsscommon-dev.install | 1 + debian/libswsscommon-dev.links | 2 ++ debian/libswsscommon.dirs | 1 + debian/libswsscommon.install | 1 + debian/rules | 34 ++++++++++++++++++++++++++++++++ debian/swss.dirs | 1 + debian/swss.install | 1 + package.cfg | 16 +++++++++++++++ 12 files changed, 89 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/libswsscommon-dev.dirs create mode 100644 debian/libswsscommon-dev.install create mode 100755 debian/libswsscommon-dev.links create mode 100644 debian/libswsscommon.dirs create mode 100644 debian/libswsscommon.install create mode 100755 debian/rules create mode 100644 debian/swss.dirs create mode 100644 debian/swss.install create mode 100644 package.cfg diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000000..2d2dba5fc1 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +sonic (1.0.0) stable; urgency=medium + + * Initial release. + + -- Shuotian Cheng Wed, 09 Mar 2016 12:00:00 -0800 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000000..ec635144f6 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000000..58d120ed47 --- /dev/null +++ b/debian/control @@ -0,0 +1,23 @@ +Source: sonic +Maintainer: Shuotian Cheng +Section: net +Priority: optional +Build-Depends: dh-exec (>=0.3), debhelper (>= 9), autotools-dev +Standards-Version: 1.0.0 + +Package: swss +Architecture: any +Depends: ${shlibs:Depends} +Description: This package contains Switch State Service for SONiC project. + +Package: libswsscommon +Architecture: any +Section: libs +Description: Tihs package contains Switch State Service common library. + +Package: libswsscommon-dev +Architecture: any +Depends: libswsscommon (= ${binary:Version}) +Section: libdevel +Description: This package contains development files for Switch State Service. + diff --git a/debian/libswsscommon-dev.dirs b/debian/libswsscommon-dev.dirs new file mode 100644 index 0000000000..44188162ec --- /dev/null +++ b/debian/libswsscommon-dev.dirs @@ -0,0 +1,2 @@ +usr/lib +usr/include diff --git a/debian/libswsscommon-dev.install b/debian/libswsscommon-dev.install new file mode 100644 index 0000000000..173abf58e7 --- /dev/null +++ b/debian/libswsscommon-dev.install @@ -0,0 +1 @@ +common/*.h usr/include/swss diff --git a/debian/libswsscommon-dev.links b/debian/libswsscommon-dev.links new file mode 100755 index 0000000000..7fc4c02c29 --- /dev/null +++ b/debian/libswsscommon-dev.links @@ -0,0 +1,2 @@ +#! /usr/bin/dh-exec +/usr/lib/${DEB_HOST_MULTIARCH}/libswsscommon.so.0 /usr/lib/${DEB_HOST_MULTIARCH}/libswsscommon.so diff --git a/debian/libswsscommon.dirs b/debian/libswsscommon.dirs new file mode 100644 index 0000000000..68457717bd --- /dev/null +++ b/debian/libswsscommon.dirs @@ -0,0 +1 @@ +usr/lib diff --git a/debian/libswsscommon.install b/debian/libswsscommon.install new file mode 100644 index 0000000000..3ddde58419 --- /dev/null +++ b/debian/libswsscommon.install @@ -0,0 +1 @@ +usr/lib/*/lib*.so.* diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000000..7fbd8b27a9 --- /dev/null +++ b/debian/rules @@ -0,0 +1,34 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + +# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/default.mk + +# see FEATURE AREAS in dpkg-buildflags(1) +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + + +# main packaging script based on dh7 syntax +%: + dh $@ --with autotools-dev + +# dh_make generated override targets +# This is example for Cmake (See https://bugs.debian.org/641051 ) +#override_dh_auto_configure: +# dh_auto_configure -- \ +# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) + +override_dh_auto_configure: + dh_auto_configure -- --with-fpm=fpm/ + +override_dh_auto_install: + dh_auto_install diff --git a/debian/swss.dirs b/debian/swss.dirs new file mode 100644 index 0000000000..e772481755 --- /dev/null +++ b/debian/swss.dirs @@ -0,0 +1 @@ +usr/bin diff --git a/debian/swss.install b/debian/swss.install new file mode 100644 index 0000000000..1df36c612f --- /dev/null +++ b/debian/swss.install @@ -0,0 +1 @@ +usr/bin/* diff --git a/package.cfg b/package.cfg new file mode 100644 index 0000000000..cffe16872a --- /dev/null +++ b/package.cfg @@ -0,0 +1,16 @@ +{ + "description": "This package contains Switch State Service for SONiC project.", + "version": "1.0.0", + "maintainer": "Shuotian Cheng ", + "build_depends": [ ], + "packages": [ + { + "name": "sonic-swss", + "dependencies": [ + ], + "files": [ + ] + } + ] +} +