Added files for deb package creation 84/8884/2 v7.1.2
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Thu, 7 May 2020 15:05:58 +0000 (15:05 +0000)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Thu, 7 May 2020 15:48:01 +0000 (15:48 +0000)
Change-Id: I7cd40b9696009ffd778ba69ec2e6723a7f8e32e4
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
build-debpkg.sh [new file with mode: 0755]
debian/control [new file with mode: 0644]
devops-stages/stage-archive.sh
devops-stages/stage-build.sh
devops-stages/stage-test.sh

diff --git a/build-debpkg.sh b/build-debpkg.sh
new file mode 100755 (executable)
index 0000000..9a0960a
--- /dev/null
@@ -0,0 +1,56 @@
+#!/bin/bash
+# Copyright 2018 Telefonica
+# All Rights Reserved.
+#
+#    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.
+
+
+PKG_DIRECTORIES="lib static template"
+PKG_FILES="LICENSE README.md"
+MDG_NAME=ngui
+DEB_INSTALL=debian/osm-${MDG_NAME}.install
+export DEBEMAIL="gerardo.garciadeblas@telefonica.com"
+export DEBFULLNAME="Gerardo Garcia"
+
+PKG_VERSION=$(git describe --match "v*" --tags --abbrev=0)
+PKG_VERSION_PREFIX=$(echo $PKG_VERSION | sed -e 's/v//g')
+PKG_VERSION_POST=$(git rev-list $PKG_VERSION..HEAD | wc -l)
+PKG_VERSION_HASH=$(git describe --match "v*" --tags | awk '{print $3}' FS=-)
+if [ "$PKG_VERSION_POST" -eq 0 ]; then
+    PKG_DIR="deb_dist/osm-${MDG_NAME}-${PKG_VERSION_PREFIX}"
+else
+    PKG_DIR="deb_dist/osm-${MDG_NAME}-$PKG_VERSION_PREFIX.post${PKG_VERSION_POST}+${PKG_VERSION_HASH}"
+fi
+
+rm -rf $PKG_DIR
+rm -f *.orig.tar.xz
+rm -f *.deb
+rm -f $DEB_INSTALL
+mkdir -p $PKG_DIR
+
+for dir in $PKG_DIRECTORIES; do
+    ln -s $PWD/$dir $PKG_DIR/.
+    echo "$dir/* usr/share/osm-$MDG_NAME/$dir" >> $DEB_INSTALL
+done
+for f in $PKG_FILES; do
+    cp $f $PKG_DIR/.
+    echo "$f usr/share/osm-$MDG_NAME" >> $DEB_INSTALL
+done
+cp -R debian $PKG_DIR/.
+
+pushd $PKG_DIR
+dh_make -y --indep --createorig --a -c apache
+dpkg-buildpackage -uc -us -tc -rfakeroot
+popd
+
+
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..2edab50
--- /dev/null
@@ -0,0 +1,28 @@
+##
+# 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.
+#
+# For those usages not covered by the Apache License, Version 2.0 please
+# contact with: OSM_TECH@list.etsi.org
+##
+Source: osm-ngui
+Section: devel
+Priority: optional
+Maintainer: Gerardo Garcia <gerardo.garciadeblas@telefonica.com>
+Build-Depends: debhelper (>=9)
+Standards-Version: 3.9.6
+Homepage: http://osm.etsi.org
+
+Package: osm-ngui
+Architecture: all
+Depends: ${misc:Depends}
+Description: Open Source MANO Next Generation UI based on Angular
index 013953f..61fd185 100755 (executable)
 # implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-echo "ARCHIVE"
+MDG=NG-UI
+
+rm -rf pool
+rm -rf dists
+mkdir -p pool/$MDG
+mv deb_dist/*.deb pool/$MDG/
+
+mkdir -p dists/unstable/$MDG/binary-amd64/
+apt-ftparchive packages pool/$MDG > dists/unstable/$MDG/binary-amd64/Packages
+gzip -9fk dists/unstable/$MDG/binary-amd64/Packages
+echo "ARCHIVE DONE"
index b58d1f3..d8b0ff6 100755 (executable)
@@ -12,4 +12,5 @@
 # implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-echo "BUILD"
+./build-debpkg.sh
+echo "BUILD DONE"
index 337cf59..bf8b350 100755 (executable)
@@ -11,4 +11,4 @@
 # implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-echo "TEST"
+echo "UNITTEST DONE"