# Tarfile created using git # git clone git://git.sugarlabs.org/tamtam-branch/mainline.git sugar-tamtam # cd sugar-tamtam # git archive --format=tar --prefix=%{name}-%{version}/ %{gitversion} | bzip2 > ~/%{name}-%{version}-%{gitdate}.tar.bz2 %global gitdate 20100201 %global gitversion 5596d7d %global tarfile %{name}-%{version}-%{gitdate}.tar.bz2 %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif Name: sugar-tamtam Version: 0 Release: 0.2.%{gitdate}git%{?dist} Summary: A suite of four music and sound related activities Group: Sugar/Activities # the activities and sugar-port are licensed as GPLv2+ # other common files are licensed as GPLv3+ License: GPLv2+ and GPLv3+ URL: http://wiki.sugarlabs.org/go/Activities/Tam_Tam Source0: %{tarfile} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: alsa-lib-devel BuildRequires: csound-devel BuildRequires: python-devel BuildRequires: sugar-toolkit BuildRequires: gettext Requires: sugar %description The TamTam activity suite for the Sugar learning environment provides a number of music and sound related activities. %package common Summary: Common files for the TamTam activity suite License: GPLv2+ and GPLv3+ Requires: %{name} = %{version}-%{release} %description common Common files for a suite of four music and sound related activities, written in Python. The audio engine for TamTam is Csound. %package edit Summary: A page driven event sequencer License: GPLv2+ BuildArch: noarch Requires: %{name}-common = %{version}-%{release} %description edit A powerful music generator, a colorful and intuitive graphical interface to create, modify and organize notes on five virtual "tracks", a palette of close to a hundred sounds and a music construction model that allows virtually limitless variations in all musical styles. %package jam Summary: A music performance activity License: GPLv2+ BuildArch: noarch Requires: %{name}-common = %{version}-%{release} %description jam Sounds are played by striking individual keys on the keyboard. It is aimed at younger children. One chooses amongst dozens of different sounds that can be played poly-phonically. There is a small "beat-box" to generate rhythms and a simple sequencer to record short snippets of keyboard playing. %package mini Summary: An introductory program to engage children in exploring music License: GPLv2+ BuildArch: noarch Requires: %{name}-common = %{version}-%{release} %description mini Click on an instrument and then use the keyboard to play notes. Use the Q-I keys (on US English keyboard, at least) to play an octave. Lines above and below play sharps and flats. There is also a drum machine that can run in the background. %package synthlab Summary: An advanced application to venture into sound design License: GPLv2+ BuildArch: noarch Requires: %{name}-common = %{version}-%{release} %description synthlab SynthLab is a physics lab and sound synthesizer modeled on Max/MSP. %prep %setup -q # fix to create proper debuginfo sed -i -e 's/-Dsm/-Dm/g' Makefile # put blob in correct sitearch directory sed -i -e 's/sysconfig.get_python_lib()/sysconfig.get_python_lib(1)/g' Makefile # make sure to grab blob from the right location sed '13,16d' -i common/Util/Clooper/Makefile # change to look in sitearch sed -i -e 's/common.Util.Clooper/tamtam.aclient/g' common/Util/CSoundClient.py # remove backup files rm -f common/Resources/Sounds/*.orig %build make %{?_smp_mflags} V=1 -C common/Util/Clooper for activity in TamTamEdit TamTamJam TamTamMini TamTamSynthLab; do cd $activity.activity # we want to use a single common package sed '23,25d' -i setup.py sed '29,35d' -i setup.py python setup.py build cd .. done %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT # copy common files to an appropriate location # don't copy binary blobs twice for file in common/Generation common/port common/Util/*.py common/*.py; do cp -pr $file $RPM_BUILD_ROOT/%{_datadir}/tamtam/ done for activity in TamTamEdit TamTamJam TamTamMini TamTamSynthLab; do cd $activity.activity python ./setup.py install --prefix=$RPM_BUILD_ROOT/%{_prefix} ln -fs %{_datadir}/tamtam $RPM_BUILD_ROOT/%{sugaractivitydir}/$activity.activity/common cd .. %find_lang org.laptop.$activity done %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %files common %defattr(-,root,root,-) %doc common/COPYING.txt common/port/COPYING %{_datadir}/tamtam %{python_sitearch}/tamtam %files edit -f org.laptop.TamTamEdit.lang %defattr(-,root,root,-) %doc TamTamEdit.activity/NEWS %{sugaractivitydir}/TamTamEdit.activity/ %files jam -f org.laptop.TamTamJam.lang %defattr(-,root,root,-) %doc TamTamJam.activity/NEWS %{sugaractivitydir}/TamTamJam.activity/ %files mini -f org.laptop.TamTamMini.lang %defattr(-,root,root,-) %doc TamTamMini.activity/NEWS %{sugaractivitydir}/TamTamMini.activity/ %files synthlab -f org.laptop.TamTamSynthLab.lang %defattr(-,root,root,-) %doc TamTamSynthLab.activity/NEWS %{sugaractivitydir}/TamTamSynthLab.activity/ %changelog * Sat Feb 27 2010 Sebastian Dziallas - 0-0.2.20100201git - fix issues following hints from the review * Fri Feb 12 2010 Sebastian Dziallas - 0-0.1.20100201git - initial packaging