A new user interface for you! Read more...

File sonic-pi.spec of Package sonic-pi

#
# spec file for package sonic-pi
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           sonic-pi
Version:        2.9.0
Release:        0
Summary:        The Live Coding Synth for Everyone
License:        MIT
Group:          Productivity/Multimedia/Sound
Url:            https://github.com/samaaron/sonic-pi
Source:         sonic-pi.tar.gz
Source2:        sonic-pi.png
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  libffi-devel
BuildRequires:  qscintilla-devel
BuildRequires:  ruby-devel
Requires:       jack
Requires:       lua
Requires:       ruby
Requires:       supercollider
#BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Sonic Pi is a new kind of musical instrument. Instead of strumming strings or whacking things with sticks - you write code - live.

%prep
%setup -q -n samaaron-sonic-pi-33a06de
perl -i -pe 's{/usr/local/bin/lua}{/usr/bin/lua}' app/server/vendor/rouge/spec/lexers/lua_spec.rb app/server/vendor/rouge/spec/visual/samples/lua
perl -i -pe 's{/bin/octave}{/usr/bin/octave}' app/server/vendor/narray-0.6.1.1/bench/bench.m
rm -rf app/server/native/*

%build
cd app/server/bin
./compile-extensions.rb
cd ../../gui/qt/
./rp-build-app

%install

# remove unneeded tests
rm -rf app/server/vendor/rugged*/vendor/libgit2/tests  app/server/vendor/*/test app/server/vendor/i18n/lib/i18n/tests app/server/vendor/ffi-1.9.10/ext/ffi_c/libffi/testsuite app/server/sonicpi/test app/gui/html/vendor/codemirror/test app/server/vendor/rouge/spec/visual/samples
mkdir -p %{buildroot}/opt/
cp -a `pwd` %{buildroot}/opt/%{name}
find %{buildroot}/opt/%{name} -type f -name \*.[ch] | xargs rm -f
find %{buildroot}/opt/%{name} -type f -name \*.cpp | xargs rm -f
find %{buildroot}/opt/%{name} -type f -name \*.pc | xargs rm -f
find %{buildroot}/opt/%{name} -type f -name \*.a | xargs rm -f
pkgdir=%{buildroot}
pkgname=%{name}
pkgver=%{version}
# from https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=sonic-pi
_progname="Sonic Pi"
pkgdesc="A music-centric programming environment, originally built for the raspberry pi."
	install -d -m 755 "${pkgdir}/usr/bin/"
	printf "#!/bin/sh
echo \"Remember to start jackd (using qjackctl or some other program) before launching!\"
/opt/${pkgname}/app/gui/qt/${pkgname}
" >> "${pkgdir}/usr/bin/${pkgname}"
	chmod +x "${pkgdir}/usr/bin/${pkgname}"
    install -D -m644 "%{SOURCE2}" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
	install -d -m 755 "${pkgdir}/usr/share/applications/"
	printf "[Desktop Entry]
Version=${pkgver}
Type=Application
Name=${_progname}
GenericName=Musicscripting
Comment=${pkgdesc}
Exec=${pkgname}
Icon=${pkgname}
Categories=Education;Music;
Terminal=false
StartupNotify=true
" > "${pkgdir}/usr/share/applications/${pkgname}.desktop"
%fdupes -s %{buildroot}

%files
%defattr(-,root,root)
%{_bindir}/%{name}
/usr/share/applications/%{name}.desktop
/usr/share/pixmaps/%{name}.png
/opt/%{name}
%doc LICENSE.md README.md CHANGELOG.md FAQ.md app/gui/qt/info/LICENSE.html

%changelog