File Cadence.spec of Package Cadence

Name:           Cadence
%if %{defined fedora}
BuildRequires:  jack-audio-connection-kit-devel
BuildRequires:  PyQt4-devel
BuildRequires:  python3-PyQt4-devel
BuildRequires:  python3-dbus
%else
BuildRequires:  libjack-devel
BuildRequires:  unzip
BuildRequires:  python3-qt4-devel
BuildRequires:  dbus-1-python3-devel
%endif

BuildRequires:  libqt4-devel
BuildRequires:  alsa-devel

%if 0%{?suse_version}
BuildRequires:  update-desktop-files
Requires: a2jmidid
Requires: jack_capture
Requires: ladish
Recommends: zita-a2jbridge
%endif

Url:            http://kxstudio.sourceforge.net/cadence
License:        GPL-2.0+
Group:          Productivity/Multimedia/Sound/Utilities
AutoReqProv:    on
Version:        0.8.1git24072015
Release:        1
Summary:        A JACK Audio Toolbox
Source:         Cadence-master.zip
BuildRoot:      %{_tmppath}/Cadence-master-build

%if 0%{?suse_version}
Requires:  dbus-1-python3, python3-qt4
%endif

%description
 Cadence is a set of tools useful for audio production.
Cadence itself is also an application (the main one), which this page will document.
There are other applications that are part of the Cadence suite, they are usually named as the "Cadence tools".
They are:

    Catarina
    Catia
    Claudia

Some of these also have sub-tools, such as Cadence-JackMeter and Claudia-Launcher.


Authors:
--------
Filipe Coelho <falktx@gmail.com>

%prep
%setup -n Cadence-master

%build
export CXXFLAGS="%{optflags}"
export CFLAGS="%{optflags}"
%if 0%{?suse_version}
sed -i 's:pyuic4:py3uic4:' Makefile
sed -i 's:wildcard /:wildcard $(DESTDIR)/:' Makefile
%endif
make

%install
mkdir -p %buildroot/etc/X11/xinit/xinitrc.d
make install DESTDIR=%buildroot PREFIX="%_prefix"
%if 0%{?suse_version}
 %suse_update_desktop_file -r cadence AudioVideo Music
 %suse_update_desktop_file -r catarina AudioVideo Music
 %suse_update_desktop_file -r catia AudioVideo Music
 %suse_update_desktop_file -r claudia AudioVideo Music
 %suse_update_desktop_file -r claudia-launcher AudioVideo Music
%endif

%clean
rm -rf %buildroot

%files
%defattr(-,root,root)
%doc COPYING TODO INSTALL.md README.md
%{_bindir}/*

%if 0%{?suse_version}
%dir /etc/X11/xinit
%dir /etc/X11/xinit/xinitrc.d
/etc/X11/xinit/xinitrc.d/*
%endif

%if %{defined fedora}
%dir /etc/X11/Xsession.d
/etc/X11/Xsession.d/*
%endif

%dir %{_datadir}/cadence
%{_datadir}/cadence/*
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/

%changelog