Browse Source

2014-11-11 Ryoichi INAGAKI <ryo1@toki.waseda.jp>

	* libbtctl: added patch
	* obex-data-server, obexftp, openobex: updated
	


git-svn-id: http://trac.vinelinux.org/repos/projects/specs@9078 ec354946-7b23-47d6-9f5a-488ba84defc7
inagaki 9 years ago
parent
commit
25f34ab486

+ 464 - 0
lib/libb/libbtctl/libbtctl-0.11.1-unicode.patch

@@ -0,0 +1,464 @@
+--- libbtctl-0.11.1/src/Makefile.am.unicode	2014-11-11 18:43:29.000000000 -0800
++++ libbtctl-0.11.1/src/Makefile.am	2014-11-11 19:00:55.000000000 -0800
+@@ -70,7 +70,7 @@
+ 	obex-server-source.c obex-server-source.h \
+ 	obex-server-source-private.h \
+ 	btobex.c btobex.h obexsdp.h obexsdp.c \
+-	obex-client-source.c obex-client-source.h \
++	obex-client-source.c obex-client-source.h unicode.c unicode.h common.h \
+ 	btobex-client.c btobex-client.h \
+ 	btctl-types.h btctl-types.c
+ 
+--- libbtctl-0.11.1/src/btobex.c.unicode	2007-07-24 07:53:51.000000000 -0700
++++ libbtctl-0.11.1/src/btobex.c	2014-11-11 18:56:25.000000000 -0800
+@@ -29,6 +29,7 @@
+ #include "btctl-types.h"
+ #include "btctl-marshal.h"
+ #include "obexsdp.h"
++#include "unicode.h"
+ 
+ static gpointer		 parent_class = NULL;
+ 
+@@ -310,7 +311,7 @@
+ 				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);
++					UnicodeToChar (namebuf, hv.bs, hlen);
+ 					name = namebuf;
+ 				}
+ 				break;
+--- libbtctl-0.11.1/src/obex-client-source.c.unicode	2007-03-05 15:07:19.000000000 -0800
++++ libbtctl-0.11.1/src/obex-client-source.c	2014-11-11 18:57:30.000000000 -0800
+@@ -34,6 +34,7 @@
+ 
+ #include "obex-client-source.h"
+ #include "obex-server-source-private.h"
++#include "unicode.h"
+ 
+ #define OBEX_STREAM_CHUNK       4096
+ 
+@@ -327,7 +328,7 @@
+ 	bfname = g_path_get_basename (fname);
+ 	uname_size = (strlen (bfname)+1)*2;
+ 	uname = g_malloc (uname_size);
+-	OBEX_CharToUnicode (uname, bfname, uname_size);
++	CharToUnicode (uname, bfname, uname_size);
+ 
+ 	hd.bs = uname;
+ 	OBEX_ObjectAddHeader (bc->handle, object,
+--- /dev/null	2014-11-11 18:16:49.229711166 -0800
++++ libbtctl-0.11.1/src/unicode.h	2013-03-05 12:43:50.000000000 -0800
+@@ -0,0 +1,39 @@
++/**
++	\file obexftp/unicode.h
++	Unicode charset and encoding conversions.
++	ObexFTP library - language bindings for OBEX file transfer.
++
++	Copyright (c) 2007 Christian W. Zuckschwerdt <zany@triq.net>
++
++	ObexFTP is free software; you can redistribute it and/or modify
++	it under the terms of the GNU Lesser General Public License as
++	published by the Free Software Foundation; either version 2 of
++	the License, or (at your option) any later version.
++
++	This program is distributed in the hope that it will be useful,
++	but WITHOUT ANY WARRANTY; without even the implied warranty of
++	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++	GNU Lesser General Public License for more details.
++
++	You should have received a copy of the GNU Lesser General Public
++	License along with ObexFTP. If not, see <http://www.gnu.org/>.
++ */
++
++#ifndef OBEXFTP_UNICODE_H
++#define OBEXFTP_UNICODE_H
++
++#include <inttypes.h>
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++int CharToUnicode(uint8_t *uc, const uint8_t *c, int size);
++int UnicodeToChar(uint8_t *c, const uint8_t *uc, int size);
++int Utf8ToChar(uint8_t *c, const uint8_t *uc, int size);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* OBEXFTP_UNICODE_H */
+--- /dev/null	2014-11-11 18:16:49.229711166 -0800
++++ libbtctl-0.11.1/src/unicode.c	2013-03-05 12:43:50.000000000 -0800
+@@ -0,0 +1,294 @@
++/**
++	\file obexftp/unicode.c
++	Unicode charset and encoding conversions.
++	ObexFTP library - language bindings for OBEX file transfer.
++
++	Copyright (c) 2007 Christian W. Zuckschwerdt <zany@triq.net>
++
++	ObexFTP is free software; you can redistribute it and/or modify
++	it under the terms of the GNU Lesser General Public License as
++	published by the Free Software Foundation; either version 2 of
++	the License, or (at your option) any later version.
++
++	This program is distributed in the hope that it will be useful,
++	but WITHOUT ANY WARRANTY; without even the implied warranty of
++	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++	GNU Lesser General Public License for more details.
++
++	You should have received a copy of the GNU Lesser General Public
++	License along with ObexFTP. If not, see <http://www.gnu.org/>.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#ifdef _WIN32 /* no need for iconv */
++#include <windows.h> /* pulls in Winnls.h */
++#else
++#ifdef HAVE_ICONV
++#include <iconv.h>
++#include <locale.h>
++#ifndef ICONV_CONST
++#define ICONV_CONST
++#endif
++#ifdef HAVE_LANGINFO_H
++#include <langinfo.h>
++#define locale_charset nl_langinfo(CODESET)
++#else
++#define locale_charset ""
++#endif /* HAVE_LANGINFO_H */
++#endif /* HAVE_ICONV */
++#endif /* _WIN32 */
++
++#include "unicode.h"
++
++#include <common.h>
++
++
++/**
++	Convert a string to UTF-16BE, tries to guess charset and encoding.
++
++	As a lib we can't be sure what the input charset and encoding is.
++	Try to read the input as UTF-8, this will also work for plain ASCII (7bit).
++	On errors fall back to the environment locale, which again could be UTF-8.
++	As last resort try to copy verbatim, i.e. as ISO-8859-1.
++
++	\note This is a quick hack until OpenOBEX is iconv-ready.
++ */
++int CharToUnicode(uint8_t *uc, const uint8_t *c, int size)
++{
++#ifdef _WIN32 /* no need for iconv */
++	int ret, i;
++	char tmp;
++
++        return_val_if_fail(uc != NULL, -1);
++        return_val_if_fail(c != NULL, -1);
++
++	/* ANSI to UTF-16LE */
++	ret = MultiByteToWideChar(CP_ACP, 0, c, -1, (LPWSTR)uc, size);
++	/* turn the eggs the right way around now */
++	for (i=0; i < ret; i++) {
++		tmp = uc[2*i];
++		uc[2*i] = uc[2*i+1];
++		uc[2*i+1] = tmp;
++	}
++	return ret * 2; /* 0 on error */
++#else /* _WIN32 */
++
++#ifdef HAVE_ICONV
++	iconv_t utf16;
++	size_t ni, no, nrc;
++	/* avoid type-punned dereferecing (breaks strict aliasing) */
++	ICONV_CONST char *cc = (ICONV_CONST char *)c;
++	char *ucc = (char *)uc;
++
++        return_val_if_fail(uc != NULL, -1);
++        return_val_if_fail(c != NULL, -1);
++
++	/* try UTF-8 to UTF-16BE */
++	ni = strlen(cc) + 1;
++	no = size;
++	utf16 = iconv_open("UTF-16BE", "UTF-8");
++       	nrc = iconv(utf16, &cc, &ni, &ucc, &no);
++		(void)iconv_close(utf16);
++       	if (nrc == (size_t)(-1)) {
++       		DEBUG(3, "Iconv from UTF-8 conversion error: '%s'\n", cc);
++       	} else {
++		return size-no;
++	}
++
++	/* try current locale charset to UTF-16BE */
++	setlocale(LC_CTYPE, "");
++	DEBUG(2, "Iconv from locale \"%s\"\n", locale_charset);
++	cc = (ICONV_CONST char *)c;
++	ucc = (char *)uc;
++	ni = strlen(cc) + 1;
++	no = size;
++	utf16 = iconv_open("UTF-16BE", locale_charset);
++       	nrc = iconv(utf16, &cc, &ni, &ucc, &no);
++		(void)iconv_close(utf16);
++       	if (nrc == (size_t)(-1)) {
++       		DEBUG(3, "Iconv from locale conversion error: '%s'\n", cc);
++       	} else {
++		return size-no;
++	}
++
++	/* fallback to ISO-8859-1 to UTF-16BE (every byte is valid here) */
++	cc = (ICONV_CONST char *)c;
++	ucc = (char *)uc;
++	ni = strlen(cc) + 1;
++	no = size;
++	utf16 = iconv_open("UTF-16BE", "ISO-8859-1");
++       	nrc = iconv(utf16, &cc, &ni, &ucc, &no);
++		(void)iconv_close(utf16);
++       	if (nrc == (size_t)(-1)) {
++       		DEBUG(2, "Iconv internal conversion error: '%s'\n", cc);
++		return -1;
++	}
++
++	return size-no;
++#else /* HAVE_ICONV */
++	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;
++#endif /* HAVE_ICONV */
++
++#endif /* _WIN32 */
++}
++
++
++/**
++	Convert a string from UTF-16BE to locale charset.
++
++	Plain ASCII (7bit) and basic ISO-8859-1 will always work.
++	This conversion supports UTF-8 and single byte locales.
++
++	\note This is a quick hack until OpenOBEX is iconv-ready.
++ */
++int UnicodeToChar(uint8_t *c, const uint8_t *uc, int size)
++{
++#ifdef _WIN32 /* no need for iconv */
++	int ret, n, i;
++	uint8_t *le;
++
++        return_val_if_fail(uc != NULL, -1);
++        return_val_if_fail(c != NULL, -1);
++
++	/* turn the eggs around, pointy side up */
++	for (n=0; uc[2*n] != 0 || uc[2*n+1] != 0; n++);
++	le = malloc(2*n+2);
++	for (i=0; i <= n; i++) {
++		le[2*i] = uc[2*i+1];
++		le[2*i+1] = uc[2*i];
++	}
++	/* UTF-16LE to ANSI */
++	ret = WideCharToMultiByte(CP_ACP, 0, le, -1, c, size, NULL, NULL);
++	free(le);
++	return ret; /* 0 on error */
++#else /* _WIN32 */
++
++#ifdef HAVE_ICONV
++	iconv_t utf16;
++	size_t ni, no, nrc;
++	/* avoid type-punned dereferecing (breaks strict aliasing) */
++	char *cc = (char *)c;
++	ICONV_CONST char *ucc = (ICONV_CONST char *)uc;
++
++        return_val_if_fail(uc != NULL, -1);
++        return_val_if_fail(c != NULL, -1);
++
++	/* UTF-16BE to current locale charset */
++	setlocale(LC_CTYPE, "");
++	DEBUG(3, "Iconv to locale \"%s\"\n", locale_charset);
++	for (ni=0; ucc[2*ni] != 0 || ucc[2*ni+1] != 0; ni++);
++	ni = 2*ni+2;
++	no = size;
++	utf16 = iconv_open(locale_charset, "UTF-16BE");
++       	nrc = iconv(utf16, &ucc, &ni, &cc, &no);
++		(void)iconv_close(utf16);
++       	if (nrc == (size_t)(-1)) {
++       		DEBUG(2, "Iconv from locale conversion error: '%s'\n", cc);
++	}
++	return size-no;
++#else /* HAVE_ICONV */
++	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;
++#endif /* HAVE_ICONV */
++
++#endif /* _WIN32 */
++}
++
++
++/**
++	Convert a (xml) string from UTF-8 to locale charset.
++
++	Plain ASCII (7bit) and basic ISO-8859-1 will always work.
++	This conversion supports UTF-8 and single byte locales.
++
++	\note This is a quick hack until OpenOBEX is iconv-ready.
++ */
++int Utf8ToChar(uint8_t *c, const uint8_t *uc, int size)
++{
++#ifdef _WIN32 /* no need for iconv */
++	int ret, n, i;
++	uint8_t *le;
++
++        return_val_if_fail(uc != NULL, -1);
++        return_val_if_fail(c != NULL, -1);
++
++	n = strlen(uc)*2+2;
++	le = malloc(n);
++	/* UTF-8 to UTF-16LE */
++	ret = MultiByteToWideChar(CP_UTF8, 0, uc, -1, (LPWSTR)le, n);
++
++	/* UTF-16LE to ANSI */
++	ret = WideCharToMultiByte(CP_ACP, 0, le, -1, c, size, NULL, NULL);
++	free(le);
++	return ret; /* 0 on error */
++#else /* _WIN32 */
++
++#ifdef HAVE_ICONV
++	iconv_t utf8;
++	size_t ni, no, nrc;
++	/* avoid type-punned dereferecing (breaks strict aliasing) */
++	char *cc = (char *)c;
++	ICONV_CONST char *ucc = (ICONV_CONST char *)uc;
++
++        return_val_if_fail(uc != NULL, -1);
++        return_val_if_fail(c != NULL, -1);
++
++	setlocale(LC_CTYPE, "");
++	DEBUG(2, "Iconv to \"%s\"\n", locale_charset);
++	ni = strlen(ucc);
++	no = size;
++	utf8 = iconv_open(locale_charset, "UTF-8");
++       	nrc = iconv(utf8, &ucc, &ni, &cc, &no);
++		(void)iconv_close(utf8);
++       	if (nrc != (size_t)(-1)) {
++       		DEBUG(2, "Iconv from locale conversion error: '%s'\n", cc);
++       	}
++	return size-no;
++#else /* HAVE_ICONV */
++	int n, i;
++	n = strlen(uc);
++	strncpy(c, uc, size);
++	c[size] = '\0';
++	return n;
++#endif /* HAVE_ICONV */
++
++#endif /* _WIN32 */
++}
+--- /dev/null	2014-11-11 18:16:49.229711166 -0800
++++ libbtctl-0.11.1/src/common.h	2013-03-05 12:43:50.000000000 -0800
+@@ -0,0 +1,73 @@
++/**
++	\file includes/common.h
++	ObexFTP common macros and debugging.
++	ObexFTP library - language bindings for OBEX file transfer.
++ */
++
++#ifndef _OBEXFTP_COMMON_H
++#define _OBEXFTP_COMMON_H
++
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++#include <stdio.h>
++
++#ifdef UNUSED
++#elif defined(__GNUC__)
++# define UNUSED(x) UNUSED_ ## x __attribute__((unused))
++#elif defined(__LCLINT__)
++# define UNUSED(x) /*@unused@*/ x
++#else
++# define UNUSED(x) x
++#endif
++
++#ifndef FALSE
++#define FALSE   (0)
++#endif
++
++#ifndef TRUE
++#define TRUE    (!FALSE)
++#endif
++
++/* these are not asserts! dont define to nothing */
++#define return_if_fail(expr)	do { if (!(expr)) return; } while(0);
++#define return_val_if_fail(expr,val)	do { if (!(expr)) return val; } while(0);
++
++#ifdef _WIN32
++#define snprintf _snprintf
++#endif /* _WIN32 */
++
++/* use 0 for production, 1 for verification, >2 for debug */
++#ifndef OBEXFTP_DEBUG
++#define OBEXFTP_DEBUG 0
++#endif
++
++#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
++#define	DEBUG(n, ...)	if (OBEXFTP_DEBUG >= (n)) fprintf(stderr, __VA_ARGS__)
++#elif defined (__GNUC__)
++#define	DEBUG(n, format...)	if (OBEXFTP_DEBUG >= (n)) fprintf (stderr, format)
++#else	/* !__GNUC__ */
++static void
++DEBUG (int n, const char *format, ...)
++{
++	va_list args;
++	if (OBEXFTP_DEBUG >= (n)) {
++		va_start (args, format);
++		fprintf (stderr, format, args);
++		va_end (args);
++	}
++}
++#endif	/* !__GNUC__ */
++
++#if OBEXFTP_DEBUG > 4
++#define DEBUGBUFFER(b,l) do { \
++	int i; \
++	for (i=0; i < (l); i++) \
++		fprintf (stderr, "%02x ", ((uint8_t *)(b))[i]); \
++	fprintf (stderr, "\n"); \
++} while (0)
++#else
++#define DEBUGBUFFER(b,l) do { } while (0)
++#endif
++
++#endif /* _OBEXFTP_COMMON_H */

+ 40 - 43
lib/libb/libbtctl/libbtctl-vl.spec

@@ -1,47 +1,49 @@
-%ifarch %ix86 x86_64 ppc ia64 armv4l sparc s390 s390x
-# defined to zero, because beehive doesn't do macros for BuildRequires
-%define with_mono 0
-%else
-%define with_mono 0
-%endif
-ExcludeArch: s390 s390x
+# to activate, add --with mono to rpmbuild
+%bcond_with mono
 
 
 Summary: Library for the GNOME Bluetooth Subsystem
 Summary: Library for the GNOME Bluetooth Subsystem
 Summary(ja): GNOME Bluetooth サブシステム用ライブラリ
 Summary(ja): GNOME Bluetooth サブシステム用ライブラリ
 Name: libbtctl
 Name: libbtctl
 Version: 0.11.1
 Version: 0.11.1
-Release: 1%{?_dist_release}
-License: GPL+
+Release: 2%{?_dist_release}
+License: GPLv2+ and LGPLv2.1+
 Group: System Environment/Libraries
 Group: System Environment/Libraries
 URL: http://live.gnome.org/GnomeBluetooth 
 URL: http://live.gnome.org/GnomeBluetooth 
-Source: http://ftp.gnome.org/pub/gnome/sources/libbtctl/0.11/%{name}-%{version}.tar.bz2
-BuildRoot:	%{_tmppath}/%{name}-%{version}-root
-#BuildRequires: autoconf >= 0:2.57
-BuildRequires: bluez-libs-devel, glib2-devel, gtk-doc
-BuildRequires: openobex-devel >= 0:1.1
-BuildRequires: pygtk2-devel, gtk2-devel
-BuildRequires: python, python-devel, gettext, automake, libtool, intltool
-Packager: babasaki
 
 
-%if %{with_mono}
-%{expand BuildRequires: mono-devel gtk-sharp-gapi gtk-sharp}
+Source0: http://ftp.gnome.org/pub/gnome/sources/libbtctl/0.11/%{name}-%{version}.tar.bz2
+Patch5: libbtctl-0.11.1-lib64.patch
+# Vine Patch
+# to build with openobex 1.7.1
+Patch100: libbtctl-0.11.1-unicode.patch
+
+ExcludeArch: s390 s390x
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildRequires: autoconf automake libtool gettext intltool
+BuildRequires: bluez-libs-devel
+BuildRequires: glib2-devel
+BuildRequires: gtk-doc
+BuildRequires: gtk2-devel
+BuildRequires: openobex-devel
+BuildRequires: pygtk2-devel
+BuildRequires: python
+BuildRequires: python-devel
+
+%if %{with mono}
+BuildRequires: mono-devel gtk-sharp-gapi gtk-sharp
 %endif
 %endif
 
 
-Patch1: libbtctl-bluez4.patch
-#Patch2: libbtctl-0.4.1-pydir.patch
-#Patch4: libbtctl-0.6.0-print.patch
-Patch5: libbtctl-0.11.1-lib64.patch
+Packager: babasaki
 
 
 %description
 %description
 Library for the GNOME Bluetooth Subsystem
 Library for the GNOME Bluetooth Subsystem
 
 
 %description -l ja
 %description -l ja
-GNOME Bluetooth サブシステム用ライブラリ
+GNOME Bluetooth サブシステム用ライブラリです。
 
 
 
 
 %package devel
 %package devel
-Summary: Development files for libbtctl.
-Summary(ja): libbtctl 開発のためのDEVELパッケージ
+Summary: Development files for libbtctl
+Summary(ja): libbtctl の開発用ファイル
 Group: Development/Libraries
 Group: Development/Libraries
 Requires: %{name} = %{version}-%{release}
 Requires: %{name} = %{version}-%{release}
 Requires: glib2-devel
 Requires: glib2-devel
@@ -51,32 +53,26 @@ This package contains the files needed for developing applications,
 which use libbtctl.
 which use libbtctl.
 
 
 %description devel -l ja
 %description devel -l ja
-libbtctl を使用するアプリケーション開発のために必要な
-ヘッダー類のパッケージ
+libbtctl を使用するアプリケーション開発に必要なファイルを含んでいます。
 
 
 
 
 %prep
 %prep
 %setup -q
 %setup -q
-#%patch1 -p0 -b .bluez4
-#%patch2 -p1 -b .pydir
-#%patch4 -p1 -b .print
 %ifarch x86_64
 %ifarch x86_64
 %patch5 -p0 -b .lib64
 %patch5 -p0 -b .lib64
 %endif
 %endif
 
 
-#aclocal
-#automake -a
-#intltoolize -c -f
-#autoconf
+%patch100 -p1 -b .unicode
 
 
 %build
 %build
-%if %{with_mono}
-%configure
+autoreconf -fiv
+
+%if %{with mono}
+%configure --disable-static
 %else
 %else
-%configure --disable-mono
+%configure --disable-mono --disable-static
 %endif
 %endif
 
 
-# %%{?_smp_mflags} does not work
 make 
 make 
 
 
 
 
@@ -85,9 +81,7 @@ rm -rf $RPM_BUILD_ROOT
 make DESTDIR=$RPM_BUILD_ROOT install
 make DESTDIR=$RPM_BUILD_ROOT install
 
 
 # we do not want .la files
 # we do not want .la files
-rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a
 rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
 rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
-rm -f $RPM_BUILD_ROOT/%{python_sitearch}/*.a
 rm -f $RPM_BUILD_ROOT/%{python_sitearch}/*.la
 rm -f $RPM_BUILD_ROOT/%{python_sitearch}/*.la
 %find_lang %name
 %find_lang %name
 
 
@@ -104,7 +98,7 @@ rm -rf $RPM_BUILD_ROOT
 %doc AUTHORS ChangeLog NEWS README 
 %doc AUTHORS ChangeLog NEWS README 
 %{_libdir}/lib*.so.*
 %{_libdir}/lib*.so.*
 %{python_sitearch}/*btctl*
 %{python_sitearch}/*btctl*
-%if %{with_mono}
+%if %{with mono}
 %{_libdir}/mono/gac/btctl/*/btctl.dll
 %{_libdir}/mono/gac/btctl/*/btctl.dll
 %{_libdir}/mono/libbtctl/btctl.dll
 %{_libdir}/mono/libbtctl/btctl.dll
 %{_datadir}/gapi/btctl-api.xml
 %{_datadir}/gapi/btctl-api.xml
@@ -117,12 +111,15 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/pkgconfig/libbtctl.pc
 %{_libdir}/pkgconfig/libbtctl.pc
 %{_includedir}/libbtctl
 %{_includedir}/libbtctl
 %{_datadir}/gtk-doc/html/libbtctl
 %{_datadir}/gtk-doc/html/libbtctl
-%if %{with_mono}
+%if %{with mono}
 %{_libdir}/pkgconfig/libbtctl-sharp.pc
 %{_libdir}/pkgconfig/libbtctl-sharp.pc
 %endif
 %endif
 
 
 
 
 %changelog
 %changelog
+* Tue Nov 11 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.11.1-2
+- added Patch100 to build with openobex-1.7.1
+
 * Mon Oct 04 2010 Shu KONNO <owa@bg.wakwak.com> 0.11.1-1
 * Mon Oct 04 2010 Shu KONNO <owa@bg.wakwak.com> 0.11.1-1
 - updated libbtctl to 0.11.1
 - updated libbtctl to 0.11.1
 - dropt Patch2: libbtctl-0.4.1-pydir.patch
 - dropt Patch2: libbtctl-0.4.1-pydir.patch

+ 21 - 13
o/obex-data-server/obex-data-server-vl.spec

@@ -1,23 +1,25 @@
 Name:		obex-data-server
 Name:		obex-data-server
-Version:	0.4
-Release:	4%{?_dist_release}
+Version:	0.4.6
+Release:	1%{?_dist_release}
 Summary:	D-Bus service for Obex access
 Summary:	D-Bus service for Obex access
-Summary(ja): Obex アクセスのための D-Bus サービス 
+Summary(ja):    Obex アクセスのための D-Bus サービス 
 
 
 Group:		System Environment/Daemons
 Group:		System Environment/Daemons
 License:	GPLv2+
 License:	GPLv2+
 URL:		http://tadas.dailyda.com/blog
 URL:		http://tadas.dailyda.com/blog
+
 Source0:	http://tadas.dailyda.com/software/%{name}-%{version}.tar.gz
 Source0:	http://tadas.dailyda.com/software/%{name}-%{version}.tar.gz
+# Vine Patch
+Patch100:	obex-data-server-0.4.6-openobex17.patch
 
 
 BuildRoot:	%{_tmppath}/%{name}-%{version}-root
 BuildRoot:	%{_tmppath}/%{name}-%{version}-root
-
-#----------------------------------------------------------------------------
-BuildRequires:	dbus-glib-devel
 BuildRequires:	bluez-libs-devel
 BuildRequires:	bluez-libs-devel
-BuildRequires:	openobex-devel
+BuildRequires:	dbus-glib-devel
+BuildRequires:	gdk-pixbuf2-devel
 BuildRequires:	glib2-devel
 BuildRequires:	glib2-devel
 BuildRequires:	libtool
 BuildRequires:	libtool
-BuildRequires:	gdk-pixbuf2-devel
+BuildRequires:	libusb-devel
+BuildRequires:	openobex-devel
 
 
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
 %description
 %description
@@ -33,11 +35,7 @@ obex-data-server は ObexFTP や携帯電話などのBluetooth対応デバイス
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
 %prep
 %prep
 %setup -q
 %setup -q
-
-%build
-%configure --enable-bip=gdk-pixbuf
-
-make %{?_smp_mflags}
+%patch100 -p1 -b .openobex17
 
 
 cat << EOF > README
 cat << EOF > README
 Bug tracking system is at:
 Bug tracking system is at:
@@ -54,6 +52,11 @@ http://svn.muiline.com/cgi-bin/viewvc.cgi/obex-data-server/trunk/
 
 
 EOF
 EOF
 
 
+%build
+%configure --enable-bip=gdk-pixbuf
+
+make %{?_smp_mflags}
+
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
 %install
 %install
 rm -rf $RPM_BUILD_ROOT
 rm -rf $RPM_BUILD_ROOT
@@ -78,6 +81,11 @@ rm -rf $RPM_BUILD_ROOT
 #
 #
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
 %changelog
 %changelog
+* Tue Nov 11 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 0.4.6-1
+- updated to 0.4.6
+- built with openobex 1.7.1
+- added Patch100
+
 * Wed Apr 20 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.4-4
 * Wed Apr 20 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.4-4
 - add missing BuildRequires: gdk-pixbuf2-devel
 - add missing BuildRequires: gdk-pixbuf2-devel
 
 

+ 112 - 99
o/obexftp/obexftp-vl.spec

@@ -1,166 +1,175 @@
-%define python_sitelib %(%{__python} -c "from distutils import sysconfig; print sysconfig.get_python_lib()")
-%define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')
-%define ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')
+%define python_sitearch %(python -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')
+%define ruby_vendorarch %(ruby -r rbconfig -e 'print RbConfig::CONFIG["vendorarchdir"]')
 
 
 Name: obexftp
 Name: obexftp
 Summary: Tool to access devices via the OBEX protocol
 Summary: Tool to access devices via the OBEX protocol
-Summary(ja): OBEX プロトコルを使用する機器のためのツールです
-Group: Applications/System
-Version: 0.23
+Summary(ja): OBEX プロトコルを使用する機器にアクセスするためのツール
+Version: 0.24
 Release: 1%{?_dist_release}
 Release: 1%{?_dist_release}
 License: GPLv2+
 License: GPLv2+
+Group: Applications/Communications
 URL: http://openobex.triq.net/
 URL: http://openobex.triq.net/
-Source: http://triq.net/obexftp/%{name}-%{version}.tar.bz2
-Patch0: obexftp-norpath.patch
-Patch1: obexftp-perl.patch
-
-BuildRoot:	%{_tmppath}/%{name}-%{version}-root
 
 
+Source: http://dl.sourceforge.net/project/openobex/obexftp/0.24/obexftp-0.24-Source.tar.gz
+Patch0: obexftp-norpath.patch
+# From upstream git, fixes fuse apps not being installed
+Patch1: %{name}-0.24-fuse.patch
+# From OpenSUSE, thanks: fix pkgconfig to require bluez not bluetooth
+Patch2: %{name}-pkgconfig_requires.patch
+# From OpenSUSE, thanks: fix python install path
+Patch3: %{name}-0.24-fix-absurd-install-path.patch
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildRequires: asciidoc
+BuildRequires: cmake
 BuildRequires: bluez-libs-devel
 BuildRequires: bluez-libs-devel
-BuildRequires: gettext
-BuildRequires: libtool
-BuildRequires: openobex-devel >= 1.2
-## BuildRequires: perl-ExtUtils-CBuilder
+BuildRequires: fuse-devel
+BuildRequires: gettext-devel
+BuildRequires: openobex-devel
 BuildRequires: perl(ExtUtils::MakeMaker)
 BuildRequires: perl(ExtUtils::MakeMaker)
 BuildRequires: python-devel
 BuildRequires: python-devel
-BuildRequires: ruby
 BuildRequires: ruby-devel
 BuildRequires: ruby-devel
+BuildRequires: swig
 BuildRequires: tcl
 BuildRequires: tcl
-
+BuildRequires: xmlto
 
 
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
 %description
 %description
-The overall goal of this project is to make mobile devices featuring
- the OBEX protocol and adhering to the OBEX FTP standard accessible
- by an open source implementation.
-The common usage for ObexFTP is to access your mobile phones memory to
- store and retrieve e.g. your phonebook, logos, ringtones, music,
+The overall goal of this project is to make mobile devices featuring the OBEX
+protocol and adhering to the OBEX FTP standard accessible by an open source
+implementation. The common usage for ObexFTP is to access your mobile phones
+memory to  store and retrieve e.g. your phonebook, logos, ringtones, music,
  pictures and alike.
  pictures and alike.
 
 
 %description -l ja
 %description -l ja
-このプロジェクトは OBEXプロトコルおよび、標準的で便利なOBEX-FTPを
-フィーチャーしたモバイルデバイスを、オープンソースで実装する事を
-全体的な目標としています。
+このプロジェクトは OBEX プロトコルおよび、標準的で便利な OBEX FTP をフィーチャーしたモバイルデバイスを、オープンソースで実装する事を全体的な目標としています。
+
 ObexFTPの共通の使い方
 ObexFTPの共通の使い方
- お使いの携帯電話にアクセスし、メモリへ保存したり取り外したりする、
- 例えば、お客様の電話帳、ロゴ、着メロ、音楽、写真等も同様に扱えます。
+お使いの携帯電話のメモリにアクセスし、電話帳、ロゴ、着メロ、音楽、写真等の保存や取得を行います。
+
+#----------------------------------------------------------------------------
+%package -n fuse-%{name}
+Summary: FUSE based filesystem using ObexFTP
+Group: Applications/Communications
+Requires: %{name} = %{version}-%{release}
+
+%description -n fuse-%{name}
+This package provides a FUSE based filesystem using Obex protocol as backend.
 
 
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
 %package -n python-%{name}
 %package -n python-%{name}
 Summary: Python library to access devices via the OBEX protocol
 Summary: Python library to access devices via the OBEX protocol
-Summary(ja): OBEX プロトコルを使って機器を扱うPythonライブラリです
+Summary(ja): OBEX プロトコルを使って機器を扱う Python ライブラリ
 Group: Development/Libraries
 Group: Development/Libraries
 Requires: %{name} = %{version}-%{release}
 Requires: %{name} = %{version}-%{release}
 
 
 %description -n python-%{name}
 %description -n python-%{name}
-The overall goal of this project is to make mobile devices featuring
- the OBEX protocol and adhering to the OBEX FTP standard accessible
- by an open source implementation.
-The common usage for ObexFTP is to access your mobile phones memory to
- store and retrieve e.g. your phonebook, logos, ringtones, music,
+The overall goal of this project is to make mobile devices featuring the OBEX
+protocol and adhering to the OBEX FTP standard accessible by an open source
+implementation. The common usage for ObexFTP is to access your mobile phones
+memory to  store and retrieve e.g. your phonebook, logos, ringtones, music,
  pictures and alike.
  pictures and alike.
 
 
 %description -n python-%{name} -l ja
 %description -n python-%{name} -l ja
-このプロジェクトは OBEXプロトコルおよび、標準的で便利なOBEX-FTPを
-フィーチャーしたモバイルデバイスを、オープンソースで実装する事を
-全体的な目標としています。
-ObexFTPの共通の使い方
- お使いの携帯電話にアクセスし、メモリへ保存したり取り外したりする、
- 例えば、お客様の電話帳、ロゴ、着メロ、音楽、写真等も同様に扱えます。
-(このパッケージはpython向けライブラリです)
+このプロジェクトは OBEX プロトコルおよび、標準的で便利な OBEX FTP をフィーチャーしたモバイルデバイスを、オープンソースで実装する事を全体的な目標としています。
+
+ObexFTP の共通の使い方
+お使いの携帯電話のメモリにアクセスし、電話帳、ロゴ、着メロ、音楽、写真等の保存や取得を行います。
+(このパッケージは Python 向けライブラリです)
 
 
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
 %package -n perl-%{name}
 %package -n perl-%{name}
 Summary: Perl library to access devices via the OBEX protocol
 Summary: Perl library to access devices via the OBEX protocol
-Summary(ja): OBEX プロトコルを使って機器を扱うPerlライブラリです
+Summary(ja): OBEX プロトコルを使って機器を扱う Perl ライブラリ
 Group: Development/Libraries
 Group: Development/Libraries
 Requires: %{name} = %{version}-%{release}
 Requires: %{name} = %{version}-%{release}
 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Provides: perl-OBEXFTP = %{version}-%{release}
 
 
 %description -n perl-%{name}
 %description -n perl-%{name}
-The overall goal of this project is to make mobile devices featuring
- the OBEX protocol and adhering to the OBEX FTP standard accessible
- by an open source implementation.
-The common usage for ObexFTP is to access your mobile phones memory to
- store and retrieve e.g. your phonebook, logos, ringtones, music,
+The overall goal of this project is to make mobile devices featuring the OBEX
+protocol and adhering to the OBEX FTP standard accessible by an open source
+implementation. The common usage for ObexFTP is to access your mobile phones
+memory to  store and retrieve e.g. your phonebook, logos, ringtones, music,
  pictures and alike.
  pictures and alike.
 
 
 %description -n perl-%{name} -l ja
 %description -n perl-%{name} -l ja
-このプロジェクトは OBEXプロトコルおよび、標準的で便利なOBEX-FTPを
-フィーチャーしたモバイルデバイスを、オープンソースで実装する事を
-全体的な目標としています。
+このプロジェクトは OBEX プロトコルおよび、標準的で便利な OBEX FTP をフィーチャーしたモバイルデバイスを、オープンソースで実装する事を全体的な目標としています。
+
 ObexFTPの共通の使い方
 ObexFTPの共通の使い方
- お使いの携帯電話にアクセスし、メモリへ保存したり取り外したりする、
- 例えば、お客様の電話帳、ロゴ、着メロ、音楽、写真等も同様に扱えます。
-(このパッケージはperl向けライブラリです)
+お使いの携帯電話のメモリにアクセスし、電話帳、ロゴ、着メロ、音楽、写真等の保存や取得を行います。
+(このパッケージは perl 向けライブラリです)
 
 
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
 %package -n ruby-%{name}
 %package -n ruby-%{name}
 Summary: Ruby library to access devices via the OBEX protocol
 Summary: Ruby library to access devices via the OBEX protocol
-Summary(ja): OBEX プロトコルを使って機器を扱うRubyライブラリです
+Summary(ja): OBEX プロトコルを使って機器を扱う Ruby ライブラリ
 Group: Development/Libraries
 Group: Development/Libraries
-BuildRequires: ruby
-BuildRequires: ruby-devel
 Requires: %{name} = %{version}-%{release}
 Requires: %{name} = %{version}-%{release}
 
 
 %description -n ruby-%{name}
 %description -n ruby-%{name}
-The overall goal of this project is to make mobile devices featuring
- the OBEX protocol and adhering to the OBEX FTP standard accessible
- by an open source implementation.
-The common usage for ObexFTP is to access your mobile phones memory to
- store and retrieve e.g. your phonebook, logos, ringtones, music,
+The overall goal of this project is to make mobile devices featuring the OBEX
+protocol and adhering to the OBEX FTP standard accessible by an open source
+implementation. The common usage for ObexFTP is to access your mobile phones
+memory to  store and retrieve e.g. your phonebook, logos, ringtones, music,
  pictures and alike.
  pictures and alike.
 
 
 %description -n ruby-%{name} -l ja
 %description -n ruby-%{name} -l ja
-このプロジェクトは OBEXプロトコルおよび、標準的で便利なOBEX-FTPを
-フィーチャーしたモバイルデバイスを、オープンソースで実装する事を
-全体的な目標としています。
+このプロジェクトは OBEX プロトコルおよび、標準的で便利な OBEX FTP をフィーチャーしたモバイルデバイスを、オープンソースで実装する事を全体的な目標としています。
+
 ObexFTPの共通の使い方
 ObexFTPの共通の使い方
- お使いの携帯電話にアクセスし、メモリへ保存したり取り外したりする、
- 例えば、お客様の電話帳、ロゴ、着メロ、音楽、写真等も同様に扱えます。
-(このパッケージはruby向けライブラリです)
+お使いの携帯電話のメモリにアクセスし、電話帳、ロゴ、着メロ、音楽、写真等の保存や取得を行います。
+(このパッケージは ruby 向けライブラリです)
 
 
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
 %package devel
 %package devel
 Summary: Header files and libraries for %{name}
 Summary: Header files and libraries for %{name}
-Summary(ja): OBEX-FTP の開発用ヘッダーファイル等のパッケージです
+Summary(ja): OBEX-FTP の開発用ヘッダーファイル
 Group: Development/Libraries
 Group: Development/Libraries
 Requires: %{name} = %{version}-%{release}
 Requires: %{name} = %{version}-%{release}
-Requires: openobex-devel >= 1.2
+Requires: bluez-libs-devel
+Requires: openobex-devel
 Requires: pkgconfig
 Requires: pkgconfig
 
 
 %description devel
 %description devel
-This package contains the header files, static libraries and development
-documentation for %{name}. If you like to develop programs using %{name},
-you will need to install %{name}-devel.
+This package contains libraries and header files for developing applications
+that use %{name}.
 
 
 %description devel -l ja
 %description devel -l ja
-このパッケージには OBEX-FTPのヘッダファイル、静的ライブラリおよび開発者用の
-ドキュメントが含まれています。
-あなたがOBEX-FTPを使用してプログラムを開発する場合は、この obexftp-develを
-インストールする必要があります。
+このパッケージには、%{name} を使用するアプリケーションを開発するためのライブラリ及びヘッダファイルが含まれています。
 
 
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
 %prep
 %prep
-%setup -q
+%setup -q -n %{name}-%{version}-Source
 %patch0 -p1 -b .norpath
 %patch0 -p1 -b .norpath
-%patch1 -p1 -b .p
+%patch1 -p1 -b .fuse
+%patch2 -p1 -b .pkgconfig
+%patch3 -p1 -b .pythonpath
 
 
 %build
 %build
-autoreconf -f -i
-%configure --disable-static --disable-dependency-tracking --disable-rpath
-%{__make} %{?_smp_mflags}
+mkdir -p %{_target_platform}
+pushd %{_target_platform}
+%cmake -DCMAKE_SKIP_RPATH=YES ..
+
+# fix xmlto option to build man pages
+sed -i 's|\/usr\/bin\/xmlto |\/usr\/bin\/xmlto --skip-validation |g' doc/CMakeFiles/doc.dir/build.make
+
+popd
+
+make %{?_smp_mflags} -C %{_target_platform}
+make %{?_smp_mflags} doc -C %{_target_platform}
 
 
 %install
 %install
 rm -rf $RPM_BUILD_ROOT
 rm -rf $RPM_BUILD_ROOT
-make DESTDIR=$RPM_BUILD_ROOT RUBYARCHDIR=$RPM_BUILD_ROOT%{rarchdir} install 
+
+make install -C %{_target_platform} \
+     DESTDIR=$RPM_BUILD_ROOT \
+     RUBYARCHDIR=$RPM_BUILD_ROOT%{ruby_vendorarch} 
 chmod 755 $RPM_BUILD_ROOT%{perl_vendorarch}/*/OBEXFTP/OBEXFTP.so
 chmod 755 $RPM_BUILD_ROOT%{perl_vendorarch}/*/OBEXFTP/OBEXFTP.so
-# chmod 755 %{buildroot}%{perl_sitearch}/*/OBEXFTP/OBEXFTP.so
 
 
-rm $RPM_BUILD_ROOT%{_libdir}/*.la
-rm $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
+# rm $RPM_BUILD_ROOT%{_libdir}/*.la
+rm -f  $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/*/OBEXFTP/{.packlist,OBEXFTP.bs}
 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/*/OBEXFTP/{.packlist,OBEXFTP.bs}
-# %{__rm} -f %{buildroot}%{perl_sitearch}/*/OBEXFTP/{.packlist,OBEXFTP.bs}
 
 
 
 
 %clean
 %clean
@@ -171,12 +180,12 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %files
 %files
 %defattr(-, root, root, -)
 %defattr(-, root, root, -)
-%doc AUTHORS COPYING ChangeLog NEWS README THANKS TODO
-%{_mandir}/man1/obexftp.1*
-%{_mandir}/man1/obexftpd.1*
+%doc AUTHORS ChangeLog NEWS README THANKS TODO
 %{_bindir}/obexftp
 %{_bindir}/obexftp
 %{_bindir}/obexftpd
 %{_bindir}/obexftpd
 %{_libdir}/*.so.*
 %{_libdir}/*.so.*
+%{_mandir}/man1/obexftp.1*
+%{_mandir}/man1/obexftpd.1*
 
 
 %files devel
 %files devel
 %defattr(-, root, root, -)
 %defattr(-, root, root, -)
@@ -186,28 +195,24 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/*.so
 %{_libdir}/*.so
 %{_libdir}/pkgconfig/obexftp.pc
 %{_libdir}/pkgconfig/obexftp.pc
 
 
+%files -n fuse-%{name}
+%{_bindir}/obexautofs
+%{_bindir}/obexfs
+
 %files -n python-%{name}
 %files -n python-%{name}
 %defattr(-, root, root, -)
 %defattr(-, root, root, -)
-# %dir %{python_vendorarch}/obexftp
-# %{python_vendorarch}/obexftp/_obexftp.so*
-# %{python_vendorarch}/obexftp/__init__.py*
-%dir %{python_sitearch}/obexftp
-%{python_sitearch}/obexftp/_obexftp.so*
-%{python_sitearch}/obexftp/__init__.py*
+%{python_sitearch}/_obexftp.so*
+%{python_sitearch}/obexftp.py*
 
 
 %files -n perl-%{name}
 %files -n perl-%{name}
 %defattr(-, root, root, -)
 %defattr(-, root, root, -)
 %{perl_vendorarch}/OBEXFTP.pm
 %{perl_vendorarch}/OBEXFTP.pm
 %dir %{perl_vendorarch}/*/OBEXFTP
 %dir %{perl_vendorarch}/*/OBEXFTP
 %{perl_vendorarch}/*/OBEXFTP/OBEXFTP.so
 %{perl_vendorarch}/*/OBEXFTP/OBEXFTP.so
-# %{perl_sitearch}/OBEXFTP.pm
-# %dir %{perl_sitearch}/*/OBEXFTP
-# %{perl_sitearch}/*/OBEXFTP/OBEXFTP.so
 
 
 %files -n ruby-%{name}
 %files -n ruby-%{name}
 %defattr(-, root, root, -)
 %defattr(-, root, root, -)
-%{rarchdir}/obexftp.so
-#{ruby_sitearch}/obexftp.so
+%{ruby_vendorarch}/obexftp.so
 
 
 
 
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
@@ -215,6 +220,14 @@ rm -rf $RPM_BUILD_ROOT
 #
 #
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
 %changelog
 %changelog
+* Tue Nov 11 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 0.24-1
+- updaed to 0.24
+- added fuse-obexftp subpackage
+- built with openobex 1.7,1 and perl 5.16.3
+
+* Sat Jul 27 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.23-2
+- rebuild with perl-5.12.3
+
 * Sat Dec 12 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.23-1
 * Sat Dec 12 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.23-1
 - new upstream release
 - new upstream release
 - removed Requires: ruby(abi) (= 1.8) <BTS:799>
 - removed Requires: ruby(abi) (= 1.8) <BTS:799>

+ 62 - 42
o/openobex/openobex-vl.spec

@@ -1,25 +1,27 @@
+%global udevdir /lib/udev
+
 Summary: Library for using OBEX
 Summary: Library for using OBEX
-Summary(ja): OBEXを利用するためのオープンライブラリです
+Summary(ja): OBEX を利用するためのライブラリ
 Name: openobex
 Name: openobex
-Version: 1.5
-Release: 3%{?_dist_release}
-License: GPLv2+
+Version: 1.7.1
+Release: 1%{?_dist_release}
+License: GPLv2+ and LGPLv2+
 Group: System Environment/Libraries
 Group: System Environment/Libraries
 URL: http://openobex.sourceforge.net
 URL: http://openobex.sourceforge.net
-Source: http://downloads.sourceforge.net/openobex/openobex-%{version}.tar.gz
 
 
-Patch0: openobex-apps-flush.patch
-Patch1: openobex-1.3-push.patch
-Patch2: openobex-1.3-autoconf.patch
-Patch3: openobex-1.3-ipv6.patch
-Patch4: openobex-1.3-utf.patch
-Patch5: openobex-1.3-ircp.patch
+Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}-Source.tar.gz
+Patch0:  openobex-apps-flush.patch
+Patch1:  openobex-1.7-obex_push.patch
+Patch2:  openobex-1.7-udev_rule.patch
 
 
 BuildRoot:	%{_tmppath}/%{name}-%{version}-root
 BuildRoot:	%{_tmppath}/%{name}-%{version}-root
-BuildRequires:	autoconf >= 2.57
 BuildRequires:	bluez-libs-devel
 BuildRequires:	bluez-libs-devel
-BuildRequires:	sed, libusb-devel
-BuildRequires:	automake, autoconf, libtool
+BuildRequires:	cmake
+BuildRequires:	docbook-style-xsl
+BuildRequires:	doxygen
+BuildRequires:	libusb1-devel
+BuildRequires:	libxslt
+BuildRequires:	sed
 ExcludeArch:	s390 s390x
 ExcludeArch:	s390 s390x
 
 
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
@@ -30,9 +32,7 @@ entries (vCal) and business cards (vCard).  This package contains the
 Open OBEX shared C library.
 Open OBEX shared C library.
 
 
 %description -l ja
 %description -l ja
-OBEX(OBject EXchange) は様々なモバイル機器での、ファイル、写真、カレンダー
-エントリー(vCal) 、そして名刺(vCard)のような、すべての種類のオブジェクトを
-交換するために通常使用されているプロトコルです。
+OBEX(OBject EXchange) は様々なモバイル機器での、ファイル、写真、カレンダーエントリー(vCal) 、そして名刺(vCard)のような、すべての種類のオブジェクトを交換するために通常使用されているプロトコルです。
 このパッケージには、Open OBEX のC言語共有ライブラリが含まれています。
 このパッケージには、Open OBEX のC言語共有ライブラリが含まれています。
 
 
 
 
@@ -43,55 +43,59 @@ Summary(ja): OBEX アプリ開発用ライブラリとヘッダーファイル
 Group: Development/Libraries
 Group: Development/Libraries
 Requires: %{name} = %{version}-%{release} 
 Requires: %{name} = %{version}-%{release} 
 Requires: bluez-libs-devel
 Requires: bluez-libs-devel
-Requires: libusb-devel
+Requires: libusb1-devel
 Requires: pkgconfig
 Requires: pkgconfig
 
 
 %description devel
 %description devel
 Header files for development of applications which use OpenOBEX.
 Header files for development of applications which use OpenOBEX.
 
 
 %description devel -l ja
 %description devel -l ja
-
-Open OBEX を使用するアプリケーションを開発するためのヘッダーファイル類
-(devel パッケージ)
+Open OBEX を使用するアプリケーションを開発するためのヘッダーファイル等です。
 
 
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
 %package apps
 %package apps
 Summary: Applications for using OBEX
 Summary: Applications for using OBEX
 Summary(ja): OBEX を使ったアプリケーション
 Summary(ja): OBEX を使ったアプリケーション
-Group: Applications/Accessories
+Group: Applications/Communications
 
 
 %description apps
 %description apps
 Open OBEX Applications to exchange all kind of objects like files, pictures,
 Open OBEX Applications to exchange all kind of objects like files, pictures,
 calendar entries (vCal) and business cards (vCard) using the OBEX protocol.
 calendar entries (vCal) and business cards (vCard) using the OBEX protocol.
 
 
 %description apps -l ja
 %description apps -l ja
-Open OBEX アプリケーションは OBEX プロトコルを使用して、ファイル、写真、
-カレンダーエントリー(vCal) 、そして名刺(vCard)のような、すべての種類の
-オブジェクトを交換します。
-
+Open OBEX アプリケーションは OBEX プロトコルを使用して、ファイル、写真、カレンダーエントリー(vCal) 、そして名刺(vCard)のような、すべての種類のオブジェクトを交換します。
 
 
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
 %prep
 %prep
-%setup -q
+%setup -q -n openobex-%{version}-Source
 %patch0 -p1 -b .flush
 %patch0 -p1 -b .flush
-## %patch1 -p1 -b .push
-## %patch2 -p1 -b .ipv6
-## %patch3 -p1 -b .autoconf
-## %patch4 -p1 -b .utf
-## %patch5 -p1 -b .ircp
-autoreconf --install --force
+%patch1 -p1 -b .push
+%patch2 -p1 -b .udev
 
 
 %build
 %build
-%configure --disable-static --enable-apps --enable-usb --disable-dependency-tracking
+%cmake \
+    -DCMAKE_SKIP_RPATH=YES \
+    -DCMAKE_VERBOSE_MAKEFILE=YES \
+    -DCMAKE_INSTALL_UDEVRULESDIR=%{udevdir}/rules.d \
+
 make %{?_smp_mflags}
 make %{?_smp_mflags}
-# make -C doc %{?_smp_mflags}
+make openobex-apps %{?_smp_mflags}
 
 
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
 %install
 %install
 rm -rf $RPM_BUILD_ROOT
 rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
 # we do not want .la files
 # we do not want .la files
-rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
+# don't ship obex_test program, that is for testing purposes only
+# and has some problems (multiple buffer overflows etc.)
+rm -f $RPM_BUILD_ROOT%{_bindir}/obex_test
+rm -f $RPM_BUILD_ROOT%{_mandir}/man1/obex_test.1*
+
+# HTML doc
+rm -rf _docs_to_include
+mkdir -p _docs_to_include
+mv $RPM_BUILD_ROOT%{_docdir}/%{name}/html _docs_to_include
 
 
 %clean
 %clean
 rm -rf $RPM_BUILD_ROOT
 rm -rf $RPM_BUILD_ROOT
@@ -103,32 +107,48 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %files
 %defattr(-, root, root)
 %defattr(-, root, root)
 %doc AUTHORS COPYING COPYING.LIB ChangeLog README 
 %doc AUTHORS COPYING COPYING.LIB ChangeLog README 
+%{_sbindir}/obex-check-device
 %{_libdir}/libopenobex*.so.*
 %{_libdir}/libopenobex*.so.*
+%{udevdir}/rules.d/60-openobex.rules
 
 
 %files devel
 %files devel
 %defattr(-, root, root)
 %defattr(-, root, root)
 %doc AUTHORS COPYING COPYING.LIB ChangeLog README 
 %doc AUTHORS COPYING COPYING.LIB ChangeLog README 
+%doc _docs_to_include/html
+%dir %{_includedir}/%{name}
+%{_includedir}/%{name}/*.h
 %{_libdir}/libopenobex*.so
 %{_libdir}/libopenobex*.so
-## %{_datadir}/aclocal/openobex.m4
-%dir %{_includedir}/openobex
-%{_includedir}/openobex/*.h
 %{_libdir}/pkgconfig/openobex.pc
 %{_libdir}/pkgconfig/openobex.pc
+%{_libdir}/cmake/OpenObex-%{version}
 
 
 %files apps
 %files apps
 %defattr(-, root, root)
 %defattr(-, root, root)
 %{_bindir}/irobex_palm3
 %{_bindir}/irobex_palm3
 %{_bindir}/irxfer
 %{_bindir}/irxfer
 %{_bindir}/ircp
 %{_bindir}/ircp
+%{_bindir}/obex_find
 %{_bindir}/obex_tcp
 %{_bindir}/obex_tcp
-%{_bindir}/obex_test
-## %{_bindir}/obex_push
-## %{_mandir}/man1/obex_push.1*
+%{_bindir}/obex_push
+%{_mandir}/man1/irobex_palm3.1*
+%{_mandir}/man1/irxfer.1*
+%{_mandir}/man1/ircp.1*
+%{_mandir}/man1/obex_tcp.1*
+%{_mandir}/man1/obex_find.1*
+%{_mandir}/man1/obex_push.1*
 
 
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
 # Maintainers: babasaki@mindgear.org
 # Maintainers: babasaki@mindgear.org
 #
 #
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
 %changelog
 %changelog
+* Tue Nov 11 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 1.7.1-1
+- updated to 1.7,1
+- added Patch1 and Patch2 from fc
+  * Wed Oct 01 2014 Tomas Hozza <thozza@redhat.com> - 1.7.1-5
+  - Fix udev rule to not use plugdev group (#1136580)
+  * Thu Jan 09 2014 Tomas Hozza <thozza@redhat.com> - 1.7.1-2
+  - Distribute Cmake config files
+
 * Sun Aug 24 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.5-3
 * Sun Aug 24 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.5-3
 - rebuild with VineSeed environment
 - rebuild with VineSeed environment