Summary: Library for using OBEX
Summary(ja): OBEXを利用するためのオープンライブラリです
Name: openobex
Version: 1.5
Release: 2%{?_dist_release}
License: GPLv2+
Group: System Environment/Libraries
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

BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildRequires:	autoconf >= 2.57
BuildRequires:	bluez-libs-devel
BuildRequires:	sed, libusb-devel
BuildRequires:	automake, autoconf, libtool
ExcludeArch:	s390 s390x

#----------------------------------------------------------------------------
%description
OBEX (OBject EXchange) is a protocol usually used by various mobile
devices to exchange all kind of objects like files, pictures, calendar
entries (vCal) and business cards (vCard).  This package contains the
Open OBEX shared C library.

%description -l ja
OBEX(OBject EXchange) は様々なモバイル機器での、ファイル、写真、カレンダー
エントリー(vCal) 、そして名刺(vCard)のような、すべての種類のオブジェクトを
交換するために通常使用されているプロトコルです。
このパッケージには、Open OBEX のC言語共有ライブラリが含まれています。


#----------------------------------------------------------------------------
%package devel
Summary: Files for development of applications which will use OBEX
Summary(ja): OBEX アプリ開発用ライブラリとヘッダーファイル
Group: Development/Libraries
Requires: %{name} = %{version}-%{release} 
Requires: bluez-libs-devel
Requires: libusb-devel
Requires: pkgconfig

%description devel
Header files for development of applications which use OpenOBEX.

%description devel -l ja

Open OBEX を使用するアプリケーションを開発するためのヘッダーファイル類
(devel パッケージ)

#----------------------------------------------------------------------------
%package apps
Summary: Applications for using OBEX
Summary(ja): OBEX を使ったアプリケーション
Group: Applications/Accessories

%description apps
Open OBEX Applications to exchange all kind of objects like files, pictures,
calendar entries (vCal) and business cards (vCard) using the OBEX protocol.

%description apps -l ja
Open OBEX アプリケーションは OBEX プロトコルを使用して、ファイル、写真、
カレンダーエントリー(vCal) 、そして名刺(vCard)のような、すべての種類の
オブジェクトを交換します。


#----------------------------------------------------------------------------
%prep
%setup -q
%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

%build
%configure --disable-static --enable-apps --enable-usb --disable-dependency-tracking
make %{?_smp_mflags}
# make -C doc %{?_smp_mflags}

#----------------------------------------------------------------------------
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# we do not want .la files
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-, root, root)
%doc AUTHORS COPYING COPYING.LIB ChangeLog README 
%{_libdir}/libopenobex*.so.*

%files devel
%defattr(-, root, root)
%doc AUTHORS COPYING COPYING.LIB ChangeLog README 
%{_libdir}/libopenobex*.so
## %{_datadir}/aclocal/openobex.m4
%dir %{_includedir}/openobex
%{_includedir}/openobex/*.h
%{_libdir}/pkgconfig/openobex.pc

%files apps
%defattr(-, root, root)
%{_bindir}/irobex_palm3
%{_bindir}/irxfer
%{_bindir}/ircp
%{_bindir}/obex_tcp
%{_bindir}/obex_test
## %{_bindir}/obex_push
## %{_mandir}/man1/obex_push.1*

#----------------------------------------------------------------------------
# Maintainers: babasaki@mindgear.org
#
#----------------------------------------------------------------------------
%changelog
* Thu Sep 30 2010 Shu KONNO <owa@bg.wakwak.com> 1.5-2
- rebuilt with rpm-4.8.1 for pkg-config

* Sun May 02 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.5-1
- new upstream release
- drop Patch1, Patch2, Patch3, Patch4, Patch5

* Mon Nov  7 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.3-15
- for <BTS:847>
  - fixed %postun section
  - changed apps Group to Applications/Accessories

* Fri Oct 24 2008 Seiichirou Babasaki 1.3-14
- added "# Maintainers: " comments.
- changed UTF-8 encode at bluez-gnome.vs.spec
- Updated specfile

* Fri Jun 13 2008 Seiichirou Babasaki 1.3-13
- Updated specfile
- LOGS - 1.3-12
- improved utf(non ascii) support
- Resolves: #430128
- LOGS - 1.3-11
- Autorebuild for GCC 4.3
- LOGS - 1.3-10
- Spec file cleanup
- LOGS - 1.3-9
- Spec file cleanup
- Fixed wrong lib path in autoconf

* Wed Jan 16 2008 Seiichirou Babasaki 1.3-8vl1
- Import oponobex - Packager: Babasaki
- Updated specfile

#----------------------------------------------------------------------------
* Tue Sep 18 2007 Jiri Moskovcak <jmoskovcak@redhat.com> 1.3-8
- Changed sources in specfile URL to point to the right location

* Fri Aug 24 2007 Jiri Moskovcak <jmoskovc@redhat.com> 1.3-7
- Added ipv6 support
- Resolves: #198396

* Wed Aug 22 2007 Harald Hoyer <harald@redhat.com> - 1.3-6
- changed license tag

* Fri Mar 23 2007 Harald Hoyer <harald@redhat.com> - 1.3-5
- specfile cleanup

* Wed Feb  7 2007 Harald Hoyer <harald@redhat.com> - 1.3-4
- readded obex_push

* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.3-3.1
- rebuild

* Tue Jun 27 2006 Harald Hoyer <harald@redhat.com> - 1.3-3
- removed more patches

* Tue Jun 27 2006 Harald Hoyer <harald@redhat.com> - 1.3-2
- added more build requirements
- built now with enable-usb

* Fri Jun 16 2006 Harald Hoyer <harald@redhat.com> - 1.3-1
- version 1.3

* Tue Jun 13 2006 Harald Hoyer <harald@redhat.com> - 1.2-2
- more build requirements

* Tue Jun 13 2006 Harald Hoyer <harald@redhat.com> - 1.2-1
- version 1.2

* Thu Feb 16 2006 Harald Hoyer <harald@redhat.com> 1.1-1
- version 1.1

* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.0.1-4.2.1
- bump again for double-long bug on ppc(64)

* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.0.1-4.2
- rebuilt for new gcc4.1 snapshot and glibc changes

* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt

* Mon May 02 2005 Harald Hoyer <harald@redhat.com> 1.0.1-4
- added `OBEX_ServerAccept' to the exported symbols (bug rh#146353)

* Wed Mar 02 2005 Harald Hoyer <harald@redhat.com> 
- rebuilt

* Wed Feb 09 2005 Harald Hoyer <harald@redhat.com>
- rebuilt

* Mon Sep 13 2004 Harald Hoyer <harald@redhat.de> 1.0.1-1
- version 1.0.1

* Tue Jun 22 2004 Alan Cox <alan@redhat.com>
- removed now unneeded glib requirement

* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Mon Apr 19 2004 David Woodhouse <dwmw2@redhat.com> 1.0.0-5
- import for for #121271 from openobex CVS tree

* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Wed Jun  4 2003 Harald Hoyer <harald@redhat.de> 1.0.0-2
- excludeArch s390 s390x

* Wed Jun  4 2003 Harald Hoyer <harald@redhat.de> 1.0.0-1
- redhatified specfile
- bump to version 1.0.0

* Thu May 18 2000 Pontus Fuchs <pontus.fuchs@tactel.se>
- Initial RPM
