2 ################################################################################
3 # Copyright (c) 2019 AT&T Intellectual Property. #
4 # Copyright (c) 2019 Nokia. #
6 # Licensed under the Apache License, Version 2.0 (the "License"); #
7 # you may not use this file except in compliance with the License. #
8 # You may obtain a copy of the License at #
10 # http://www.apache.org/licenses/LICENSE-2.0 #
12 # Unless required by applicable law or agreed to in writing, software #
13 # distributed under the License is distributed on an "AS IS" BASIS, #
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
15 # See the License for the specific language governing permissions and #
16 # limitations under the License. #
17 ################################################################################
19 # This script package RIC deployment tools as a debian package
23 if [ -z "$VERSION" ];then
24 echo "Please provide a version number."
29 DPKG_BUILDPACKAGE=$(whereis dpkg-buildpackage | awk '{print $2}')
31 if [ -z "$DPKG_BUILDPACKAGE" ];then
32 echo "dpkg-buildpackage not found. Please run \"apt install -y dpkg-dev\""
38 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
39 mkdir -p /tmp/ric-deployment-tools-$VERSION
40 cp -r $DIR/../* /tmp/ric-deployment-tools-$VERSION/
43 DIR=/tmp/ric-deployment-tools-$VERSION
48 cat <<EOF >$DIR/debian/changelog
49 ric-deployment-tools ($VERSION) stable; urgency=low
53 -- Zhe Huang <zhehuang@research.att.com> $(date -R)
56 cat <<EOF >$DIR/debian/compat
60 cat <<EOF >$DIR/debian/control
61 Source: ric-deployment-tools
62 Section: Miscellaneous
64 Maintainer: Zhe Huang <zhehuang@research.att.com>
65 Build-Depends: debhelper (>= 9)
66 Standards-Version: 4.1.2
67 Homepage: https://gerrit.o-ran-sc.org/r/admin/repos/it/dep
68 #Vcs-Git: https://anonscm.debian.org/git/collab-maint/ric-deployment.git
69 #Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/ric-deployment.git
71 Package: ric-deployment-tools
73 Depends: \${misc:Depends}
74 Description: Utility tools to deploy RAN intelligent controller
75 ric-deployment-tools provides scripts and helm charts to deploy RIC platform components and RIC auxiliary functions.
78 cat <<EOF >$DIR/debian/rules
80 # See debhelper(7) (uncomment to enable)
81 # output every command that modifies files on the build system.
82 #export DH_VERBOSE = 1
85 # see FEATURE AREAS in dpkg-buildflags(1)
86 #export DEB_BUILD_MAINT_OPTIONS = hardening=+all
88 # see ENVIRONMENT in dpkg-buildflags(1)
89 # package maintainers to append CFLAGS
90 #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
91 # package maintainers to append LDFLAGS
92 #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
94 export DESTROOT=\$(CURDIR)/debian/ric-deployment-tools
99 override_dh_auto_install:
101 install -d \$(DESTROOT)/opt/ric/ric-deployment-tools
102 rsync -a \$(CURDIR)/* \$(DESTROOT)/opt/ric/ric-deployment-tools --exclude debian
103 # dh_make generated override targets
104 # This is example for Cmake (See https://bugs.debian.org/641051 )
105 #override_dh_auto_configure:
106 # dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=\$(DEB_HOST_MULTIARCH)
113 dpkg-buildpackage -us -uc
116 echo "RIC it/dep repo has been packaged as /tmp/ric-deployment-tools_${VERSION}_all.deb."