summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-03-23 20:01:18 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-03-23 20:01:18 +0000
commitd317576e384efba3ec19cb76c53403601ebd343c (patch)
treec0ccc316374c0476a936d20679e8e6b1390d2caf
parentAdd openobex, a library for OBEX (Object Exchange), a protocol to exchange (diff)
Add obexapp, a utility written by Maksim Yevmenkin (emax@FreeBSD.org)
to transport files over OBEX protocol. This only works for Bluetooth and needs -CURRENT as of January 20 or newer (sdpd import) to work, so IGNORE on 5.2.1-R and older. PR: ports/64597 Submitted by: Guido Falsi <mad@madpilot.net>
-rw-r--r--comms/Makefile1
-rw-r--r--comms/obexapp/Makefile31
-rw-r--r--comms/obexapp/distinfo2
-rw-r--r--comms/obexapp/files/patch-Makefile15
-rw-r--r--comms/obexapp/files/patch-main.c11
-rw-r--r--comms/obexapp/files/patch-server.c25
-rw-r--r--comms/obexapp/pkg-descr5
7 files changed, 90 insertions, 0 deletions
diff --git a/comms/Makefile b/comms/Makefile
index 35750400b7a8..efcc98b479dd 100644
--- a/comms/Makefile
+++ b/comms/Makefile
@@ -43,6 +43,7 @@
SUBDIR += mlan3
SUBDIR += mserver
SUBDIR += mwavem
+ SUBDIR += obexapp
SUBDIR += openobex
SUBDIR += p5-Device-Modem
SUBDIR += p5-Device-SerialPort
diff --git a/comms/obexapp/Makefile b/comms/obexapp/Makefile
new file mode 100644
index 000000000000..f854f9f6d8db
--- /dev/null
+++ b/comms/obexapp/Makefile
@@ -0,0 +1,31 @@
+# New ports collection makefile for: obexapp
+# Date created: 22 March 2004
+# Whom: Guido Falsi <mad@madpilot.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= obexapp
+PORTVERSION= 1.1
+CATEGORIES= comms net
+MASTER_SITES= http://www.geocities.com/m_evmenkin/
+
+MAINTAINER= mad@madpilot.net
+COMMENT= Obex application to transfer objects to mobile equipment
+
+LIB_DEPENDS= openobex-1.0.1:${PORTSDIR}/comms/openobex
+
+USE_GNOME= glib12
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
+MAN1= obexapp.1
+MANCOMPRESSED= yes
+PLIST_FILES= bin/obexapp
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 502101
+IGNORE= Needs -CURRENT from 20 Jan 2004 or later (sdpd)
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/comms/obexapp/distinfo b/comms/obexapp/distinfo
new file mode 100644
index 000000000000..6cd0ac5ad4fb
--- /dev/null
+++ b/comms/obexapp/distinfo
@@ -0,0 +1,2 @@
+MD5 (obexapp-1.1.tar.gz) = fbe6006f5f9490303ea43078edd298e8
+SIZE (obexapp-1.1.tar.gz) = 195743
diff --git a/comms/obexapp/files/patch-Makefile b/comms/obexapp/files/patch-Makefile
new file mode 100644
index 000000000000..e0a424db973b
--- /dev/null
+++ b/comms/obexapp/files/patch-Makefile
@@ -0,0 +1,15 @@
+--- Makefile.orig Mon Mar 22 22:14:11 2004
++++ Makefile Mon Mar 22 22:15:52 2004
+@@ -1,8 +1,10 @@
+ # $Id: Makefile,v 1.6 2004/03/12 22:10:52 max Exp $
+ # $FreeBSD$
+
+-BINDIR= /usr/local/bin
+-MANDIR= /usr/local/man/man
++PREFIX?= /usr/local
++
++BINDIR= ${PREFIX}/bin
++MANDIR= ${PREFIX}/man/man
+ PROG= obexapp
+ MAN1= obexapp.1
+
diff --git a/comms/obexapp/files/patch-main.c b/comms/obexapp/files/patch-main.c
new file mode 100644
index 000000000000..25d04ae5b05a
--- /dev/null
+++ b/comms/obexapp/files/patch-main.c
@@ -0,0 +1,11 @@
+--- main.c.orig Mon Mar 22 21:01:45 2004
++++ main.c Mon Mar 22 21:02:10 2004
+@@ -137,7 +137,7 @@
+ custfunc.listen = obexapp_transport_listen;
+ custfunc.write = obexapp_transport_write;
+ custfunc.handleinput = obexapp_transport_handle_input;
+- custfunc.userdata = &context;
++ custfunc.customdata = &context;
+
+ /* Process command line options */
+ service = 0;
diff --git a/comms/obexapp/files/patch-server.c b/comms/obexapp/files/patch-server.c
new file mode 100644
index 000000000000..05568c646607
--- /dev/null
+++ b/comms/obexapp/files/patch-server.c
@@ -0,0 +1,25 @@
+--- server.c.orig Mon Mar 22 21:04:12 2004
++++ server.c Mon Mar 22 21:32:45 2004
+@@ -105,6 +105,7 @@
+ {
+ context_p context = (context_p) OBEX_GetUserData(handle);
+ struct passwd *pw = NULL;
++ struct sockaddr *saddr = NULL;
+ gint error;
+
+ if (context->user != NULL) {
+@@ -169,7 +170,13 @@
+
+ g_message("%s: Starting OBEX server", G_GNUC_FUNCTION);
+
+- if (OBEX_ServerRegister(handle, "OBEX") < 0) {
++ if (( saddr = (struct sockaddr *) g_malloc(sizeof(struct sockaddr))) == NULL) {
++ g_critical("%s(): Could not allocate saddr",
++ G_GNUC_FUNCTION);
++ exit(1);
++ }
++
++ if (OBEX_ServerRegister(handle, saddr, sizeof(struct sockaddr)) < 0) {
+ g_critical("%s(): OBEX_ServerRegister failed", G_GNUC_FUNCTION);
+ return (-1);
+ }
diff --git a/comms/obexapp/pkg-descr b/comms/obexapp/pkg-descr
new file mode 100644
index 000000000000..993a024fff41
--- /dev/null
+++ b/comms/obexapp/pkg-descr
@@ -0,0 +1,5 @@
+An obex application to transfer objects (address book items, images, movies,
+anything the target can handle) to mobile devices via IrDA, Bluetooth and other
+protocol via the OBEX format.
+
+- Guido Falsi <mad@madpilot.net>