Sophie

Sophie

distrib > Mageia > cauldron > i586 > by-pkgid > 7ae16a459f9ea3d469a5207293c7587f > files > 3

mkchromecast-0.3.8.1-1.mga9.src.rpm

%global debug_package %{nil}

Summary:	Cast linux sound and video to a chromecast device
Name:		mkchromecast
Version:	0.3.8.1
Release:	%mkrel 1
License:	MIT
Group:		Sound/Utilities
BuildArch:	noarch
URL:		https://mkchromecast.com
Source0:	https://github.com/muammar/%{name}/archive/refs/tags/%{version}.tar.gz
Source1:	README.mageia

BuildRequires:	python%{python3_pkgversion}-devel
BuildRequires:	python%{python3_pkgversion}-setuptools
BuildRequires:	sed

#Fedora requires
#XXX: see https://github.com/bugzy/mkchromecast/blob/master/fedora/mkchromecast.spec
Requires:		flac
Requires:		lame
Requires:		nodejs
Requires:		opus-tools
Requires:		sox
Requires:		youtube-dl

#TODO: narrow to only used plugins ?
#python3-flask                python3-flask-ext            python3-flask-mail           python3-flask-multistatic    python3-flask-peewee         python3-flask-script         python3-flask-sqlalchemy
#python3-flask-babel          python3-flask-gravatar       python3-flask-migrate        python3-flask-oidc           python3-flask-principal      python3-flask-security       python3-flask-wtf
#python3-flask-babelex        python3-flask-login          python3-flask-mongoengine    python3-flask-paranoid       python3-flask-restx          python3-flask-sphinx-themes  
Requires:	python3-flask
Requires:	python3-netifaces
Requires:	python3-setuptools
Requires:	python3-protobuf >= 3.20
Requires:	python3-pychromecast
Requires:	python3-soco
Requires:	python3-requests
Requires:	python3-mutagen
Requires:	python3-psutil
#TODO: narrow to only used plugins (gui?)
#python3-qt5                             python3-qt5-doc                         python3-qt5-printsupport                python3-qt5-quick                       python3-qt5-webenginecore
#python3-qt5-bluetooth                   python3-qt5-examples                    python3-qt5-purchasing                  python3-qt5-quick3d                     python3-qt5-webengine-qsci-api
#python3-qt5-chart                       python3-qt5-gui                         python3-qt5-purchasing-qsci-api         python3-qt5-quickwidgets                python3-qt5-webenginewidgets
#python3-qt5-chart-examples              python3-qt5-help                        python3-qt5-qaxcontainer                python3-qt5-remoteobjects               python3-qt5-webkit
#python3-qt5-chart-qsci-api              python3-qt5-location                    python3-qt5-qhexedit2                   python3-qt5-sensors                     python3-qt5-webkitwidgets
#python3-qt5-core                        python3-qt5-multimedia                  python3-qt5-qhexedit2-devel             python3-qt5-serialport                  python3-qt5-websockets
#python3-qt5-datavisualization           python3-qt5-multimediawidgets           python3-qt5-qml                         python3-qt5-sql                         python3-qt5-widgets
#python3-qt5-datavisualization-examples  python3-qt5-network                     python3-qt5-qsci-api                    python3-qt5-svg                         python3-qt5-x11extras
#python3-qt5-datavisualization-qsci-api  python3-qt5-networkauth                 python3-qt5-qscintilla                  python3-qt5-test                        python3-qt5-xml
#python3-qt5-dbus                        python3-qt5-nfc                         python3-qt5-qt3d                        python3-qt5-texttospeech                python3-qt5-xmlpatterns
#python3-qt5-designer                    python3-qt5-opengl                      python3-qt5-qt3d-examples               python3-qt5-webchannel                  
#python3-qt5-devel                       python3-qt5-positioning                 python3-qt5-qt3d-qsci-api               python3-qt5-webengine                   
Requires:	python3-qt5-gui
#Requires:	python3-gi seems to be python3-gobject
Requires:	python3-gobject


%description
Mkchromecast is written in Python, and it streams via node.js, ffmpeg, or
avconv. It is capable of using lossy and lossless audio formats provided
that ffmpeg is installed. It also supports Multi-room group playback, and
24-bits/96kHz high audio resolution. Additionally, a system tray menu is also
available.

By default, mkchromecast streams with node.js (or parec in Linux) together
with mp3 audio coding format at a sample rate of 44100Hz and average bitrate
of 192k. These defaults can be changed using the --sample-rate and -b flags.
It is useful to modify these parameters when your wireless router is not very
powerful, or in the case you don't want to degrade the sound quality. You can
also cast videos using the --video flag.

mkchromecast can cast using either pulseaudio or ALSA. The respective
dependencies can be pulled by mkchromecast-pulseaudio and mkchromecast-alsa
dependency packages respectively. For more information, please read the
README.mageia file shipped in this package.


%package gstreamer
Summary:	GStreamer dependencies to cast with mkchromecast
Requires:	mkchromecast = %{version}-%{release}
Requires:	gstreamer1.0-python

%description gstreamer
This dependency package contains an informational list of packages which are
considered essential for using mkchromecast together with GStreamer software
framework. This package also depends on the packages on that list.

Information about needed configurations are contained in the README.fedora
file shipped in the mkchromecast package.


%package pulseaudio
Summary:	Pulseaudio dependencies to cast with mkchromecast
Requires:	mkchromecast = %{version}-%{release}
Requires:	pavucontrol
Requires:	pulseaudio-utils

%description pulseaudio
This dependency package contains an informational list of packages which are
considered essential for using mkchromecast together with pulseaudio sound
server.


%prep
%autosetup
install -m 0644 %{SOURCE1} .


%build
# Fix shebang
sed -i -e '1,1s%#!/usr/bin/env python%#! %{__python3}%' {mkchromecast.py,start_tray.py}


%install
# Install dirs
install -d 0755 %{buildroot}%{_bindir}
install -d 0755 %{buildroot}%{_datadir}
install -d 0755 %{buildroot}%{_datadir}/applications
install -d 0755 %{buildroot}%{_datadir}/pixmaps
install -d 0755 %{buildroot}%{_mandir}
install -d 0755 %{buildroot}%{_mandir}/man1

# Install bin
install -p -m 0755 mkchromecast.py %{buildroot}%{_bindir}/mkchromecast
install -p -m 0755 start_tray.py %{buildroot}%{_bindir}/mkchromecast_tray

# Install desktop file
install -p -m 0644 mkchromecast.desktop %{buildroot}%{_datadir}/applications/

# Install icon file
install -p -m 0644 images/mkchromecast.xpm %{buildroot}%{_datadir}/pixmaps/

# Install map page
install -p -m 0644 man/mkchromecast.1 %{buildroot}%{_mandir}/man1/


%files
%license LICENSE
%doc README.md README.mageia
%{_bindir}/mkchromecast
%{_bindir}/mkchromecast_tray
%{_datadir}/applications/mkchromecast.desktop
%{_datadir}/pixmaps/mkchromecast.xpm
%{_mandir}/man1/mkchromecast.1.xz


%files gstreamer
%doc README.md README.mageia


%files pulseaudio
%doc README.md README.mageia


%changelog
* Mon Jun 26 2023 rapsys <rapsys> 0.3.8.1-1.mga9
+ Revision: 1963111
- Fix group
- Import mkchromecast version 0.3.8.1
- Created package structure for mkchromecast.