File mkchromecast.spec of Package mkchromecast

#
# spec file for package mkchromecast
#
# Copyright (c) 2018 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 http://bugs.opensuse.org/
#


Name:           mkchromecast
Version:        0.3.8.1
Release:        0
Summary:        Cast audio/video to your Google Cast and Sonos Devices
License:        MIT
Group:          Productivity/Multimedia/Other
Url:            http://mkchromecast.com
Source:         https://github.com/muammar/mkchromecast/archive/0.3.8.1.tar.gz
BuildRequires:  python3-PyChromecast >= 0.8.2
BuildRequires:  python3-soco >= 0.12
BuildRequires:  python3-Flask >= 0.12.2
BuildRequires:  python3-netifaces >= 0.10.6
BuildRequires:  python3-setuptools >= 36.6.0
BuildRequires:  python3-requests >= 2.18.4
BuildRequires:  python3-mutagen >= 1.38
BuildRequires:  python3-psutil >= 5.4.0
BuildRequires:  python3-PyQt5 >= 5.9
BuildRequires:  python3-gobject >= 1.2
BuildRequires:  update-desktop-files
BuildRequires:  python-rpm-macros
Requires:       python3-PyChromecast >= 0.8.2
Requires:       python3-soco >= 0.12
Requires:       python3-Flask >= 0.12.2
Requires:       python3-netifaces >= 0.10.6
Requires:       python3-setuptools >= 36.6.0
Requires:       python3-requests >= 2.18.4
Requires:       python3-mutagen >= 1.38
Requires:       python3-psutil >= 5.4.0
Requires:       python3-PyQt5 >= 5.9
Requires:       python3-gobject >= 1.2
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is a program to cast audio to your Google Cast devices or Sonos speakers.
It can also cast video files.

%prep
%setup -q
sed -i -e 's,#!/usr/bin/env python,#!/usr/bin/python3,' mkchromecast.py
sed -i -e '/^#!\/usr\/bin\/env python/d' mkchromecast/*.py

%build

%install
mkdir -p %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_mandir}/man1/
mkdir -p %{buildroot}%{_datadir}/pixmaps/
mkdir -p %{buildroot}%{_datadir}/%{name}/images
mkdir -p %{buildroot}%{_datadir}/%{name}/nodejs
mkdir -p %{buildroot}%{python3_sitelib}/

cp -ra mkchromecast %{buildroot}%{python3_sitelib}/
cp -ra images/*.png %{buildroot}%{_datadir}/%{name}/images/
install -m755 mkchromecast.py %{buildroot}%{_bindir}/mkchromecast
install -m644 man/mkchromecast.1 %{buildroot}%{_mandir}/man1/
install -m644 images/mkchromecast.xpm %{buildroot}%{_datadir}/pixmaps/
install -m644 nodejs/html5-video-streamer.js %{buildroot}%{_datadir}/%{name}/nodejs/
%suse_update_desktop_file -i -u -r -G 'Chromecast Player' %{name} AudioVideo Player Audio Player Video Player

%files
%defattr(-,root,root)
%doc changelog.md README.md
%license LICENSE
%{_bindir}/mkchromecast
%{python3_sitelib}/%{name}
%{_datadir}/%{name}
%{_mandir}/man1/mkchromecast.1.gz
%{_datadir}/pixmaps/mkchromecast.xpm
%{_datadir}/applications/

%changelog
openSUSE Build Service is sponsored by