File blockify.spec of Package blockify

# spec file for package blockify
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           blockify
Version:        3.6.3
Release:        1
License:        MIT
Summary:        Ad blocker for Spotify written in Python
Url:  {name}
%if 0%{?rhel} >= 7
BuildRequires:  python34-setuptools
%if 0%{?rhel} == 6
BuildRequires:  python33-setuptools
%if 0%{?suse_version} || 0%{?fedora_version} || 0%{?mageia} || 0%{?mandriva_release}
BuildRequires:  python3-setuptools

%if 0%{?fedora}
BuildRequires:  pygtk2
%if 0%{?mageia} || 0%{?mandriva_release}
BuildRequires:  pygtk2.0
%if 0%{?suse_version}
BuildRequires:  python-gtk

Requires:       python3-docopt
Requires:       wmctrl

%if 0%{?fedora} || 0%{?rhel}
Requires:       dbus
Requires:       dbus-1

Requires:       pulseaudio
Requires:       alsa-lib-devel
Requires:       gstreamer-devel

BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Blockify is an ad-blocker for Spotify that is written in Python.

%setup -q

python3 build

python3 install --root=%{buildroot}
mkdir -p %{buildroot}%{_datadir}/{applications,pixmaps}
cp blockify/data/icon-red-512.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
cp blockify/data/blockify.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
sed -i -e 's/AudioVideo/AudioVideo;Music;/g' \
       -e 's/icon-red-512.png/blockify/g' %{buildroot}%{_datadir}/applications/%{name}.desktop



%doc LICENSE.txt
openSUSE Build Service is sponsored by