diff --git a/README.md b/README.md index 8ab1185..b71a31b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # ussp-push +ussp-push is a OBEX object pusher for Linux, using the BlueZ BlueTooth stack. + diff --git a/ussp-push-0.11-bluez-4.patch b/ussp-push-0.11-bluez-4.patch new file mode 100644 index 0000000..0694bfb --- /dev/null +++ b/ussp-push-0.11-bluez-4.patch @@ -0,0 +1,15 @@ +Fix build against bluez4. + +Signed-off-by: Samuel Martin + +--- ussp-push-0.11.orig/src/obex_socket.c 2012-11-01 09:58:51.049538708 +0100 ++++ ussp-push-0.11/src/obex_socket.c 2012-11-01 12:10:10.719506951 +0100 +@@ -197,7 +197,7 @@ static int bt_sock_name2bth(int devid, c + for (i = 0; i < niinf; i++) { + char devname[128]; + +- if (hci_remote_name(dd, &piinf[i].bdaddr, sizeof(devname) - 1, ++ if (hci_read_remote_name(dd, &piinf[i].bdaddr, sizeof(devname) - 1, + devname, 100000) >= 0) { + if (strcasecmp(devname, btname) == 0) { + *btaddr = piinf[i].bdaddr; diff --git a/ussp-push-0.11-openobex-1.7.1.patch b/ussp-push-0.11-openobex-1.7.1.patch new file mode 100644 index 0000000..d0d62ba --- /dev/null +++ b/ussp-push-0.11-openobex-1.7.1.patch @@ -0,0 +1,54 @@ +diff -wbBur ussp-push-0.11/src/obex_main.c ussp-push-0.11.q/src/obex_main.c +--- ussp-push-0.11/src/obex_main.c 2008-08-25 00:48:53.000000000 +0400 ++++ ussp-push-0.11.q/src/obex_main.c 2013-05-27 14:13:06.533474671 +0400 +@@ -85,41 +85,6 @@ + int bt_debug; + + +- +-/* +- * These two functions are from affix/profiles/obex/obex_io.c +- */ +-int get_filesize(const char *filename) +-{ +- struct stat stats; +- +- stat(filename, &stats); +- return (int) stats.st_size; +-} +- +-uint8_t *easy_readfile(const char *filename, int *file_size) +-{ +- int actual; +- int fd; +- uint8_t *buf; +- +- fd = open(filename, O_RDONLY, 0); +- if (fd == -1) { +- return NULL; +- } +- *file_size = get_filesize(filename); +- printf("name=%s, size=%d\n", filename, *file_size); +- if (!(buf = malloc(*file_size))) { +- return NULL; +- } +- +- actual = read(fd, buf, *file_size); +- close(fd); +- +- *file_size = actual; +- return buf; +-} +- + /* + * This function comes from affix/profiles/obex/obex_client.c .. All I changed + * was a BTERROR() macro. The OBEX_HandleInput() calls inside the loop should +@@ -197,7 +197,7 @@ + *err = -1; + return NULL; + } +- if (!(handle = OBEX_Init(OBEX_TRANS_CUST, obex_event, 0))) { ++ if (!(handle = OBEX_Init(OBEX_TRANS_CUSTOM, obex_event, 0))) { + BTERROR("OBEX_Init failed: %s\n", strerror(errno)); + obex_free(gt); + *err = -1; diff --git a/ussp-push.spec b/ussp-push.spec new file mode 100644 index 0000000..4296792 --- /dev/null +++ b/ussp-push.spec @@ -0,0 +1,51 @@ +Name: ussp-push +Version: 0.11 +Release: 1mamba +Summary: A OBEX object pusher for Linux, using the BlueZ BlueTooth stack +Group: Applications/Communication +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://xmailserver.org/ussp-push.html +Source: http://xmailserver.org/ussp-push-%{version}.tar.gz +Patch0: ussp-push-0.11-bluez-4.patch +Patch1: ussp-push-0.11-openobex-1.7.1.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libbluetooth-devel +BuildRequires: libopenobex-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +ussp-push is a OBEX object pusher for Linux, using the BlueZ BlueTooth stack. + +%debug_package + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 + +%build +%configure \ + LDFLAGS="$LDFLAGS -lopenobex-apps-common" + +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%{_bindir}/ussp-push +%doc AUTHORS COPYING + +%changelog +* Wed Oct 30 2013 Silvan Calarco 0.11-1mamba +- package created by silvan using the webbuild interface