Blob Blame History Raw
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

Name:		zynjacku
Version:	6
Release:	1%{?dist}
Summary:	LV2 synths and plugins host
Group:		Applications/Multimedia
License:	GPLv2
URL:		http://home.gna.org/zynjacku/	
Source0:	http://download.gna.org/zynjacku/%{name}-%{version}.tar.bz2
# Derived from the art/logo/logo.png from the tarball
Source1:	%{name}.png
Source2:	%{name}.desktop
Source3:	lv2rack.desktop
# Correct lv2 path on 64bit systems:
# https://gna.org/bugs/?13687
Patch0:		%{name}-lv2path.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	gtk2-devel
BuildRequires:	desktop-file-utils
BuildRequires:	jack-audio-connection-kit-devel
BuildRequires:	lv2core-devel
BuildRequires:	lv2dynparam-devel
BuildRequires:	pygtk2-devel

Requires:	pygtk2-libglade
Requires:	python-lash

Provides:	lv2rack = %{version}-%{release}

# we don't want to provide private python extension libs
%{?filter_setup:
%filter_provides_in %{python_sitearch}/.*\.so$ 
%filter_setup
}

%description
zynjacku is JACK based, GTK (2.x) host for LV2 synths. It has one JACK MIDI
input port (routed to all hosted synths) and one (two for stereo synths) JACK
audio output port per plugin. Such design provides multi-timbral sound by 
running several synth plugins.

zynjacku is a nunchaku weapon for JACK audio synthesis. You have solid parts
for synthesis itself and you have flexible part that allows synthesis to suit
your needs.

lv2rack is a host for LV2 effect plugins. 

%prep
%setup -q
%patch0 -p1 -b .lv2path

# Remove redundant shebang
sed -i '\|/usr/bin/env|d' zynworld/host.py

%build
export am_cv_python_pythondir=%{python_sitearch}
%configure --disable-static
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

# Fix weird permissions
chmod -x $RPM_BUILD_ROOT%{python_sitearch}/zynworld/*.py

# We don't need duplicate files
ln -sf ../doc/%{name}-%{version}/gpl.txt $RPM_BUILD_ROOT/%{_datadir}/%{name}/

# Kill .la files
rm -f $RPM_BUILD_ROOT%{python_sitearch}/zynworld/*.la

# Icon
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/72x72/apps/
cp -a %{SOURCE1} $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/72x72/apps/

# .desktop files
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications/
desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications/ %{SOURCE2}
desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications/ %{SOURCE3}


%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
	touch --no-create %{_datadir}/icons/hicolor &>/dev/null
	gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc AUTHORS gpl.txt NEWS README
%{_bindir}/*
%{python_sitearch}/zynworld
%{_datadir}/%{name}/
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/72x72/apps/%{name}.png

%changelog
* Sat Apr 30 2011 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 6-1
- Update to 6
- Drop upstreamed patch

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 5-5
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Fri Jan 22 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 5-4
- Don't crash when there are no plugins installed RHBZ#551480

* Wed Aug 05 2009 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 5-3
- Update the .desktop file

* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Sun Jun 13 2009 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 5-1
- Update to 5

* Fri Apr 10 2009 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 4-2
- License is GPLv2
- Clean up unnecessary bits from SPEC file

* Mon Mar 30 2009 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 4-1
- Initial build