diff options
author | Patrick Höhn <hoehnp@users.noreply.github.com> | 2018-10-21 20:08:42 +0200 |
---|---|---|
committer | Pierre GRANDIN <pgrandin@users.noreply.github.com> | 2018-10-21 11:08:42 -0700 |
commit | f6db3ba495964985a0e7ddddaec6a8e070d70d85 (patch) | |
tree | a8a80e3d54d1b8615998660f6bd1e04983eac2db | |
parent | ce949480009e8ac4df6e81173c4e312958913605 (diff) | |
download | navit-f6db3ba495964985a0e7ddddaec6a8e070d70d85.tar.gz |
add:sailfish:added script to build a package for Sailfish OS (#679)
Currently needs to be built via Travis instead of CircleCI ( see https://discuss.circleci.com/t/non-reproducable-build-results/25864 for details )
-rw-r--r-- | .travis.yml | 23 | ||||
-rwxr-xr-x | contrib/sailfish/build_sailfish_ci.sh | 22 |
2 files changed, 45 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..09919cf68 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,23 @@ +sudo: required + +language: c + +services: + - docker + +before_install: +- mkdir ../rpmbuild +- docker pull hoehnp/sailfishos-platform-sdk:2.2.1.18-r1 +- docker run -e VERSION_ID=2.2.1.18 -v `pwd`:/home/nemo/navit hoehnp/sailfishos-platform-sdk:2.2.1.18-r1 /bin/bash -x /home/nemo/navit/contrib/sailfish/build_sailfish_ci.sh + +before_deploy: + - provider: pages + - skip-cleanup: true + - github-token: $GITHUB_TOKEN + - keep-history: true + - local-history: `pwd`/../rpmbuild/RPMS/armv7hl/ + - local-history: `pwd`/../rpmbuild/RPMS/i586/ +before_script: skip +script: skip +after_success: skip +after_script: skip diff --git a/contrib/sailfish/build_sailfish_ci.sh b/contrib/sailfish/build_sailfish_ci.sh new file mode 100755 index 000000000..58d1022f3 --- /dev/null +++ b/contrib/sailfish/build_sailfish_ci.sh @@ -0,0 +1,22 @@ +#!/bin/sh +#run on the Sailfish OS sdk docker container. Check that rpmbuild directory exists. Remember to export VERSION_ID +# please don't mess around with those lines without testing, +# even if some fancy tool tells you to do so to save some pipes. +# -hoehnp- + +if [ -z ${VERSION_ID+x} ]; then echo "VERSION_ID not set. Forgot to export VERSION_ID?"; exit 1; fi + +# First we need to cd to the directory containing this script and the spec file. +# Makes calling it directly from docker easier. +SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" +cd $SCRIPTPATH +ls -lah /navit +mkdir $HOME/rpmbuild + +#arm devices +sb2 -t SailfishOS-${VERSION_ID}-armv7hl -m sdk-install -R zypper --non-interactive in $(grep "^BuildRequires: " navit-sailfish.spec | sed -e "s/BuildRequires: //") +sb2 -t SailfishOS-${VERSION_ID}-armv7hl -m sdk-build rpmbuild --define "_topdir /home/nemo/rpmbuild" --define "navit_source ${SCRIPTPATH}/../.." -bb navit-sailfish.spec +#intel devices +sb2 -t SailfishOS-${VERSION_ID}-i486 -m sdk-install -R zypper --non-interactive in $(grep "^BuildRequires: " navit-sailfish.spec | sed -e "s/BuildRequires: //") +sb2 -t SailfishOS-${VERSION_ID}-i486 -m sdk-build rpmbuild --define "_topdir /home/nemo/rpmbuild" --define "navit_source ${SCRIPTPATH}/../.." -bb navit-sailfish.spec + |