From f8464674e4741a25b651b5a58194632db737f69b Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 4 Oct 2018 19:25:35 +0200 Subject: limesuite WIP Change-Id: I786c6f4ad4b4e43d1692c1588d2ad2194d0b25a4 --- scripts/osmocom-latest-packages.sh | 87 +++++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 38 deletions(-) diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index ac5a2dd..4231987 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -4,6 +4,7 @@ # apt install git-buildpackage osc git set -e +set -x # OBS project name PROJ=network:osmocom:latest @@ -26,33 +27,43 @@ fi build() { project=$1 output=$2 + gitbpargs="" echo echo "====> Building $project" cd "$TOP" - [ -d "$1" ] || git clone "git://git.osmocom.org/$1" - cd "$1" + if [ "$project" = "limesuite" ]; then + ver_regexp="^v[0-9]*.[0-9]*.[0-9]*$" + [ -d "$project" ] || git clone "https://github.com/myriadrf/LimeSuite" "$project" + else + ver_regexp="^[0-9]*.[0-9]*.[0-9]*$" + [ -d "$project" ] || git clone "git://git.osmocom.org/$project" + fi + cd "$project" git fetch - VER=$(git tag -l --sort=v:refname | grep "^[0-9]*.[0-9]*.[0-9]*$" | tail -n 1) + VER=$(git tag -l --sort=v:refname | grep "$ver_regexp" | tail -n 1) + if [ "$project" = "limesuite" ]; then + gitbpargs="--git-upstream-tree=$VER" + fi git checkout -f -B "$VER" "refs/tags/$VER" if [ -x ./git-version-gen ]; then ./git-version-gen . > .tarball-version 2>/dev/null gbp buildpackage -S -uc -us -d --git-ignore-branch "--git-export-dir=$output" \ - "--git-debian-branch=$VER" --git-ignore-new \ + "--git-debian-branch=$VER" --git-ignore-new $gitbpargs \ --git-postexport='cp $GBP_GIT_DIR/../.tarball-version $GBP_TMP_DIR/' else gbp buildpackage -S -uc -us -d --git-ignore-branch "--git-export-dir=$output" \ - "--git-debian-branch=$VER" --git-ignore-new + "--git-debian-branch=$VER" --git-ignore-new $gitbpargs fi - if [ ! -d "$TOP/$PROJ/$1" ] ; then + if [ ! -d "$TOP/$PROJ/$project" ] ; then # creating a new package is different from using old ones - mkdir "$TOP/$PROJ/$1" - mv "$output/"*.dsc "$TOP/$PROJ/$1/" - mv "$output/"*.tar* "$TOP/$PROJ/$1/" + mkdir "$TOP/$PROJ/$project" + mv "$output/"*.dsc "$TOP/$PROJ/$project/" + mv "$output/"*.tar* "$TOP/$PROJ/$project/" cd "$TOP/$PROJ" - osc add "$1" + osc add "$project" else - cd "$TOP/$PROJ/$1" + cd "$TOP/$PROJ/$project" # update OBS only if the filename doesn't match file=$(cd "$output/" ; ls ./*.dsc) @@ -66,30 +77,6 @@ build() { cd "$TOP" } -PACKAGES=" - libosmocore - libosmo-sccp - libosmo-abis - libosmo-netif - libsmpp34 - libasn1c - libgtpnl - libusrp - osmo-iuh - osmo-ggsn - osmo-sgsn - openbsc - osmo-pcap - osmo-trx - osmo-sip-connector - osmo-bts - osmo-pcu - osmo-hlr - osmo-mgw - osmo-msc - osmo-bsc - simtrace2 - " # add those two once they have tagged any versions that include the 'debian' sub-dir #rtl-sdr #osmo-fl2k @@ -97,9 +84,33 @@ PACKAGES=" [ -d "$TOP/debsrc" ] && rm -rf "$TOP/debsrc" mkdir "$TOP/debsrc" -for p in $PACKAGES; do - build "$p" "$TOP/debsrc/$p" -done +build_debsrc() { + build "$1" "$TOP/debsrc/$1" +} + +build_debsrc limesuite +build_debsrc libosmocore +#build_debsrc libosmo-sccp +#build_debsrc libosmo-abis +#build_debsrc libosmo-netif +#build_debsrc libsmpp34 +#build_debsrc libasn1c +#build_debsrc libgtpnl +#build_debsrc libusrp +#build_debsrc osmo-iuh +#build_debsrc osmo-ggsn +#build_debsrc osmo-sgsn +#build_debsrc openbsc +#build_debsrc osmo-pcap +build_debsrc osmo-trx +#build_debsrc osmo-sip-connector +#build_debsrc osmo-bts +#build_debsrc osmo-pcu +#build_debsrc osmo-hlr +#build_debsrc osmo-mgw +#build_debsrc osmo-msc +#build_debsrc osmo-bsc +#build_debsrc simtrace2 cd "$TOP/$PROJ" osc ci -m "Latest Tagged versions of $DT" -- cgit v1.2.3