1 Summary: MMA - Musical MIDI Accompaniment
7 Source0: http://www.mellowood.ca/mma/%{name}-bin-%{version}.tar.gz
8 # Source0-md5: a7e34ec1b9c2ffc36f408314bb184615
9 URL: http://www.mellowood.ca/mma/downloads.html
10 BuildRequires: python3-modules
11 BuildRequires: rpmbuild(macros) >= 1.714
12 BuildRequires: rpm-pythonprov
13 BuildRequires: sed >= 4.0
14 Requires: python3-modules
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 MMA — Musical MIDI Accompaniment is an accompaniment generator. It
20 creates MIDI tracks for a soloist to perform over from a user supplied
21 file containing chords and MMA directives.
23 MMA is very versatile and generates excellent tracks. It comes with an
24 extensive user-extendable library with a variety of patterns for
25 various popular rhythms, detailed user manuals, and several demo
28 MMA is a command line driven program. It creates MIDI files which are
29 then played by a sequencer or MIDI file play program.
32 %setup -q -n %{name}-bin-%{version}
34 # force our Python 3 for scripts
35 %{__sed} -i -e '1s,^#!.*python,#!%{__python3},' mma.py mma-* util/*.py
37 # remove files compiled upstream
38 find . -name '*.py[co]' | xargs rm
43 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT{%{_datadir}/mma,%{_bindir},%{_mandir}/man{1,8}/*,%{_examplesdir}}
47 cp -p mma.py mma-* $RPM_BUILD_ROOT%{_datadir}/mma
48 cp -a MMA includes lib plugins util $RPM_BUILD_ROOT%{_datadir}/mma
50 ln -sf %{_datadir}/mma/mma.py $RPM_BUILD_ROOT%{_bindir}/mma
51 for n in gb libdoc renum splitrec ; do
52 ln -sf %{_datadir}/mma/mma-$n $RPM_BUILD_ROOT%{_bindir}
55 cp -a egs $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
56 ln -s %{_examplesdir}/%{name}-%{version} $RPM_BUILD_ROOT%{_datadir}/mma/egs
58 cp -a docs/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
59 cp -a docs/man/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
61 rm $RPM_BUILD_ROOT%{_datadir}/mma/util/README.*
63 %py3_comp $RPM_BUILD_ROOT%{_datadir}/mma/MMA
64 %py3_comp $RPM_BUILD_ROOT%{_datadir}/mma/plugins
67 rm -rf $RPM_BUILD_ROOT
70 %{_bindir}/mma -G || :
73 %defattr(644,root,root,755)
74 %doc docs/html/{chords,lib,logo.png,mma.html,plugins,ref,tut,tut-french}
75 %doc text/* util/README.*
76 %attr(755,root,root) %{_bindir}/mma
77 %attr(755,root,root) %{_bindir}/mma-*
79 %attr(755,root,root) %{_datadir}/mma/mma.py
80 %attr(755,root,root) %{_datadir}/mma/mma-*
81 %dir %{_datadir}/mma/util
82 %attr(755,root,root) %{_datadir}/mma/util/*.py
84 %{_datadir}/mma/includes
87 %{_datadir}/mma/plugins
90 %{_examplesdir}/%{name}-%{version}