Skip to content

Commit

Permalink
build with revision
Browse files Browse the repository at this point in the history
  • Loading branch information
0312birdzhang authored Nov 28, 2024
1 parent 2f928e5 commit b6f2034
Show file tree
Hide file tree
Showing 3 changed files with 380 additions and 8 deletions.
4 changes: 2 additions & 2 deletions build-rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ sed -i '/CONFIG_NETFILTER_XT_MATCH_QTAGUID/d' hybris/mer-kernel-check/mer_verify
sb2 -t $VENDOR-$DEVICE-$PORT_ARCH -m sdk-install -R zypper in -y ccache

cd $ANDROID_ROOT
cp /home/mersdk/work/ci/ci/helpers/build_packages.sh rpm/dhd/helpers/
chmod +x rpm/dhd/helpers/build_packages.sh
cp /home/mersdk/work/ci/ci/helpers/*.sh rpm/dhd/helpers/
chmod +x rpm/dhd/helpers/*.sh

cd $ANDROID_ROOT
# move it to here
Expand Down
19 changes: 13 additions & 6 deletions helpers/build_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Usage: $0 [OPTION]..."
-v, --version build droid-hal-version
-i, --mic build image
-b, --build=PKG build one package (PKG can include path)
-r, --revision=REV optionally used with -m
build package version from a specific git tag or commit hash
-s, --spec=SPEC optionally used with -m or -b
can be supplied multiple times to build multiple .spec files at once
-N --no-auto-version
Expand All @@ -56,7 +58,7 @@ EOF
exit 1
}

OPTIONS=$(getopt -o hdcm::gvib:s:DonN -l help,droid-hal,configs,mw::,gg,version,mic,build:,spec:,do-not-install,offline,no-delete,no-auto-version -- "$@")
OPTIONS=$(getopt -o hdcm::gvib:r:s:DonN -l help,droid-hal,configs,mw::,gg,version,mic,build:,revision:,spec:,do-not-install,offline,no-delete,no-auto-version -- "$@")

if [ $? -ne 0 ]; then
echo "getopt error"
Expand Down Expand Up @@ -96,6 +98,11 @@ while true; do
*) BUILDPKG_PATH=$2;;
esac
shift;;
-r|--revision) BUILDREV=1
case "$2" in
*) BUILDREV_ARGS="-r $2";;
esac
shift;;
-s|--spec) BUILDSPEC=1
case "$2" in
*) BUILDSPEC_FILE+=("$2");;
Expand Down Expand Up @@ -224,10 +231,10 @@ if [ "$BUILDMW" = "1" ]; then
# No point in asking when only one mw package is being built
BUILDMW_QUIET=1
if [ -z "$BUILDSPEC_FILE" ]; then
buildmw -u "$BUILDMW_REPO" || die
buildmw -u "$BUILDMW_REPO" $BUILDREV_ARGS || die
else
# Supply all given spec files from $BUILDSPEC_FILE array prefixed with "-s"
buildmw -u "$BUILDMW_REPO" "${BUILDSPEC_FILE[@]/#/-s }" || die
buildmw -u "$BUILDMW_REPO" "${BUILDSPEC_FILE[@]/#/-s }" $BUILDREV_ARGS || die
fi
elif [ -n "$manifest" ] &&
grep -ql hybris/mw $manifest; then
Expand Down Expand Up @@ -283,11 +290,11 @@ if [ "$BUILDMW" = "1" ]; then
buildmw -u "https://github.com/mer-hybris/qt5-qpa-hwcomposer-plugin" || die
if [ $android_version_major -le 8 ]; then
buildmw -u "https://github.com/sailfishos/sensorfw.git" \
-s rpm/sensorfw-qt5-hybris.spec || die
-s rpm/sensorfw-qt5-hybris.spec -r 0.14.10|| die
fi
if [ $android_version_major -le 7 ]; then
buildmw -u "https://github.com/Sailfish-On-Vince/geoclue-providers-hybris" \
-s rpm/geoclue-providers-hybris.spec || die
buildmw -u "https://github.com/mer-hybris/geoclue-providers-hybris" \
-s rpm/geoclue-providers-hybris.spec -r 0.2.35|| die
fi
# build kf5bluezqt-bluez4 if not yet provided by Sailfish OS itself
#sdk-assistant maintain $VENDOR-$DEVICE-$PORT_ARCH zypper se kf5bluezqt-bluez4 > /dev/null
Expand Down
Loading

0 comments on commit b6f2034

Please sign in to comment.