aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/osmocom-nightly-packages.sh
blob: 84cf6e4420c4c27ed95619632a6776b222f1e8cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/sh

# rather than including a dangerous 'rm -rf *' here, lets delegate to the user:
if [ -n "$(ls)" ]; then
  echo "ERROR: I need to run in an empty directory."
  exit 1
fi

set -x -e

git clone git://git.osmocom.org/osmo-sip-connector
git clone git://git.osmocom.org/libosmocore
git clone git://git.osmocom.org/libosmo-sccp
git clone git://git.osmocom.org/libosmo-abis
git clone git://git.osmocom.org/libosmo-netif
git clone git://git.osmocom.org/libsmpp34
git clone git://git.osmocom.org/openggsn
git clone git://git.osmocom.org/osmo-ggsn
git clone git://git.osmocom.org/openbsc
git clone git://git.osmocom.org/osmo-pcap
git clone git://git.osmocom.org/cellmgr-ng osmo-stp
git clone git://git.osmocom.org/osmo-trx
git clone git://git.osmocom.org/osmo-bts
git clone git://git.osmocom.org/osmo-pcu
git clone git://git.osmocom.org/osmo-hlr


PROJ=network:osmocom:nightly
osc co $PROJ

DT=`date +%Y%m%d`


build() {
  rm -rf data
  cd $1
  VER=`head -1 debian/changelog | cut -d ' ' -f 2 | sed s,"(","",  | sed s,")","",`
  dch -v $VER.$DT -m "Snapshot build"
  git commit -m "$DT snapshot" debian/
  gbp buildpackage -S -uc -us --git-export-dir=$PWD/../data
  cd ../$PROJ/$1
  osc rm * || true
  mv ../../data/*.dsc .
  mv ../../data/*.tar* .
  osc add *
  cd ../../
}

build libosmocore
build libosmo-sccp
build libosmo-abis
build libosmo-netif
build libsmpp34
build openggsn
build osmo-ggsn
build openbsc
build osmo-pcap
build osmo-stp
build osmo-trx
build osmo-sip-connector

cp openbsc/openbsc/include/openbsc/gsm_data_shared.h osmo-bts/include/openbsc/
cp openbsc/openbsc/src/libcommon/gsm_data_shared.c osmo-bts/src/common/gsm_data_shared.c
cd osmo-bts
git add include/openbsc/gsm_data_shared.h
git add src/common/gsm_data_shared.c
git commit -m "Copy OpenBSC files needed for the build"
cd ../
build osmo-bts
build osmo-pcu
build osmo-hlr

cd $PROJ
osc ci -m "Snapshot $DT"