Blame blueberry.spec

ec0d507
# This package depends on automagic byte compilation
ec0d507
# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2
ec0d507
%global _python_bytecompile_extra 1
ec0d507
f9ba690
# bytecompile with Python 2
f9ba690
%global __python %{__python2}
f9ba690
4b1bb8c
Name:		blueberry
5605d32
Version:	1.2.3
5605d32
Release:	1%{?dist}
4b1bb8c
Summary:	Bluetooth configuration tool
4b1bb8c
4b1bb8c
License:	GPLv3+
4b1bb8c
URL:		https://github.com/linuxmint/%{name}
e8a20bd
Source0:	%{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
4b1bb8c
4b1bb8c
BuildArch:	noarch
4b1bb8c
4b1bb8c
BuildRequires:	desktop-file-utils
4b1bb8c
BuildRequires:	gettext
4b1bb8c
BuildRequires:	python2-devel
4b1bb8c
ad44d1b
Requires:	bluez-obexd
06ff6cb
Requires:	bluez-tools
4b1bb8c
Requires:	filesystem
4b1bb8c
Requires:	gnome-bluetooth
4b1bb8c
Requires:	hicolor-icon-theme
4b1bb8c
Requires:	rfkill
4b1bb8c
Requires:	wmctrl
4b1bb8c
c5202d5
%if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7)
c5202d5
Requires:	dbus-python
c5202d5
Requires:	pygobject3
c5202d5
Requires:	python-setproctitle
c5202d5
%else
c5202d5
Requires:	python2-dbus
c5202d5
Requires:	python2-gobject
c5202d5
Requires:	python2-setproctitle
c5202d5
%endif
ad44d1b
4b1bb8c
%description
4b1bb8c
%{summary} depending on gnome-bluetooth.
4b1bb8c
4b1bb8c
55ac0f9
%package -n cinnamon-applet-%{name}
55ac0f9
Summary:	Cinnamon applet for %{name}
55ac0f9
55ac0f9
Requires:	%{name}			== %{version}-%{release}
55ac0f9
Requires:	cinnamon
55ac0f9
55ac0f9
%description -n cinnamon-applet-%{name}
55ac0f9
Cinnamon applet for %{name}.
55ac0f9
55ac0f9
4b1bb8c
%prep
bd2855f
%autosetup -p 1
4b1bb8c
4b1bb8c
# Fix shebangs to system Python2.x
4b1bb8c
for file in .%{_bindir}/* $(%{_bindir}/find .%{_prefix} -name '*.py' -type f)
4b1bb8c
do
4b1bb8c
	%{__sed} -i.orig						\
55ac0f9
	-e 's~#![ \t]*%{_bindir}/python$~#!%{__python2}~'\
55ac0f9
	-e 's~#![ \t]*%{_bindir}/env[ \t]*python[2]*$~#!%{__python2}~'	\
4b1bb8c
	 ${file}
4b1bb8c
	/bin/touch -r ${file}.orig ${file}
4b1bb8c
	%{__rm} -f ${file}.orig
4b1bb8c
done
4b1bb8c
7f1568a
for f in $(%{__grep} -Rl '#!.*python3') ; do
42dca8e
  %{__sed} -e 's~#!.*python3~#!/usr/bin/python2~g' < ${f} > ${f}.new
7f1568a
  /bin/touch -r ${f}.new ${f}
2dd2a15
  mode="$(%{_bindir}/stat -c '%a' ${f})"
7f1568a
  %{__mv} -f ${f}.new ${f}
2dd2a15
  %{__chmod} -c ${mode} ${f}
7f1568a
done
7f1568a
4b1bb8c
4b1bb8c
%build
4b1bb8c
%make_build
4b1bb8c
4b1bb8c
4b1bb8c
%install
4b1bb8c
%{__mkdir} -p %{buildroot}
4b1bb8c
%{__cp} -a .%{_prefix} .%{_sysconfdir} %{buildroot}
4b1bb8c
%{__grep} -RZl '#!%{__python2}' %{buildroot}%{_prefix}/lib/%{name}/* |	\
4b1bb8c
	%{_bindir}/xargs -0 %{__chmod} -c 0755
4b1bb8c
for file in $(%{_bindir}/find %{buildroot} -name '*.desktop' -type f)
4b1bb8c
do
4b1bb8c
	%{_bindir}/desktop-file-validate ${file}
4b1bb8c
done
4b1bb8c
%find_lang %{name}
4b1bb8c
4b1bb8c
714c848
%if (0%{?rhel} && 0%{?rhel} >= 7)
4b1bb8c
%post
4b1bb8c
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
4b1bb8c
4b1bb8c
4b1bb8c
%postun
4b1bb8c
if [ $1 -eq 0 ] ; then
4b1bb8c
	/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
4b1bb8c
	%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor	\
4b1bb8c
		&>/dev/null || :
4b1bb8c
	%{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas	\
4b1bb8c
		&> /dev/null || :
4b1bb8c
fi
4b1bb8c
4b1bb8c
4b1bb8c
%posttrans
4b1bb8c
%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor		\
4b1bb8c
	&>/dev/null || :
4b1bb8c
%{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas		\
4b1bb8c
	&> /dev/null || :
714c848
%endif # (0%%{?rhel} && 0%%{?rhel} >= 7)
4b1bb8c
4b1bb8c
4b1bb8c
%files -f %{name}.lang
4b1bb8c
%license debian/copyright COPYING
4b1bb8c
%doc debian/changelog
4b1bb8c
# Desktop-file for xdg/autostart.
55ac0f9
%config %{_sysconfdir}/xdg/autostart/*%{name}*.desktop
4b1bb8c
%{_bindir}/%{name}*
4b1bb8c
%{_datadir}/applications/%{name}.desktop
4b1bb8c
%{_datadir}/glib-2.0/schemas/org.%{name}.gschema.xml
55ac0f9
%{_datadir}/icons/hicolor/*/status/%{name}*.png
55ac0f9
%{_datadir}/icons/hicolor/*/status/%{name}*.svg
4b1bb8c
%{_prefix}/lib/%{name}
4b1bb8c
bd2855f
55ac0f9
%files -n cinnamon-applet-%{name}
55ac0f9
%{_datadir}/cinnamon/applets/%{name}*
55ac0f9
4b1bb8c
4b1bb8c
%changelog
5605d32
* Wed Aug 15 2018 Leigh Scott <leigh123linux@googlemail.com> - 1.2.3-1
5605d32
- New upstream release
5605d32
e8233d8
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.2-2
e8233d8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
e8233d8
f602c06
* Tue Jun 19 2018 Leigh Scott <leigh123linux@googlemail.com> - 1.2.2-1
f602c06
- New upstream release
f602c06
e8a20bd
* Tue May 22 2018 Leigh Scott <leigh123linux@googlemail.com> - 1.2.1-1
e8a20bd
- New upstream release
e8a20bd
fa91360
* Thu Feb 15 2018 Leigh Scott <leigh123linux@googlemail.com> - 1.1.20-6
fa91360
- Do it better
fa91360
714c848
* Thu Feb 15 2018 Leigh Scott <leigh123linux@googlemail.com> - 1.1.20-5
714c848
- Add some upstream fixes
714c848
- Remove the python3 dep
714c848
9284691
* Wed Feb 07 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.1.20-4
9284691
- Update Python 2 dependency declarations to new packaging standards
9284691
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
9284691
5ee0a76
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.20-3
5ee0a76
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
5ee0a76
dd9004e
* Sun Jan 07 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.1.20-2
dd9004e
- Remove obsolete scriptlets
dd9004e
12f0d72
* Mon Dec 18 2017 Leigh Scott <leigh123linux@googlemail.com> - 1.1.20-1
12f0d72
- New upstream release
12f0d72
33ff87b
* Sun Dec 10 2017 Leigh Scott <leigh123linux@googlemail.com> - 1.1.19-1
33ff87b
- New upstream release
33ff87b
d05086d
* Tue Nov 14 2017 Leigh Scott <leigh123linux@googlemail.com> - 1.1.18-1
d05086d
- New upstream release
d05086d
  Add upstream fix for double icons (rhbz#1478751)
d05086d
62d42ee
* Mon Nov 06 2017 Björn Esser <besser82@fedoraproject.org> - 1.1.17-1
62d42ee
- New upstream release (rhbz#1509725)
62d42ee
6892554
* Fri Oct 27 2017 Leigh Scott <leigh123linux@googlemail.com> - 1.1.16-1
6892554
- New upstream release
6892554
8e658ca
* Tue Oct 24 2017 Leigh Scott <leigh123linux@googlemail.com> - 1.1.15-6
8e658ca
- Patch for util-linux rfkill change in f28
8e658ca
2dd2a15
* Thu Aug 31 2017 Björn Esser <besser82@fedoraproject.org> - 1.1.15-5
2dd2a15
- Preserve mode of files when changing hashbang
2dd2a15
42dca8e
* Thu Aug 31 2017 Björn Esser <besser82@fedoraproject.org> - 1.1.15-4
42dca8e
- Fix regex for EPEL
42dca8e
7f1568a
* Thu Aug 31 2017 Björn Esser <besser82@fedoraproject.org> - 1.1.15-3
7f1568a
- Use Python2 on EPEL <= 7
7f1568a
50ab076
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.15-2
50ab076
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
50ab076
bd2855f
* Wed Jun 28 2017 Björn Esser <besser82@fedoraproject.org> - 1.1.15-1
bd2855f
- New upstream release (rhbz#1465880)
bd2855f
ffe6468
* Mon Jun 12 2017 Leigh Scott <leigh123linux@googlemail.com> - 1.1.13-1
ffe6468
- New upstream release
ffe6468
4cb7f95
* Wed May 24 2017 Björn Esser <besser82@fedoraproject.org> - 1.1.12-1
4cb7f95
- New upstream release (rhbz#1454974)
4cb7f95
8caf414
* Sat May 06 2017 Björn Esser <besser82@fedoraproject.org> - 1.1.11-1
8caf414
- New upstream release
8caf414
06ff6cb
* Sun Feb 19 2017 Björn Esser <besser82@fedoraproject.org> - 1.1.10-3
06ff6cb
- Add requires for bluez-tools
06ff6cb
65107eb
* Sun Feb 19 2017 Björn Esser <besser82@fedoraproject.org> - 1.1.10-2
65107eb
- Fix dependencies
65107eb
- Update patches from upstream
65107eb
ad44d1b
* Sun Feb 19 2017 Björn Esser <besser82@fedoraproject.org> - 1.1.10-1
ad44d1b
- New upstream release
55ac0f9
- Add sub-pkg for new Cinnamon applet
ad44d1b
7c31aba
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.9-3
7c31aba
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
7c31aba
f1cf9a7
* Fri Jan 06 2017 Björn Esser <besser82@fedoraproject.org> - 1.1.9-2
f1cf9a7
- Fix %%files for el <= 7
f1cf9a7
4b1bb8c
* Thu Jan 05 2017 Björn Esser <besser82@fedoraproject.org> - 1.1.9-1
4b1bb8c
- Initial rpm-release (rhbz#1409404)
4b1bb8c
4b1bb8c
* Sun Jan 01 2017 Björn Esser <besser82@fedoraproject.org> - 1.1.9-0.3
4b1bb8c
- Added scriptlets for Fedora <= 23 and RHEL <= 7
4b1bb8c
4b1bb8c
* Sun Jan 01 2017 Björn Esser <besser82@fedoraproject.org> - 1.1.9-0.2
4b1bb8c
- Updated Patch0
4b1bb8c
4b1bb8c
* Sun Jan 01 2017 Björn Esser <besser82@fedoraproject.org> - 1.1.9-0.1
4b1bb8c
- Initial package (rhbz#1409404)