File qjackctl.spec of Package qjackctl

#
# spec file for package qjackctl
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
#
# 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:           qjackctl
Version:        0.4.0
Release:        0
Summary:        Graphical User Interface to Control JACK Servers
License:        GPL-2.0+
Group:          Productivity/Multimedia/Sound/Utilities
Url:            http://qjackctl.sf.net
Source:         http://prdownloads.sourceforge.net/qjackctl/qjackctl-%{version}.tar.gz
Patch1:         qjackctl-remove_build_timestamps.patch
Patch2:         qjackctl-remove_absolute_path_from_exec_in_desktop-file.patch
BuildRequires:  alsa-devel
BuildRequires:  hicolor-icon-theme
BuildRequires:  libjack-devel
BuildRequires:  libqt4-devel
BuildRequires:  portaudio-devel
BuildRequires:  update-desktop-files
Requires:       jack
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
JACK Audio Connection Kit - Qt GUI Interface: A simple Qt application
to control the JACK server. Written in C++ around the Qt4 toolkit
for X11, most exclusively using Qt Designer. Provides a simple GUI
dialog for setting several JACK server parameters, which are properly
saved between sessions, and a way control of the status of the audio
server. With time, this primordial interface has become richer by
including a enhanced patchbay and connection control features.

%lang_package

%prep
%setup -q
%patch1
%patch2

# fix up desktop file
sed -i -e'/^X-SuSE-translate/d' src/qjackctl.desktop.in

find . -type f -name '*.pro' | while read pro; do
    echo 'QMAKE_CXXFLAGS="%{optflags}"' >> "$pro"
done

%build
[ -f Makefile.svn ] && make -f Makefile.svn
%configure
%__make %{?_smp_mflags}

%install
%make_install
%suse_update_desktop_file -r qjackctl Music AudioVideo

L="$PWD/%{name}.lang"; echo -n >"$L"
B="%{_datadir}/qjackctl/translations"
pushd "%{buildroot}${B}"
/bin/ls *.qm | while read qm; do
    l="${qm##*_}"
    l="${l%.qm}"
    echo "%lang($l) ${B}/${qm}" >>"$L"
done
popd

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog README TODO
%{_bindir}/qjackctl
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/appdata/
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/icons/*/*/apps/%{name}.*
%doc %{_mandir}/man1/qjackctl.1*

%files lang -f %{name}.lang
%defattr(-,root,root)
%dir %{_datadir}/qjackctl
%dir %{_datadir}/qjackctl/translations

%changelog
openSUSE Build Service is sponsored by