Summary: 	Full featured bluetooth manager for GNOME/GTK
Summary(ja): 	GNOME/GTK 用の高機能な Bluetooth マネージャ

Name: 		blueman
Version: 	2.0
Release: 	1%{?_dist_release}
License: 	GPLv2+
Group: 		Applications/System
Url: 		https://github.com/blueman-project/blueman

Source0: 	https://github.com/blueman-project/blueman/releases/download/2.0/%{name}-%{version}.tar.xz

Buildroot: 	%{_tmppath}/%{name}-%{version}
BuildRequires:  desktop-file-utils
BuildRequires:  perl(XML::Parser)
BuildRequires:  glib2-devel
BuildRequires:  gtk2-devel
BuildRequires:  pygtk2-devel
BuildRequires:  polkit-devel
BuildRequires:  intltool
BuildRequires:	startup-notification-devel
BuildRequires:	pygobject3-devel
BuildRequires:	Cython
BuildRequires:	notify-python
BuildRequires:	bluez-libs-devel >= 4.37
BuildRequires:	python-devel
BuildRequires:	python-pyrex
BuildRequires:	dbus-python
Requires:	bluez
Requires:	obex-data-server
Requires:	notify-python
Requires:	pygtk2
Requires:	gnome-python
Requires:	dbus-python
Requires:	pygobject3
Requires:	Cython
Requires:	polkit-gnome
Requires(postun,posttrans): glib2
Requires(post,postun): desktop-file-utils
Requires(post,postun): gtk2

Provides:       dbus-bluez-pin-helper

Obsoletes: 	bluez-gnome < 1.9

Vendor: Project Vine
Distribution: Vine Linux
Packager: daisuke


%description
Blueman is designed to provide simple, yet effective means for 
controlling BlueZ API and simplifying bluetooth tasks such as:

* Connecting to 3G/EDGE/GPRS via dial-up
* Connecting to/Creating bluetooth networks
* Connecting to input devices
* Connecting to audio devices
* Sending/Receiving/Browsing files via OBEX
* Pairing

Blueman also integrates with Network Manager 0.7, so any Dialup/Network
 connections will be made available (via HAL) to Network Manager.

%prep
%setup -q

%build
%configure --disable-desktop-update --disable-icon-update --disable-schemas-install
%__make %{?_smp_mflags}

%install
rm -rf %{buildroot}
%__make install DESTDIR=${RPM_BUILD_ROOT}

desktop-file-install --vendor="" \
  --add-category="GNOME;GTK" \
  --add-category="Settings;HardwareSettings" \
  --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/%{name}-manager.desktop

find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} \;
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} \;

rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}

%find_lang %{name}

%clean
rm -rf %{buildroot}

%post
update-desktop-database %{_datadir}/applications >& /dev/null || :
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor ||:
fi
  
%postun
update-desktop-database %{_datadir}/applications >& /dev/null || :
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor ||:
fi
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:


%files -f %{name}.lang
%doc CHANGELOG.md COPYING FAQ README.md
%defattr(-,root,root)
%{_sysconfdir}/dbus-1/system.d/org.%{name}*.conf
%{_sysconfdir}/xdg/autostart/%{name}.desktop
%{_bindir}/%{name}-*
%{_datadir}/Thunar/sendto/thunar-sendto-%{name}.desktop
%{_datadir}/applications/%{name}-adapters.desktop
%{_datadir}/applications/%{name}-manager.desktop
%{_datadir}/%{name}/ui/*.ui
%{_datadir}/dbus-1/services/%{name}-applet.service
%{_datadir}/dbus-1/system-services/org.%{name}*.service
%{_datadir}/glib-2.0/schemas/org.%{name}.gschema.xml
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/pixmaps/%{name}
%{_datadir}/polkit-1/actions/org.%{name}.policy
%{_mandir}/man1/%{name}*1.*
%{python_sitelib}/*
%if %_lib == lib64
%{python_sitearch}/*
%endif
%{_libexecdir}/%{name}-*


%changelog
* Sun Jul 05 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.0-1
- update to 2.0
- add BuildRequires: polkit-devel, pygobject3-devel, Cython
- remove BuildRequires: pygobject-devel

* Sat Jan 04 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.23-4
- rebuild with VineSeed environment

* Sat Oct 06 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.23-3
- change Requires: polkit-gnome instead of PolicyKit-gnome

* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.23-2
- rebuild with python-2.7.2

* Tue Jan 03 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.23-1
- new upstream release

* Mon Apr 18 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.21-4
- rebuild with rpm-4.8.1

* Sun Feb 07 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.21-3
- add BuildRequires: gtk2-devel

* Wed Feb 03 2010 Shu KONNO <owa@bg.wakwak.com> 1.21-2
- rebuilt with python-2.6.4

* Mon Jan 04 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 1.21-1
- new upstream release

* Mon Jan 04 2010 Shu KONNO <owa@bg.wakwak.com> 1.10-2
- added _blueman to %%files (if lib64)

* Tue May 26 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.10-1
- initial build for Vine Linux

* Fri Mar 27 2009 Emmanuel Andry <eandry@mandriva.org> 1.02-4mdv2009.1
+ Revision: 361574
- don't explicitely requires notification-daemon

* Mon Mar 02 2009 Emmanuel Andry <eandry@mandriva.org> 1.02-3mdv2009.1
+ Revision: 347587
- requires python-blueman

* Mon Mar 02 2009 Emmanuel Andry <eandry@mandriva.org> 1.02-2mdv2009.1
+ Revision: 347346
- fix files
- BR python-dbus
- fix BR
- BR python-devel
- import blueman


