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

File mixxx.spec of Package mixxx

# vim: set sw=4 ts=4 et:
#
# spec file for package mixxx
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2010-2012 Pascal Bleser <pascal.bleser@opensuse.org>
# Copyright (c) 2005-2010 oc2pus
#
# 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:           mixxx
Summary:        Open Source DJ tool
Version:        2.2.0
Release:        0
License:        GPL-2.0+
Group:          Productivity/Multimedia/Sound/Players
URL:            https://mixxx.org
Source0:        https://github.com/mixxxdj/mixxx/archive/release-%{version}.tar.gz
Source99:       mixxx-rpmlintrc
Patch0:         mixxx.soundtouch.patch
# PATCH-FIX-OPENSUSE mixxx-vamp.patch -- set correct vamp pkg-config file
Patch1:         mixxx-vamp.patch
ExclusiveArch:  %ix86 x86_64
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  pkg-config
BuildRequires:  scons
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(soundtouch)
BuildRequires:  libebur128-devel
BuildRequires:  pkgconfig(portaudio-2.0)
BuildRequires:  portmidi-devel

BuildRequires:  libqt5-linguist
BuildRequires:  cmake(Qt5Keychain)
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5OpenGL)
BuildRequires:  pkgconfig(Qt5Script)
BuildRequires:  pkgconfig(Qt5ScriptTools)
BuildRequires:  pkgconfig(Qt5Sql)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5Test)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5Xml)
BuildRequires:  pkgconfig(Qt5X11Extras)

BuildRequires:  pkgconfig(libavcodec) >= 57.107.100
BuildRequires:  pkgconfig(libavformat) >= 57.83.100
BuildRequires:  pkgconfig(libavutil) >= 55.78.100
BuildRequires:  pkgconfig(sndfile)
BuildRequires:  pkgconfig(flac)
BuildRequires:  pkgconfig(vorbis)
BuildRequires:  pkgconfig(vorbisenc)
BuildRequires:  pkgconfig(vorbisfile)
BuildRequires:  pkgconfig(ogg)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(freeglut)
BuildRequires:  pkgconfig(taglib)
BuildRequires:  pkgconfig(protobuf)
BuildRequires:  pkgconfig(libchromaprint)
BuildRequires:  pkgconfig(rubberband)
BuildRequires:  pkgconfig(mad)
BuildRequires:  pkgconfig(id3tag)
%if 0%{?is_opensuse}
BuildRequires:  pkgconfig(hidapi-libusb)
%endif
BuildRequires:  pkgconfig(libusb-1.0)
BuildRequires:  pkgconfig(shout)
BuildRequires:  pkgconfig(opus)
BuildRequires:  pkgconfig(opusfile)
BuildRequires:  pkgconfig(wavpack)
BuildRequires:  pkgconfig(libmodplug)
BuildRequires:  pkgconfig(vamp-sdk)
BuildRequires:  pkgconfig(fftw3)
BuildRequires:  pkgconfig(upower-glib)
BuildRequires:  gperftools-devel

BuildRequires:  update-desktop-files
BuildRequires:  fdupes
BuildRequires:  alsa-devel
BuildRequires:  liblilv-0-devel

Obsoletes:      %{name}-skin-hercules
Obsoletes:      %{name}-skin-outlineClose
Obsoletes:      %{name}-skin-outline
Obsoletes:      %{name}-skin-outlineMini
Obsoletes:      %{name}-skin-outlineNetbook
Obsoletes:      %{name}-skin-nCut
Obsoletes:      %{name}-skin-Collusion
Obsoletes:      %{name}-skin-traditional
Recommends:     libmp3lame0
Recommends:     vamp-qm-plugins
#BuildRequires:  libqt4-sql-sqlite
#Requires:       libqt4-sql-sqlite
Provides:       mixxx = %{version}-%{release}
Conflicts:      mixxx

%description
Mixxx is an free and open-source audio mixing program.
Mixxx is cross-platform and supports most common music file formats.
It can be controlled with MIDI and HID controllers and timecode vinyl
records in addition to computer keyboards and mice.

%prep
%autosetup -p1 -n %{name}-release-%{version}
sed -i "s/#!\/usr\/bin\/env node/#!\/usr\/bin\/node/" res/controllers/novation-launchpad/scripts/compile-*.js
rm res/controllers/novation-launchpad/.gitignore

%build
pushd lib
rm -rf *ebur128*
if pkg-config --exists soundtouch >= 1.8.0
then
rm -rf *soundtouch*
fi
rm -rf *vamp*
if pkg-config --exists hidapi-libusb
then
rm -rf *hidapi*
fi
popd

for ui in $(find -name \*.ui) ; do
  echo "$ui"
  dir="$(dirname $ui)"
  file="$(basename $ui)"
  outfile="ui_${file//\.ui/\.h}"
  pushd $dir 2> /dev/null
    echo $file
    uic-qt5 -o $outfile $file
  popd 2> /dev/null
done
# regenerate protobuf code with the current version
# of protobuf (not doing so fails the build):
pushd src/proto
protoc beats.proto --cpp_out=.
popd #src/proto

env \
LIBDIR='%{_libexecdir}' \
scons %{?_smp_mflags} \
    prefix="%{_prefix}" \
    vinylcontrol=1 \
    qt5=1 \
    ffmpeg=1 \
    flac=1 \
    mad=1 \
    modplug=1 \
    opus=1 \
    sndfile=1 \
    faad=0 \
    shoutcast=1 \
    ipod=0 \
    hid=1 \
    bulk=1 \
    vamp=1 \
    wv=1 \
    asmlib=1 \
    qdebug=1 \
    verbose=1 \
    buildtime=0 \
    localecompare=0 \
    qt_sqlite_plugin=1 \
    qtkeychain=1 \
    perftools=1

%install
scons \
    prefix="%{_prefix}" \
    install_root="%{buildroot}%{_prefix}" \
    qt5=1 \
    install

rm -rfv '%{buildroot}%{_datadir}/doc/mixxx'

%suse_update_desktop_file -r mixxx AudioVideo Player Jukebox

L="$PWD/%{name}.lang"
echo -n > "$L"
pushd "%{buildroot}%{_datadir}/mixxx/translations"
/bin/ls -1 mixxx_*.qm | while read f; do
    [ -e "$f" ] || continue
    l="${f#mixxx_}"
    l="${l%.qm}"
    echo "%lang($l) %{_datadir}/mixxx/translations/$f" >> "$L"
done
popd

# hardlinks are required to speedup build
%fdupes "%{buildroot}%{_datadir}/mixxx/skins"

%files -f %{name}.lang
%defattr(-,root,root)
%doc COPYING LICENSE Mixxx-Manual.pdf README*
%{_bindir}/mixxx
%{_libexecdir}/mixxx
%dir %{_datadir}/mixxx
%dir %{_datadir}/mixxx/translations
%{_datadir}/mixxx/controllers
%{_datadir}/mixxx/fonts
%{_datadir}/mixxx/keyboard
%{_datadir}/mixxx/skins
%{_datadir}/applications/mixxx.desktop
%{_datadir}/pixmaps/mixxx_icon.svg
%dir %{_datadir}/appdata
%{_datadir}/appdata/mixxx.appdata.xml

%changelog