--- /dev/null
+[gerrit]
+host=gerrit.o-ran-sc.org
+port=29418
+project=ric-plt/tracelibcpp.git
+defaultbranch=master
+
set (tracelibcpp_VERSION_MAJOR "0")
set (tracelibcpp_VERSION_MINOR "0")
-set (tracelibcpp_VERSION_MICRO "1")
+set (tracelibcpp_VERSION_MICRO "2")
set (tracelibcpp_VERSION_STRING
"${tracelibcpp_VERSION_MAJOR}.${tracelibcpp_VERSION_MINOR}.${tracelibcpp_VERSION_MICRO}")
+# Set up cpack
+# Common
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "C++ implementation RIC tracing initialization")
+set(CPACK_PACKAGE_VENDOR "Nokia")
+set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
+set(CPACK_PACKAGE_VERSION_MAJOR ${tracelibcpp_VERSION_MAJOR})
+set(CPACK_PACKAGE_VERSION_MINOR ${tracelibcpp_VERSION_MINOR})
+set(CPACK_PACKAGE_VERSION_PATCH ${tracelibcpp_VERSION_MICRO})
+set(CPACK_COMPONENTS_ALL DIST DEVEL)
+set(CPACK_COMPONENTS_GROUPING ONE_PER_GROUP )
+set(CPACK_GENERATOR "RPM;DEB")
+set(CPACK_COMPONENTS_IGNORE_GROUPS 1)
+set(CPACK_PACKAGE_CONTACT None)
+
+# RPM
+set(CPACK_RPM_COMPONENT_INSTALL ON)
+set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
+set(CPACK_RPM_FILE_NAME RPM-DEFAULT)
+set(CPACK_RPM_PACKAGE_AUTOREQ 1)
+
+# Debian
+set(CPACK_DEB_COMPONENT_INSTALL ON)
+set(CPACK_DEB_PACKAGE_COMPONENT ON)
+set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
+set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
+
+include(CPack)
+
# Add jaeger
hunter_add_package(jaegertracing)
find_package(jaegertracing CONFIG REQUIRED)
--- /dev/null
+# O-RAN-SC
+#
+# Copyright (C) 2019 AT&T Intellectual Property and Nokia
+#
+# 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.
+
+# CI to verify the tracingcpp library
+# Inherits C toolchain from buildpack-deps:stretch
+# Adds required build tools
+
+FROM buildpack-deps:stretch
+
+RUN apt-get update && apt-get -q -y install \
+ cmake \
+ rpm \
+ rename \
+ alien
+
+RUN mkdir -p /tmp/build
+COPY . /tmp/build
+RUN cd /tmp/build && ci/ci_build.sh
+
+RUN cd /tmp/build && ci/build_opentracing.sh
+
+ENTRYPOINT ["/tmp/build/ci/publish.sh"]
--- /dev/null
+#!/bin/bash
+#
+# Copyright (c) 2019 AT&T Intellectual Property.
+# Copyright (c) 2018-2019 Nokia.
+#
+# 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.
+#
+set -e
+
+REL=1.5.0
+
+wget https://github.com/opentracing/opentracing-cpp/archive/v$REL.tar.gz -O opentracing-cpp-$REL.tar.gz
+tar zxf opentracing-cpp-$REL.tar.gz
+cd opentracing-cpp-$REL
+
+cmake .
+make package
+cpack -G RPM -D CPACK_RPM_FILE_NAME=RPM-DEFAULT
+alien opentracing-cpp-$REL-1.x86_64.rpm --keep-version
+mv *.rpm *.deb ..
--- /dev/null
+#!/bin/bash
+#
+# Copyright (c) 2019 AT&T Intellectual Property.
+# Copyright (c) 2018-2019 Nokia.
+#
+# 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.
+
+set -e
+
+# UT
+cmake -DWITH_TESTING=ON -DHUNTER_JOBS_NUMBER=3 .
+make && make test
+
+# Build packages
+make package
+# Do small renames
+rename 's/-DEVEL/-devel/' *.rpm
+rename 's/-DIST//' *.rpm
+rename 's/-devel/-dev/' *.deb
+rename 's/-dist//' *.deb
--- /dev/null
+#!/bin/bash
+#
+# Copyright (c) 2019 AT&T Intellectual Property.
+# Copyright (c) 2018-2019 Nokia.
+#
+# 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.
+#
+echo "$0: start copying packages"
+
+TARGET=/export
+if [ $# -eq 1 ]
+then
+ TARGET=$1
+fi
+
+if [ ! -d "$TARGET" ]
+then
+ echo "$0: Error: target dir $TARGET does not exist"
+ exit 1
+fi
+
+cp -v /tmp/build/*.rpm /tmp/build/*.deb "$TARGET"