Sophie

Sophie

distrib > Mageia > 6 > i586 > by-pkgid > 9318a0b641ff833ecf279a4df2d1c9d2 > files > 7

blueman-2.0.4-1.mga6.src.rpm

#define snap 20150512
#define pre_release alpha3
%define _version 2.0.4
%define rel 1

%define have_polkit 1
# Build with python3 ?
%define _python3 0

Name:       blueman
%if 0%{?%pre_release:1}
Version:    %{_version}.%{pre_release}
%else
Version:    %{_version}
%endif
%if 0%{?%snap:1}
Release:    %mkrel 0.git%{snap}.%{rel}
# git clone https://github.com/blueman-project/blueman.git && pushd blueman && git archive --prefix=blueman-$(date +%Y%m%d)/ --format=tar HEAD | xz > ../blueman-$(date +%Y%m%d).tar.xz && popd
Source0:    %{name}-%{snap}.tar.xz
%else
Release:    %mkrel %{rel}
Source0:    https://github.com/blueman-project/blueman/releases/download/%{version}/%{name}-%{version}.tar.xz
%endif
Summary:   Full featured bluetooth manager for GNOME/MATE/GTK+
License:      GPLv2+
Group:        Communications/Bluetooth
URL:            https://github.com/blueman-project/blueman/
Patch0:       blueman-2.0.0-fdo-fix_bluetoothd_path.patch
# upstream patch to remove browse
Patch1:       blueman-2.0.0-fdo-drop-browse-feature.patch
# upstream patch to rename service file
Patch2:       blueman-2.0.0-fdo-rename-blueman-applet.service-to-org.blueman.Applet.patch
# upstream fix for https://bugzilla.redhat.com/show_bug.cgi?id=1233237
Patch3:       blueman-2.0.0-fdo-ignore-EEXIST-when-trying-to-create-the-cache-direct.patch
# mate-icon-theme >= 1.12.0 does not provide pkgconfig file anymore
Patch4:       blueman-2.0.1-mga_buildtime_icon_theme_fix.patch

BuildRequires:    pkgconfig(bluez) >= 5.11
BuildRequires:    pkgconfig(glib-2.0) >= 2.32
BuildRequires:    pkgconfig(gobject-2.0) >= 2.12
BuildRequires:    pkgconfig(gthread-2.0) >= 2.32
BuildRequires:    pkgconfig(gtk+-3.0) >= 3.10.6
BuildRequires:    pkgconfig(libstartup-notification-1.0) >= 0.9
BuildRequires:    pkgconfig(notify-python)
BuildRequires:    pkgconfig(pygobject-3.0)
%if %{have_polkit}
BuildRequires:    pkgconfig(polkit-agent-1)
%endif
#Python3 or Python2?
%if %_python3
BuildRequires:    pkgconfig(python3) >= 3.2
BuildRequires:    python3-cython >= 0.21
BuildRequires:    python3-dbus
%else
BuildRequires:    pkgconfig(python2) >= 2.7
BuildRequires:    python-cython
BuildRequires:    python-dbus
BuildRequires:    python-pybluez
%endif
BuildRequires:    intltool
BuildRequires:    thunar

Requires:    bluez >= 5.11
%if %_python3
Requires:    python3-dbus
Requires:    python3-gobject3
%else
Requires:    python-gobject
Requires:    python-notify
Requires:    pygtk2.0
Requires:    python-dbus
Requires:    gnome-python-gconf
%endif
Requires:    polkit-agent
Requires:    pulseaudio-module-bluetooth
Requires:   mate-icon-theme
Obsoletes:    python-blueman
Obsoletes:    blueman < 1.23
Recommends:    %{name}-sendto = %{version}-%{release}
Recommends:    bluez-pin

%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

%prep
%if 0%{?%snap:1}
%autosetup -n %{name}-%{snap} -p1
%else
%autosetup -p1
%endif


# Remove appindicator support
sed -i 's|AppIndicator.py||g' blueman/plugins/applet/Makefile.*

# Python3
%if %_python3
 sed -i '1s/python.*/python3/' apps/%{name}-*
%endif

%build
%if 0%{?%snap:1}
NOCONFIGURE=1 ./autogen.sh
%endif
# Needed by patch2
NOCONFIGURE=1 ./autogen.sh
%if %_python3
export PYTHON=%{_bindir}/python3 
export PYTHON_CFLAGS=-I%{py3_incdir}
export PYTHON_LIBS=-lpython%{python3_version}m
export CYTHONEXEC=%{_bindir}/python3-cython
%endif
%configure2_5x \
    --with-gtk=3.0 \
    --disable-hal \
%if %{have_polkit}
    --enable-polkit \
%else
    --disable-polkit \
%endif
    --disable-static \
    --enable-thunar-sendto \
    --enable-settings-integration
%make_build

%install
%make_install

desktop-file-install --vendor="" \
  --add-category="GTK" \
  --add-category="HardwareSettings" \
  --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/%{name}-manager.desktop
  
desktop-file-install \
 --add-category="GTK;GNOME;" \
 --add-only-show-in="GNOME;XFCE;LXDE;X-Cinnamon;MATE" \
 --delete-original \
 --dir %{buildroot}%{_sysconfdir}/xdg/autostart %{buildroot}%{_sysconfdir}/xdg/autostart/%{name}.desktop

desktop-file-install \
 --delete-original     \
 --dir %{buildroot}%{_datadir}/applications  %{buildroot}%{_datadir}/applications/%{name}-adapters.desktop

find %{buildroot} -name '*.la' -exec rm -f {} ';'
    
%find_lang %{name}

%preun
%preun_uninstall_gconf_schemas %{name}-manager

%files -f %{name}.lang
%doc CHANGELOG.md FAQ README.md COPYING
%{_sysconfdir}/dbus-1/system.d/org.%{name}*.conf
%{_sysconfdir}/xdg/autostart/%{name}.desktop
%{_bindir}/%{name}-*
%{_datadir}/applications/%{name}-manager.desktop
%{_datadir}/%{name}
%{_datadir}/Thunar/sendto/thunar-sendto-%{name}.desktop
%{_datadir}/applications/%{name}-adapters.desktop
%{_datadir}/pixmaps/%{name}/*.png
%{_datadir}/glib-2.0/schemas/org.blueman.gschema.xml
%if %{have_polkit}
%{_datadir}/polkit-1/actions/org.%{name}.policy
%endif
%{_iconsdir}/hicolor/*/*/%{name}*
%{_datadir}/dbus-1/services/org.%{name}.*.service
%{_datadir}/dbus-1/system-services/org.%{name}*.service
%{_mandir}/man1/%{name}*1.*
%if %_python3
%{py3_puresitedir}/%{name}
%{py3_platsitedir}/_%{name}.so
%else
%{py_puresitedir}/%{name}
%{py_platsitedir}/_%{name}.so
%endif
%{_libexecdir}/%{name}-mechanism
%{_libexecdir}/%{name}-rfcomm-watcher


%changelog
* Sat Apr 02 2016 tarakbumba <tarakbumba> 2.0.4-1.mga6
+ Revision: 997699
- Update to 2.0.4 version

* Sat Mar 19 2016 luigiwalser <luigiwalser> 2.0.3-2.mga6
+ Revision: 993011
- fix patch

* Fri Dec 18 2015 tarakbumba <tarakbumba> 2.0.3-1.mga6
+ Revision: 911766
- Update to 2.0.3 version

* Thu Dec 17 2015 tarakbumba <tarakbumba> 2.0.2-1.mga6
+ Revision: 911503
- Update to 2.0.2 version

* Fri Nov 27 2015 tarakbumba <tarakbumba> 2.0.1-4.mga6
+ Revision: 906369
- Rebuild with python2

* Thu Nov 26 2015 tarakbumba <tarakbumba> 2.0.1-3.mga6
+ Revision: 906341
- Fix python3 build and requires
- Fix shabangs for python2 build

* Sun Nov 08 2015 tarakbumba <tarakbumba> 2.0.1-2.mga6
+ Revision: 899259
- Require mate-icon-theme otherwise it does not pull one

* Sat Oct 10 2015 tarakbumba <tarakbumba> 2.0.1-1.mga6
+ Revision: 889409
- Update to 2.0.1 bugfix release

  + doktor5000 <doktor5000>
    - include polkit policy
    - fixed conditional macro handling of %%{pre_release} and %%snap

* Tue Jun 23 2015 tarakbumba <tarakbumba> 2.0-1.mga6
+ Revision: 841434
- Update to stable 2.0 version
- Add upstream patches from git
- Enable polkit support
- Add missing pulseaudio-module-bluetooth dependency

* Mon May 18 2015 tmb <tmb> 1.99.alpha3-0.git20150512.2.mga5
+ Revision: 822352
- submit to /release

* Wed May 13 2015 tarakbumba <tarakbumba> 1.99.alpha3-0.git20150512.1.mga5
+ Revision: 822034
- Update to first Bluez5 compatible version
- Switch to the git version due to rapid Bluez5 integration
- Remove deprecated obex-data-server from requires tag
- Restore blueman, has new maintainer team and supports bluez5

  + luigiwalser <luigiwalser>
    - obsoleted by bluez due to incompatibility with bluez5

* Sun Sep 29 2013 fwang <fwang> 1.23-1.mga4
+ Revision: 489190
- cleanup spec

  + dams <dams>
    - new version 1.23

* Fri Jan 11 2013 umeabot <umeabot> 1.21-7.mga3
+ Revision: 346924
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Tue Jan 01 2013 pterjan <pterjan> 1.21-6.mga3
+ Revision: 337448
- Fix for _libdir != _libexecdir

* Wed Oct 03 2012 malo <malo> 1.21-5.mga3
+ Revision: 302254
- update RPM group

* Sun Mar 20 2011 wally <wally> 1.21-4.mga1
+ Revision: 75039
- add cairo-devel BR
- drop buildroot definition
- drop old mdv scriptlets
- merge python parts into main package
- drop some runtime requires from buildrequires
- clean .spec
- imported package blueman