SHA256
1
0
forked from pool/qmmp
qmmp/qmmp.spec

209 lines
6.0 KiB
RPMSpec
Raw Normal View History

#
# spec file for package qmmp
#
# Copyright (c) 2015 SUSE LINUX 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/
#
%define sover 1
%bcond_with ffmpeg
%bcond_with mad
%bcond_with faad
Name: qmmp
Version: 1.0.0
Release: 0
Summary: XMMS-like audio player
License: GPL-2.0+
Group: Productivity/Multimedia/Sound/Players
Url: http://qmmp.ylsoftware.com/
Source: http://qmmp.ylsoftware.com/files/qmmp-%{version}.tar.bz2
Source1: baselibs.conf
# PATCH-FIX-UPSTREAM qmmp-fix_cdda_version.patch pascal.bleser@opensuse.org -- Fix header detection for cdparanoia cdda.h.
Patch0: qmmp-fix_cdda_version.patch
# PATCH-FEATURE-OPENSUSE qmmp-default_pulse.patch reddwarf@opensuse.org -- Use PulseAudio instead of ALSA by default.
Patch1: qmmp-default-pulse.patch
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: libmpcdec-devel
BuildRequires: libqt5-qttools-devel >= 5.4
BuildRequires: pkgconfig(Qt5Core) >= 5.4
BuildRequires: pkgconfig(Qt5DBus) >= 5.4
BuildRequires: pkgconfig(Qt5Network) >= 5.4
BuildRequires: pkgconfig(Qt5OpenGL) >= 5.4
BuildRequires: pkgconfig(Qt5Widgets) >= 5.4
BuildRequires: pkgconfig(Qt5X11Extras) >= 5.4
BuildRequires: pkgconfig(Qt5Xml) >= 5.4
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(enca) >= 1.9
BuildRequires: pkgconfig(flac)
BuildRequires: pkgconfig(jack)
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavutil)
BuildRequires: pkgconfig(libbs2b)
BuildRequires: pkgconfig(libcddb)
BuildRequires: pkgconfig(libcdio)
BuildRequires: pkgconfig(libcdio_cdda)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libgme)
BuildRequires: pkgconfig(libmms)
BuildRequires: pkgconfig(libmodplug)
BuildRequires: pkgconfig(libprojectM)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(libpulse-simple)
BuildRequires: pkgconfig(libsidplayfp)
BuildRequires: pkgconfig(opus) >= 1.0.2
BuildRequires: pkgconfig(opusfile) >= 0.2
BuildRequires: pkgconfig(samplerate)
BuildRequires: pkgconfig(sndfile)
BuildRequires: pkgconfig(taglib)
BuildRequires: pkgconfig(vorbisfile)
BuildRequires: pkgconfig(wavpack)
Requires: qmmp(%{sover})(Input)
Requires: qmmp(%{sover})(Output)
Requires: qmmp(%{sover})(Ui)
%if %{with mad}
BuildRequires: pkgconfig(mad)
%endif
%if %{with faad}
BuildRequires: libfaad-devel
%endif
%description
This program is an audio-player, written with help of Qt library. The program
has user interface, similar winamp or xmms.
%package -n libqmmp%{sover}
Summary: Qmmp library
Group: System/Libraries
Recommends: libqmmp-plugins
%description -n libqmmp%{sover}
Qmmp library.
%package -n libqmmp-plugins
Summary: Plugins for libqmmp
Group: System/Libraries
# Suggests instead of Recommends since MPlayer is a too big dependency.
Suggests: libqmmp-plugin-mplayer
# libqmmp0-plugins & qmmp-plugin-pack-simple-ui were last used in openSUSE 13.2 (in PMBS).
Obsoletes: libqmmp0-plugins
Obsoletes: qmmp-plugin-pack-simple-ui < {version}
Provides: qmmp-plugin-pack-simple-ui = %{version}
Provides: qmmp(%{sover})(Input)
Provides: qmmp(%{sover})(Output)
Provides: qmmp(%{sover})(Ui)
%description -n libqmmp-plugins
Plugins for libqmmp.
%package -n libqmmp-plugin-mplayer
Summary: MPlayer plugin for libqmmp
Group: System/Libraries
Requires: %{_bindir}/mplayer
%description -n libqmmp-plugin-mplayer
MPlayer plugin for libqmmp.
%package -n libqmmp-devel
Summary: Development files for libqmmp
Group: Development/Libraries/C and C++
Requires: libqmmp%{sover} = %{version}
%description -n libqmmp-devel
Development files for libqmmp.
%prep
%setup -q
%patch0
%patch1 -p1
%build
mkdir build
pushd build
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
-DLIB_DIR=%{_lib} \
-DUSE_HAL=FALSE \
-DUSE_OSS=FALSE \
-DUSE_OSS4=FALSE \
..
make %{?_smp_mflags}
popd
%install
%make_install -C build
%post
%icon_theme_cache_post
%desktop_database_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%post -n libqmmp%{sover} -p /sbin/ldconfig
%postun -n libqmmp%{sover} -p /sbin/ldconfig
%post -n libqmmp-plugins
%desktop_database_post
%postun -n libqmmp-plugins
%desktop_database_postun
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING README
%{_bindir}/qmmp
%{_datadir}/qmmp/
%{_datadir}/applications/qmmp.desktop
%{_datadir}/applications/qmmp_enqueue.desktop
%{_datadir}/applications/qmmp_dir.desktop
%{_datadir}/icons/hicolor/*/apps/qmmp*
%files -n libqmmp%{sover}
%defattr(-,root,root)
%{_libdir}/libqmmp.so.%{sover}*
%{_libdir}/libqmmpui.so.%{sover}*
%files -n libqmmp-plugins
%defattr(-,root,root)
%{_libdir}/qmmp/
%exclude %{_libdir}/qmmp/Engines/libmplayer.so
%files -n libqmmp-plugin-mplayer
%defattr(-,root,root)
%dir %{_libdir}/qmmp/
%dir %{_libdir}/qmmp/Engines/
%{_libdir}/qmmp/Engines/libmplayer.so
%files -n libqmmp-devel
%defattr(-,root,root)
%{_includedir}/qmmp/
%{_includedir}/qmmpui/
%{_libdir}/libqmmp.so
%{_libdir}/libqmmpui.so
%{_libdir}/pkgconfig/qmmp.pc
%{_libdir}/pkgconfig/qmmpui.pc
%changelog