File olpcsound.spec of Package olpcsound
# NOTE: Do not edit, file was generated by jhconvert
%define libname lib%{name}
%define pyname python-%{name}
Name: olpcsound
Version: 5.10.90
%if 0%{?suse_version}
Release: 2
%else
Release: 1%{?dist}
%endif
Summary: Csound - sound synthesis language and library, OLPC subset
License: LGPLv2+
Group: Sound
Url: http://csound.sourceforge.net/
Source: http://downloads.sourceforge.net/csound/Csound5.10.90.tar.gz
Patch: sugar-csound-64bit.patch
Patch1: sugar-csound-bad-symbols.patch
Patch2: sugar-csound-python-version.patch
Patch3: sugar-csound-overflow.patch
Patch4: csound-2817271.patch
Patch5: csound-2837495.patch
BuildRequires: alsa-devel
BuildRequires: gcc-c++
BuildRequires: gettext
BuildRequires: liblo-devel
BuildRequires: libogg-devel
BuildRequires: libpng-devel
BuildRequires: libsndfile-devel
BuildRequires: libvorbis-devel
BuildRequires: python-devel
BuildRequires: scons
BuildRequires: swig
BuildRequires: fdupes
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
Olpcsound is a subset of the Csound sound and music synthesis system,
tailored specifically for XO platform.
%package -n %{libname}
Summary: Libraries for %{name}
Group: System/Libraries
%description -n %{libname}
Olpcsound is a subset of the Csound sound and music synthesis system,
tailored specifically for XO platform.
%package doc
Summary: Documentation files for %{name}
Group: Development/C
Requires: %{libname} = %{version}-%{release}
%description doc
Olpcsound is a subset of the Csound sound and music synthesis system,
tailored specifically for XO platform.
%package devel
Summary: Development files for %{name}
Group: Development/C
Requires: %{libname} = %{version}-%{release}
%description devel
Olpcsound is a subset of the Csound sound and music synthesis system,
tailored specifically for XO platform.
%package -n %{pyname}
Summary: Python bindings for %{name}
Group: Development/Python
Requires: %{libname} = %{version}-%{release}
Requires: python
%description -n %{pyname}
Olpcsound is a subset of the Csound sound and music synthesis system,
tailored specifically for XO platform.
%prep
%setup -q -n Csound5.10.90
%patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
%define Werror_cflags %nil
_64=$(arch | grep x86_64 >/dev/null && echo 1 || echo 0); scons buildOLPC=1 useJack=0 gcc3opt=0 gcc4opt=0 Word64=$_64 Lib64=$_64 customCCFLAGS="%{optflags}" customCXXFLAGS="%{optflags}"
%install
python install-olpc.py --install-python --install-headers --instdir=%{buildroot} --libdir=%{_libdir}
%fdupes -s %{buildroot}
%find_lang csound5
%post -n %{libname}
/sbin/ldconfig
%postun -n %{libname}
/sbin/ldconfig
%post devel
/sbin/ldconfig
%postun devel
/sbin/ldconfig
%clean
rm -rf %{buildroot}
%files -f csound5.lang
%defattr(-,root,root,-)
%{_bindir}/*
%{_datadir}/doc/*
%exclude %{_datadir}/doc
%files -n %{libname}
%defattr(-,root,root,-)
%{_libdir}/*.so.*
%{_libdir}/csound
%files doc
%defattr(-,root,root,-)
%{_datadir}/doc/csound
%files devel
%defattr(-,root,root,-)
%{_includedir}/csound
%{_libdir}/*.so
%files -n %{pyname}
%defattr(-,root,root,-)
%{_prefix}/lib*/python*/site-packages/*
%changelog