Blame blueberry.spec

4b1bb8c
Name:		blueberry
ad44d1b
Version:	1.1.10
ad44d1b
Release:	1%{?dist}
4b1bb8c
Summary:	Bluetooth configuration tool
4b1bb8c
4b1bb8c
License:	GPLv3+
4b1bb8c
URL:		https://github.com/linuxmint/%{name}
4b1bb8c
Source0:	%{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
4b1bb8c
4b1bb8c
# Adds COPYING from open pull-request.
4b1bb8c
Patch0:		%{url}/pull/27.patch#/%{name}-1.1.9_license.patch
ad44d1b
# Remove debug log -- Left there by mistake.
ad44d1b
Patch1:		%{url}/commit/f33e32479f77f91dfa02bbf79643926f446b403a.patch#/%{name}-1.1.10_remove_debug_log.patch
55ac0f9
# GSETTINGS should be GSettings.  desktop-file-validate compains about that.
55ac0f9
Patch2:		%{url}/pull/30.patch#/%{name}-1.1.10_fix_AutostartCondition.patch
4b1bb8c
4b1bb8c
BuildArch:	noarch
4b1bb8c
4b1bb8c
BuildRequires:	desktop-file-utils
4b1bb8c
BuildRequires:	gettext
4b1bb8c
BuildRequires:	python2-devel
4b1bb8c
ad44d1b
Requires:	bluez-obexd
ad44d1b
Requires:	dbus-python
4b1bb8c
Requires:	filesystem
4b1bb8c
Requires:	gnome-bluetooth
4b1bb8c
Requires:	hicolor-icon-theme
ad44d1b
Requires:	python-gi
ad44d1b
Requires:	python-setproctitle
4b1bb8c
Requires:	rfkill
4b1bb8c
Requires:	wmctrl
4b1bb8c
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
4b1bb8c
%autosetup -p1
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
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
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
fi
4b1bb8c
%if (0%{?fedora} && 0%{?fedora} <= 23) || (0%{?rhel} && 0%{?rhel} <= 7)
4b1bb8c
if [ $1 -eq 0 ] ; then
4b1bb8c
	%{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas	\
4b1bb8c
		&> /dev/null || :
4b1bb8c
fi
4b1bb8c
%endif # (0#{?fedora} && 0#{?fedora} <= 23) || (0#{?rhel} && 0#{?rhel} <= 7)
4b1bb8c
4b1bb8c
4b1bb8c
%posttrans
4b1bb8c
%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor		\
4b1bb8c
	&>/dev/null || :
4b1bb8c
%if (0%{?fedora} && 0%{?fedora} <= 23) || (0%{?rhel} && 0%{?rhel} <= 7)
4b1bb8c
%{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas		\
4b1bb8c
	&> /dev/null || :
4b1bb8c
%endif # (0#{?fedora} && 0#{?fedora} <= 23) || (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
55ac0f9
%files -n cinnamon-applet-%{name}
55ac0f9
%{_datadir}/cinnamon/applets/%{name}*
55ac0f9
4b1bb8c
4b1bb8c
%changelog
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)