2 # Copyright 2018 Telefonica
5 # Licensed under the Apache License, Version 2.0 (the "License"); you may
6 # not use this file except in compliance with the License. You may obtain
7 # a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 # License for the specific language governing permissions and limitations
18 PKG_DIRECTORIES
="nginx src"
19 PKG_FILES
=".eslintrc.json angular.json .browserslistrc CONTRIBUTING.md package.json proxy.conf.json tsconfig.json LICENSE README.md"
21 DEB_INSTALL
=debian
/osm-
${MDG_NAME}.
install
22 export DEBEMAIL
="gerardo.garciadeblas@telefonica.com"
23 export DEBFULLNAME
="Gerardo Garcia"
25 PKG_VERSION
=$
(git describe
--match "v*" --tags --abbrev=0)
26 PKG_VERSION_PREFIX
=$
(echo $PKG_VERSION |
sed -e 's/v//g')
27 PKG_VERSION_POST
=$
(git rev-list
$PKG_VERSION..HEAD |
wc -l)
28 PKG_VERSION_HASH
=$
(git describe
--match "v*" --tags |
awk '{print $3}' FS
=-)
29 if [ "$PKG_VERSION_POST" -eq 0 ]; then
30 PKG_DIR
="deb_dist/osm-${MDG_NAME}-${PKG_VERSION_PREFIX}"
32 PKG_DIR
="deb_dist/osm-${MDG_NAME}-$PKG_VERSION_PREFIX.post${PKG_VERSION_POST}+${PKG_VERSION_HASH}"
41 for dir
in $PKG_DIRECTORIES; do
42 ln -s $PWD/$dir $PKG_DIR/.
43 echo "$dir/* usr/share/osm-$MDG_NAME/$dir" >> $DEB_INSTALL
45 for f
in $PKG_FILES; do
47 echo "$f usr/share/osm-$MDG_NAME" >> $DEB_INSTALL
49 cp -R debian
$PKG_DIR/.
52 dh_make
-y --indep --createorig --a -c apache
53 dpkg-buildpackage
-uc -us -tc -rfakeroot