Compare commits

...

5 Commits

Author SHA1 Message Date
01a7c0fe71 debian files 2025-10-17 22:45:39 +08:00
TheKit
0686f965fb add hack to allow more than 1 active context on MTK
[ratchanan@ubports.com: port the patch to ofono-binder-plugin]

Origin: vendor
Bug-UBports: https://gitlab.com/ubports/development/core/packaging/ofono-binder-plugin/-/issues/1
Forwarded: not-needed
2025-10-17 22:40:36 +08:00
e29eaa45e8 Makefile don't meddle with debian folder 2025-10-17 22:40:24 +08:00
Marius Gripsgard
cd40ce7466 Makefile: allow building against an oFono variant 2025-10-17 22:38:27 +08:00
TheKit
f1bc06ee38 Makefile: do not remove debian/*.install during clean step 2025-10-17 22:38:27 +08:00
11 changed files with 104 additions and 18 deletions

View File

@@ -5,6 +5,9 @@
.PHONY: print_debug_lib print_release_lib print_coverage_lib
.PHONY: debug_ext_so release_ext_so
# Allow building against an oFono variant.
OFONO_PKG ?= ofono
#
# Required packages
#
@@ -13,7 +16,7 @@
#
LDPKGS = libgbinder-radio libgbinder libmce-glib libglibutil gobject-2.0 glib-2.0
PKGS = ofono $(LDPKGS)
PKGS = $(OFONO_PKG) $(LDPKGS)
#
# Default target
@@ -178,10 +181,7 @@ release_ext_so:
clean:
make -C unit clean
make -C $(EXTLIB_DIR) clean
rm -fr debian/*.install debian/.debhelper debian/tmp
rm -fr debian/libofonobinderpluginext debian/libofonobinderpluginext-dev
rm -f documentation.list debian/files debian/*.substvars
rm -f debian/*.debhelper.log debian/*.debhelper debian/*~
rm -f documentation.list
rm -f *~ $(SRC_DIR)/*~ rpm/*~
rm -fr $(BUILD_DIR)
@@ -231,7 +231,7 @@ $(COVERAGE_LIB): $(COVERAGE_OBJS)
# Install
#
PLUGINDIR ?= $$(pkg-config ofono --variable=plugindir)
PLUGINDIR ?= $$(pkg-config $(OFONO_PKG) --variable=plugindir)
ABS_PLUGINDIR := $(shell echo /$(PLUGINDIR) | sed -r 's|/+|/|g')
INSTALL = install

10
debian/Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,10 @@
@Library('ubports-build-tools') _
buildAndProvideDebianPackage()
// Or if the package consists entirely of arch-independent packages:
// (optional optimization, will confuse BlueOcean's live view at build stage)
// buildAndProvideDebianPackage(/* isArchIndependent */ true)
// Optionally, to skip building on some architectures (amd64 is always built):
// buildAndProvideDebianPackage(false, /* ignoredArchs */ ['arm64'])

32
debian/changelog vendored
View File

@@ -1,3 +1,35 @@
ofono-binder-plugin (1.1.21-0ubports1) noble; urgency=medium
* New upstream release v1.1.21
-- TheKit <thekit@disroot.org> Mon, 03 Mar 2025 22:30:54 +0300
ofono-binder-plugin (1.1.20-0ubports1) noble; urgency=medium
* New upstream release v1.1.20
-- TheKit <thekit@disroot.org> Mon, 03 Feb 2025 00:26:23 +0300
ofono-binder-plugin (1.1.18-0ubports1) UNRELEASED; urgency=unknown
* New upstream release v1.1.18
-- UBports package upgrader bot <dev@ubports.com> Sun, 22 Dec 2024 18:20:07 +0000
ofono-binder-plugin (1.1.15-0ubports1) noble; urgency=medium
* New upstream release
* debian/patches: import Fallback to IRadio in
binder_voicecall_answer and merge calls lists from upstream PR 31
-- TheKit <thekit@disroot.org> Thu, 15 Aug 2024 15:32:13 +0300
ofono-binder-plugin (1.1.11-0ubports1) focal; urgency=low
* Add initial packaging for Ubuntu Touch.
-- TheKit <thekit@disroot.org> Mon, 26 Apr 2023 21:44:17 +0300
libofonobinderpluginext (1.1.0) unstable; urgency=low
* Stable release of the extension API

21
debian/control vendored
View File

@@ -1,10 +1,25 @@
Source: libofonobinderpluginext
Source: ofono-binder-plugin
Section: libs
Priority: optional
Maintainer: Slava Monich <slava@monich.com>
Build-Depends: debhelper (>= 8.1.3), libglib2.0-dev (>= 2.0)
Maintainer: UBports developers <devs@ubports.com>
Build-Depends: debhelper-compat (= 12),
libglib2.0-dev (>= 2.0),
libmce-glib-dev,
libglibutil-dev,
libgbinder-dev,
libgbinder-radio1-dev,
ofono-sailfish-dev (>= 1.29+git8-0ubports1~),
Standards-Version: 3.8.4
Package: ofono-binder-plugin
Section: libs
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends},
Description: oFono binder-based IRadio plugin
Integrates Sailfish OS fork of ofono with Android adaptations
which support IRadio family of binder interfaces.
Package: libofonobinderpluginext
Section: libs
Architecture: any

View File

@@ -0,0 +1,3 @@
usr/lib/*/libofonobinderpluginext.so
usr/lib/*/pkgconfig/libofonobinderpluginext.pc
usr/include/*

View File

@@ -0,0 +1 @@
usr/lib/*/libofonobinderpluginext.so.*

1
debian/ofono-binder-plugin.install vendored Normal file
View File

@@ -0,0 +1 @@
usr/lib/*/ofono-sailfish/plugins/binderplugin.so

8
debian/rules vendored
View File

@@ -4,13 +4,17 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export OFONO_PKG = ofono-sailfish
LIBDIR=usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
override_dh_auto_build:
dh_auto_build -- -C lib LIBDIR=$(LIBDIR) release pkgconfig ../debian/libofonobinderpluginext.install ../debian/libofonobinderpluginext-dev.install
dh_auto_build -- LIBDIR=$(LIBDIR) release
override_dh_auto_install:
dh_auto_install -- -C lib LIBDIR=$(LIBDIR) install-dev
dh_auto_install
make -C lib LIBDIR=$(LIBDIR) pkgconfig
make -C lib LIBDIR=$(LIBDIR) DESTDIR=../debian/tmp install-dev
%:
dh $@

View File

@@ -6,12 +6,15 @@
.PHONY: print_debug_lib print_release_lib print_coverage_lib
.PHONY: pkgconfig install install-dev
# Allow building against an oFono variant.
OFONO_PKG ?= ofono
#
# Required packages
#
PKGS = libgbinder-radio libglibutil glib-2.0 gobject-2.0
LDPKGS = libgbinder-radio libglibutil glib-2.0 gobject-2.0
PKGS = $(OFONO_PKG) $(LDPKGS)
#
# Default target
@@ -78,7 +81,7 @@ BASE_FLAGS = -fPIC
FULL_CFLAGS = $(BASE_FLAGS) $(CFLAGS) $(DEFINES) $(WARNINGS) $(INCLUDES) \
-MMD -MP $(shell pkg-config --cflags $(PKGS))
FULL_LDFLAGS = $(BASE_FLAGS) $(LDFLAGS) -shared -Wl,-soname,$(LIB_SONAME) \
$(shell pkg-config --libs $(PKGS)) -lpthread
$(shell pkg-config --libs $(LDPKGS)) -lpthread
DEBUG_FLAGS = -g
RELEASE_FLAGS =
COVERAGE_FLAGS = -g

View File

@@ -199,8 +199,15 @@ binder_gprs_max_data_calls_changed(
BinderGprs* self = user_data;
if (net->max_data_calls > 0) {
DBG_(self, "setting max cids to %d", net->max_data_calls);
ofono_gprs_set_cid_range(self->gprs, 1, net->max_data_calls);
int max_data_calls = net->max_data_calls;
// Some MediaTek RILs support more than 1 active context on Android
// but report only 1 in response to getDataRegistrationState
if (max_data_calls == 1)
max_data_calls = 3;
DBG_(self, "setting max cids to %d", max_data_calls);
ofono_gprs_set_cid_range(self->gprs, 1, max_data_calls);
}
}
@@ -256,8 +263,15 @@ binder_gprs_register(
network->data.status);
if (network->max_data_calls > 0) {
DBG_(self, "setting max cids to %d", network->max_data_calls);
ofono_gprs_set_cid_range(gprs, 1,network->max_data_calls);
int max_data_calls = network->max_data_calls;
// Some MediaTek RILs support more than 1 active context on Android
// but report only 1 in response to getDataRegistrationState
if (max_data_calls == 1)
max_data_calls = 3;
DBG_(self, "setting max cids to %d", max_data_calls);
ofono_gprs_set_cid_range(self->gprs, 1, max_data_calls);
}
ofono_gprs_register(gprs);

View File

@@ -16,12 +16,15 @@ endif
SRC ?= $(EXE).c
# COMMON_SRC += test_main.c
# Allow building against an oFono variant.
OFONO_PKG ?= ofono
#
# Required packages
#
LINK_PKGS += libglibutil glib-2.0 gobject-2.0
PKGS += $(LINK_PKGS) libgbinder libgbinder-radio
PKGS += $(OFONO_PKG) $(LINK_PKGS) libgbinder libgbinder-radio
#
# Default target