[packages/libbtctl] - updated to 0.11.1 (new soname)

qboosh qboosh at pld-linux.org
Sat Sep 6 20:09:13 CEST 2025


commit 0de6426a59ae4de9bb8d1ae24a178b84d0030072
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Sep 6 20:12:02 2025 +0200

    - updated to 0.11.1 (new soname)

 glib.patch               | 11 -------
 libbtctl-gtkdoc.patch    | 19 ++++++++++++
 libbtctl-make-jN.patch   | 36 ----------------------
 libbtctl-newapi.patch    | 12 --------
 libbtctl-openobex.patch  | 77 ++++++++++++++++++++++++++++++++++++++++++++++++
 libbtctl-pygobject.patch | 10 +++++++
 libbtctl.spec            | 49 +++++++++++++++++-------------
 7 files changed, 134 insertions(+), 80 deletions(-)
---
diff --git a/libbtctl.spec b/libbtctl.spec
index 2b9b476..f105df8 100644
--- a/libbtctl.spec
+++ b/libbtctl.spec
@@ -3,28 +3,28 @@
 # - mono bindings (build crashes on ppc)
 #
 # Conditional build:
-%bcond_with	apidocs		# gtk-doc based API documentation
+%bcond_without	apidocs		# gtk-doc based API documentation
 %bcond_without	static_libs	# static library
 
 Summary:	Bluetooth GObject based library
 Summary(pl.UTF-8):	Biblioteka do programowania urządzeń Bluetooth
 Name:		libbtctl
-Version:	0.10.0
-Release:	12
+Version:	0.11.1
+Release:	1
 # most code is LGPL v2.1+ but obexsdp.c is GPL v2+
 License:	GPL v2+
 Group:		Libraries
-Source0:	https://download.gnome.org/sources/libbtctl/0.10/%{name}-%{version}.tar.bz2
-# Source0-md5:	83d5f90efb2b26d1bd12a668940d02ba
-Patch0:		%{name}-make-jN.patch
-Patch1:		%{name}-newapi.patch
-Patch2:		glib.patch
+Source0:	https://download.gnome.org/sources/libbtctl/0.11/%{name}-%{version}.tar.bz2
+# Source0-md5:	5b5ab9e71dd5428c4e5c45cbf581a384
+Patch0:		%{name}-openobex.patch
+Patch1:		%{name}-pygobject.patch
+Patch2:		%{name}-gtkdoc.patch
 Patch3:		format-security.patch
 # dead
 #URL:		http://usefulinc.com/software/gnome-bluetooth/
 BuildRequires:	autoconf >= 2.52
 BuildRequires:	automake >= 1:1.9
-BuildRequires:	bluez-libs-devel >= 2.25
+BuildRequires:	bluez-libs-devel >= 4.0
 BuildRequires:	docbook-dtd412-xml
 BuildRequires:	gettext-tools
 BuildRequires:	glib2-devel >= 1:2.12.4
@@ -37,7 +37,7 @@ BuildRequires:	pkgconfig
 BuildRequires:	python-devel >= 1:2.3
 BuildRequires:	python-pygtk-devel >= 2.10.3
 BuildRequires:	rpm-pythonprov
-Requires:	bluez-libs >= 2.25
+Requires:	bluez-libs >= 4.0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -51,7 +51,7 @@ Summary:	Header files for libbtctl library
 Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki libbtctl
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
-Requires:	bluez-libs-devel >= 2.25
+Requires:	bluez-libs-devel >= 4.0
 Requires:	glib2-devel >= 1:2.12.4
 Requires:	openobex-devel >= 1.2
 
@@ -109,14 +109,15 @@ Dokumentacja API libbtctl.
 %build
 %{__libtoolize}
 %{__aclocal}
-%{__autoheader}
 %{__autoconf}
+%{__autoheader}
 %{__automake}
 %configure \
+	--enable-gtk-doc%{!?with_apidocs:=no} \
 	--disable-mono \
-	--%{?with_apidocs:en}%{!?with_apidocs:dis}able-gtk-doc \
-	--with-html-path=%{_gtkdocdir} \
-	%{!?with_static_libs:--disable-static}
+	%{!?with_static_libs:--disable-static} \
+	--with-html-path=%{_gtkdocdir}
+
 %{__make} \
 	pydir=%{py_sitedir}
 
@@ -128,9 +129,16 @@ rm -rf $RPM_BUILD_ROOT
 	HTML_DIR=%{_gtkdocdir} \
 	pydir=%{py_sitedir}
 
-rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.la
+%if %{with static_libs}
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.a
+%endif
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libbtctl.la
 
-%{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}}
+%if %{without apidocs}
+%{__rm} -rf $RPM_BUILD_ROOT%{_gtkdocdir}
+%endif
 
 %find_lang %{name}
 
@@ -144,13 +152,12 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS README TODO
 %attr(755,root,root) %{_libdir}/libbtctl.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libbtctl.so.4
+%ghost %{_libdir}/libbtctl.so.6
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libbtctl.so
-%{_libdir}/libbtctl.la
-%{_includedir}/%{name}
+%{_libdir}/libbtctl.so
+%{_includedir}/libbtctl
 %{_pkgconfigdir}/libbtctl.pc
 
 %if %{with static_libs}
diff --git a/glib.patch b/glib.patch
deleted file mode 100644
index 50d8386..0000000
--- a/glib.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libbtctl-0.10.0/src/btctl-types.h~	2007-03-06 00:07:20.000000000 +0100
-+++ libbtctl-0.10.0/src/btctl-types.h	2016-05-05 19:03:09.746566449 +0200
-@@ -1,7 +1,7 @@
- #ifndef __BTCTL_TYPES_H__
- #define __BTCTL_TYPES_H__
- 
--#include <glib/gmacros.h>
-+#include <glib.h>
- #include <glib-object.h>
- 
- G_BEGIN_DECLS
diff --git a/libbtctl-gtkdoc.patch b/libbtctl-gtkdoc.patch
new file mode 100644
index 0000000..283691a
--- /dev/null
+++ b/libbtctl-gtkdoc.patch
@@ -0,0 +1,19 @@
+--- libbtctl-0.11.1/docs/reference/Makefile.am.orig	2007-03-06 00:07:20.000000000 +0100
++++ libbtctl-0.11.1/docs/reference/Makefile.am	2025-09-06 19:59:12.344307770 +0200
+@@ -133,7 +133,6 @@ tmpl-build.stamp: $(DOC_MODULE)-decl.txt
+ 	for x in $(DOC_MODULE)-decl.txt $(DOC_MODULE)-sections.txt; do \
+ 		test -f $$x || cp $(srcdir)/$$x $$x; \
+ 	done
+-	cd $(blddir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
+ 	touch tmpl-build.stamp
+ 
+ tmpl.stamp: tmpl-build.stamp
+@@ -158,7 +157,7 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_
+ 	cd $(blddir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+ 	test "x$(HTML_IMAGES)" = "x" || ( cd $(blddir) && cp $(HTML_IMAGES) html )
+ 	@echo '-- Fixing Crossreferences' 
+-	cd $(blddir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
++	cd $(blddir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) --module=$(DOC_MODULE) $(FIXXREF_OPTIONS)
+ 	touch html-build.stamp
+ endif
+ 
diff --git a/libbtctl-make-jN.patch b/libbtctl-make-jN.patch
deleted file mode 100644
index b71933d..0000000
--- a/libbtctl-make-jN.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- libbtctl-0.9.0/src/Makefile.am~	2007-03-06 00:07:20.000000000 +0100
-+++ libbtctl-0.9.0/src/Makefile.am	2007-12-19 00:18:56.483397750 +0100
-@@ -37,27 +37,27 @@
- 	libbtctl.la \
- 	$(BTCTL_LIBS) $(BLUETOOTH_LIBS) $(OPENOBEX_LIBS)
- 
--btctl_async_test_LDFLAGS= \
-+btctl_async_test_LDADD= \
- 	libbtctl.la  $(BTCTL_LIBS) \
- 	$(BLUETOOTH_LIBS) $(OPENOBEX_LIBS)
- 
--btobexclient_test_LDFLAGS= \
-+btobexclient_test_LDADD= \
- 	libbtctl.la  $(BTCTL_LIBS) \
- 	$(BLUETOOTH_LIBS) $(OPENOBEX_LIBS)
- 
--btobex_test_LDFLAGS= \
-+btobex_test_LDADD= \
- 	libbtctl.la  $(BTCTL_LIBS) \
- 	$(BLUETOOTH_LIBS) $(OPENOBEX_LIBS)
- 
--btctl_discovery_test_LDFLAGS= \
-+btctl_discovery_test_LDADD= \
- 	libbtctl.la  $(BTCTL_LIBS) \
- 	$(BLUETOOTH_LIBS) $(OPENOBEX_LIBS)
- 
--btlist_LDFLAGS = \
-+btlist_LDADD = \
- 	libbtctl.la  $(BTCTL_LIBS) \
- 	$(BLUETOOTH_LIBS) $(OPENOBEX_LIBS)
- 
--btsignal_watch_LDFLAGS = \
-+btsignal_watch_LDADD = \
- 	libbtctl.la $(BTCTL_LIBS) \
- 	$(BLUETOOTH_LIBS) $(OPENOBEX_LIBS)
- 
diff --git a/libbtctl-newapi.patch b/libbtctl-newapi.patch
deleted file mode 100644
index 7376482..0000000
--- a/libbtctl-newapi.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN libbtctl-0.10.0/src/btctlimpl.c libbtctl-0.10.0.new/src/btctlimpl.c
---- libbtctl-0.10.0/src/btctlimpl.c	2007-07-12 20:23:29.000000000 +0200
-+++ libbtctl-0.10.0.new/src/btctlimpl.c	2008-09-06 16:46:58.000000000 +0200
-@@ -330,7 +330,7 @@
- 	if (dd>=0) {
- 		for (i = 0; i < num_rsp; i++) {
- 			memset(name, 0, sizeof(name));
--			if (hci_remote_name(dd, &(info+i)->bdaddr,
-+			if (hci_read_remote_name(dd, &(info+i)->bdaddr,
- 						sizeof(name), name, 100000) < 0)
- 				strcpy(name, "n/a");
- 
diff --git a/libbtctl-openobex.patch b/libbtctl-openobex.patch
new file mode 100644
index 0000000..34e2799
--- /dev/null
+++ b/libbtctl-openobex.patch
@@ -0,0 +1,77 @@
+--- libbtctl-0.11.1/src/btobex.c.orig	2007-07-24 16:53:51.000000000 +0200
++++ libbtctl-0.11.1/src/btobex.c	2025-09-06 19:14:17.315574660 +0200
+@@ -30,6 +30,26 @@
+ #include "btctl-marshal.h"
+ #include "obexsdp.h"
+ 
++static int priv_OBEX_UnicodeToChar(uint8_t *c, const uint8_t *uc, int size)
++{
++	int n;
++
++	if (uc == NULL || c == NULL)
++		return -1;
++
++	/* Make sure buffer is big enough! */
++	for (n = 0; uc[n*2+1] != 0; n++);
++
++	if (n >= size)
++		return -1;
++
++	for (n = 0; uc[n*2+1] != 0; n++)
++		c[n] = uc[n*2+1];
++	c[n] = 0;
++
++	return 0;
++}
++
+ static gpointer		 parent_class = NULL;
+ 
+ /* gtk object prototypes */
+@@ -310,7 +330,7 @@ put_done (BtctlObex *bo, BtctlObexserver
+ 				if ((namebuf = g_new0 (gchar, hlen/2))) {
+ 					/* FIXME: figure out which encoding of unicode is
+ 					 * being used and handle it properly */
+-					OBEX_UnicodeToChar (namebuf, hv.bs, hlen);
++					priv_OBEX_UnicodeToChar (namebuf, hv.bs, hlen);
+ 					name = namebuf;
+ 				}
+ 				break;
+--- libbtctl-0.11.1/src/obex-client-source.c.orig	2007-03-06 00:07:19.000000000 +0100
++++ libbtctl-0.11.1/src/obex-client-source.c	2025-09-06 19:15:58.815024791 +0200
+@@ -37,6 +37,27 @@
+ 
+ #define OBEX_STREAM_CHUNK       4096
+ 
++static int priv_OBEX_CharToUnicode(uint8_t *uc, const uint8_t *c, int size)
++{
++	int len, n;
++
++	if (uc == NULL || c == NULL)
++		return -1;
++
++	len = n = strlen((char *) c);
++	if (n*2+2 > size)
++		return -1;
++
++	uc[n*2+1] = 0;
++	uc[n*2] = 0;
++
++	while (n--) {
++		uc[n*2+1] = c[n];
++		uc[n*2] = 0;
++	}
++
++	return (len * 2) + 2;
++}
+ /* GSourceFuncs */
+ 
+ static gboolean btctl_obexclient_source_prepare (GSource *source, gint *timeout);
+@@ -327,7 +348,7 @@ btctl_obexclient_source_push (BtctlObexc
+ 	bfname = g_path_get_basename (fname);
+ 	uname_size = (strlen (bfname)+1)*2;
+ 	uname = g_malloc (uname_size);
+-	OBEX_CharToUnicode (uname, bfname, uname_size);
++	priv_OBEX_CharToUnicode (uname, bfname, uname_size);
+ 
+ 	hd.bs = uname;
+ 	OBEX_ObjectAddHeader (bc->handle, object,
diff --git a/libbtctl-pygobject.patch b/libbtctl-pygobject.patch
new file mode 100644
index 0000000..6aaa912
--- /dev/null
+++ b/libbtctl-pygobject.patch
@@ -0,0 +1,10 @@
+--- libbtctl-0.11.1/src/Makefile.am.orig	2008-08-28 17:31:03.000000000 +0200
++++ libbtctl-0.11.1/src/Makefile.am	2025-09-06 19:26:55.984797930 +0200
+@@ -123,6 +123,7 @@ btctl-py.c: btctl.defs btctl.override
+ 	btctl.defs > $@
+ 
+ btctl_la_SOURCES = btctl-py.c btctl-pymodule.c
++btctl_la_CFLAGS = -fcommon
+ btctl_la_LIBADD = libbtctl.la
+ btctl_la_LDFLAGS = -module -avoid-version
+ btctl_la_LIBADD = $(BTCTLPY_LIBS)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libbtctl.git/commitdiff/0de6426a59ae4de9bb8d1ae24a178b84d0030072



More information about the pld-cvs-commit mailing list