Blob Blame History Raw
%global pypi_name spectrographic

Name: %{pypi_name}
Summary: Turn an image into sound whose spectrogram looks like the image
License: MIT

Version: 0.9.3
Release: 8%{?dist}

URL: https://github.com/LeviBorodenko/%{pypi_name}
Source0: %{pypi_source}

Patch0: 0000-remove-pyscaffold-max-version-constraint.patch

BuildRequires: make
BuildRequires: python3-devel
BuildRequires: python3-pyscaffold
BuildRequires: python3-setuptools >= 38.3
BuildRequires: python3-sphinx

# These aren't strictly required, but sphinx complains
# and yells warnings about failed imports when they're not installed
BuildRequires: python3-pillow
BuildRequires: python3-simpleaudio
BuildRequires: python3-wavio

BuildArch: noarch


%description
Turn any image into a sound whose spectrogram looks like the image!

Most sounds are intricate combinations of many acoustic waves, each having
different frequencies and intensities. A spectrogram is a way to represent
sound by plotting time on the horizontal axis and the frequency spectrum
on the vertical axis. Sort of like sheet music on steroids.

What this tool does is, taking an image and simply interpreting it
as a spectrogram. Therefore, by generating the corresponding sound,
we have embedded our image in a spectrogram.


%package doc
Summary: Documentation for %{pypi_name}
BuildArch: noarch

%description doc
This package contains documentation (in HTML format)
for the %{pypi_name} program.


%prep
%setup -q
%patch0 -p1


%build
%py3_build

cd docs/
make man
make html


%install
%py3_install

install -m 755 -d %{buildroot}%{_mandir}/man1/
install -m 644 build/sphinx/man/%{name}.1 %{buildroot}%{_mandir}/man1/


%files
%doc AUTHORS.rst CHANGELOG.rst README.md
%license LICENSE.txt
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%{python3_sitelib}/%{name}/
%{python3_sitelib}/%{name}-*.egg-info/


%files doc
%doc build/sphinx/html/*


%changelog
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.3-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Fri Jul 16 2021 Artur Frenszek-Iwicki <fedora@svgames.pl> - 0.9.3-6
- Add Patch0: remove max version constraint on pyscaffold dependency (fixes rhbz#1981726)

* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.9.3-5
- Rebuilt for Python 3.10

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Mon Jul 13 2020 Artur Iwicki <fedora@svgames.pl> - 0.9.3-2
- Build docs with Sphinx and install them

* Tue May 05 2020 Artur Iwicki <fedora@svgames.pl> - 0.9.3-1
- Initial packaging