add bcond for each DE
[packages/blueman.git] / blueman.spec
1 # Conditional build:
2 %bcond_without  cinnamon        # build without nemo support
3 %bcond_without  gnome           # build without nautilus support
4 %bcond_without  mate            # build without caja support
5 %bcond_without  xfce            # build without Thunar support
6
7 Summary:        Blueman - bluetooth management utility for GNOME
8 Name:           blueman
9 Version:        2.1.3
10 Release:        2
11 License:        GPL
12 Group:          X11/Applications
13 Source0:        https://github.com/blueman-project/blueman/releases/download/%{version}/%{name}-%{version}.tar.xz
14 # Source0-md5:  b341822c8362bf9619fbbc22c957b00c
15 URL:            https://github.com/blueman-project/blueman
16 BuildRequires:  autoconf
17 BuildRequires:  automake
18 BuildRequires:  bluez-libs-devel >= 5.0
19 %{?with_mate:BuildRequires:     caja-python-devel}
20 %{?with_cinnamon:BuildRequires: cinnamon-nemo-python-devel}
21 BuildRequires:  gettext-tools
22 BuildRequires:  glib2-devel >= 2.32
23 BuildRequires:  gtk+3-devel >= 3.12
24 BuildRequires:  intltool >= 0.35.0
25 BuildRequires:  libtool
26 %{?with_gnome:BuildRequires:    nautilus-python-devel}
27 BuildRequires:  pkgconfig >= 0.9.0
28 BuildRequires:  python-Cython
29 BuildRequires:  python-devel >= 3.3
30 BuildRequires:  python-pygobject3-common-devel >= 3.27.2
31 BuildRequires:  rpm-pythonprov
32 BuildRequires:  rpmbuild(macros) >= 1.527
33 Requires(post,postun):  gtk-update-icon-cache
34 Requires(post,postun):  hicolor-icon-theme
35 Requires(post,preun,postun):    systemd-units >= 38
36 Requires:       bluez-libs >= 5.0
37 Requires:       bluez-utils >= 5.0
38 Requires:       gtk+3 >= 3.12
39 Requires:       python >= %py_ver
40 Requires:       python-appindicator-gtk2
41 Requires:       python-bluetooth
42 Requires:       python-pygtk-gtk
43 Suggests:       pulseaudio-bluetooth
44 Suggests:       pulseaudio-hal
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
48 Blueman is a GTK+ bluetooth management utility for GNOME using bluez
49 dbus backend. The aim is to create a full featured graphical bluetooth
50 manager for Linux.
51
52 Features:
53
54 - Easy to use interface
55 - Storing Favourite devices
56 - Send files
57 - Browse files on devices
58 - List all seen devices
59 - View Local/Remote Device information
60 - View transfer speeds and link quality
61 - Configure local devices
62 - Manage Pairing (Bonding)
63 - Host/Connect to Personal Area Networks
64 - Bind services to /dev/rfcomm ports, for eg. connecting via gprs
65 - Connect and receive connections from: audio, network, input and
66   serial devices
67
68 %package caja
69 Summary:        Blueman plugin for Caja
70 Summary(pl.UTF-8):      Wtyczka Blueman-a dla managera plików Caja
71 Group:          X11/Applications
72 Requires:       %{name} = %{version}
73 Requires:       caja-python
74
75 %description caja
76 Blueman plugin for Caja.
77
78 %description caja -l pl.UTF-8
79 Wtyczka Blueman-a dla managera plików Caja.
80
81 %package nautilus
82 Summary:        Blueman plugin for Nautilus
83 Summary(pl.UTF-8):      Wtyczka Blueman-a dla Nautilus-a
84 Group:          X11/Applications
85 Requires:       %{name} = %{version}
86 Requires:       nautilus-python
87
88 %description nautilus
89 Blueman plugin for Nautilus.
90
91 %description nautilus -l pl.UTF-8
92 Wtyczka Blueman-a dla Nautilus-a.
93
94 %package nemo
95 Summary:        Blueman plugin for Nemo
96 Summary(pl.UTF-8):      Wtyczka Blueman-a dla managera plików Nemo.
97 Group:          X11/Applications
98 Requires:       %{name} = %{version}
99 Requires:       cinnamon-nemo-python
100
101 %description nemo
102 Blueman plugin for Nautilus.
103
104 %description nemo -l pl.UTF-8
105 Wtyczka Blueman-a dla managera plików Nemo.
106
107 %package thunar
108 Summary:        Blueman plugin for Thunar
109 Summary(pl.UTF-8):      Wtyczka Blueman-a dla Thunar-a
110 Group:          X11/Applications
111 Requires:       %{name} = %{version}
112
113 %description thunar
114 Blueman plugin for Thunar.
115
116 %description thunar -l pl.UTF-8
117 Wtyczka Blueman-a dla Thunar-a.
118
119 %prep
120 %setup -q
121
122 %build
123 %configure \
124         NETWORKTOOLS=/sbin/ip \
125         --disable-static \
126         --disable-schemas-compile \
127         --enable-polkit \
128         %{__enable_disable mate caja-sendto} \
129         %{__enable_disable cinnamon nemo-sendto} \
130         %{__enable_disable gnome nautilus-sendto} \
131         %{__enable_disable xfce thunar-sendto} \
132         --enable-settings-integration
133
134 %{__make}
135
136 %install
137 rm -rf $RPM_BUILD_ROOT
138 %{__make} install \
139         DESTDIR=$RPM_BUILD_ROOT
140
141 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
142 %{__rm} $RPM_BUILD_ROOT%{_libdir}/python3.8/site-packages/_blueman.la
143
144 # DO NOT RUN py_postclean - breaks plugins and everything
145
146 %find_lang %{name} --with-gnome
147
148 %clean
149 rm -rf $RPM_BUILD_ROOT
150
151 %post
152 %update_icon_cache hicolor
153 glib-compile-schemas %{_datadir}/glib-2.0/schemas
154 %service %{name}-mechanism restart
155 %systemd_post %{name}-mechanism.service
156
157 %preun
158 if [ "$1" = "0" ]; then
159         %service -q %{name}-mechanism stop
160 fi
161 %systemd_preun %{name}-mechanism.service
162
163 %postun
164 %update_icon_cache hicolor
165 glib-compile-schemas %{_datadir}/glib-2.0/schemas
166 %systemd_reload
167
168 %files -f %{name}.lang
169 %defattr(644,root,root,755)
170 %doc README.md CHANGELOG.md COPYING FAQ
171 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/org.blueman.Mechanism.conf
172 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xdg/autostart/blueman.desktop
173 %attr(755,root,root) %{_bindir}/blueman-adapters
174 %attr(755,root,root) %{_bindir}/blueman-applet
175 %attr(755,root,root) %{_bindir}/blueman-assistant
176 %attr(755,root,root) %{_bindir}/blueman-manager
177 %attr(755,root,root) %{_bindir}/blueman-report
178 %attr(755,root,root) %{_bindir}/blueman-sendto
179 %attr(755,root,root) %{_bindir}/blueman-services
180 %attr(755,root,root) %{_bindir}/blueman-tray
181 %{_mandir}/man1/blueman-adapters.1*
182 %{_mandir}/man1/blueman-applet.1*
183 %{_mandir}/man1/blueman-assistant.1*
184 %{_mandir}/man1/blueman-manager.1*
185 %{_mandir}/man1/blueman-report.1
186 %{_mandir}/man1/blueman-sendto.1*
187 %{_mandir}/man1/blueman-services.1*
188 %{_mandir}/man1/blueman-tray.1*
189 %attr(755,root,root) %{_libexecdir}/%{name}-mechanism
190 %attr(755,root,root) %{_libexecdir}/%{name}-rfcomm-watcher
191 %{_datadir}/%{name}
192 %{_datadir}/dbus-1/system-services/org.blueman.Mechanism.service
193 %{_desktopdir}/blueman-manager.desktop
194 %{_desktopdir}/blueman-adapters.desktop
195 %{_iconsdir}/hicolor/scalable/*/*.svg
196 %{_iconsdir}/hicolor/*/*/*.png
197 %dir %{_pixmapsdir}/blueman
198 %{_pixmapsdir}/blueman/blueman-*.png
199 %{_datadir}/glib-2.0/schemas/org.blueman.gschema.xml
200 %{systemdunitdir}/blueman-mechanism.service
201 %{systemduserunitdir}/blueman-applet.service
202 %{_datadir}/dbus-1/services/org.blueman.Applet.service
203 %{_datadir}/polkit-1/actions/org.blueman.policy
204 %{_datadir}/polkit-1/rules.d/blueman.rules
205 %attr(755,root,root) %{_libdir}/python3.8/site-packages/_blueman.so
206 %{_libdir}/python3.8/site-packages/%{name}
207
208 %if %{with mate}
209 %files caja
210 %defattr(644,root,root,755)
211 %{_datadir}/caja-python/extensions/caja_blueman_sendto.py
212 %endif
213
214 %if %{with gnome}
215 %files nautilus
216 %defattr(644,root,root,755)
217 %{_datadir}/nautilus-python/extensions/nautilus_blueman_sendto.py
218 %endif
219
220 %if %{with cinnamon}
221 %files nemo
222 %defattr(644,root,root,755)
223 %{_datadir}/nemo-python/extensions/nemo_blueman_sendto.py
224 %endif
225
226 %if %{with xfce}
227 %files thunar
228 %defattr(644,root,root,755)
229 %{_datadir}/Thunar/sendto/thunar-sendto-blueman.desktop
230 %endif
This page took 0.086736 seconds and 3 git commands to generate.