qmmp/qmmp.spec

170 lines
4.8 KiB
RPMSpec
Raw Normal View History

#
# spec file for package qmmp
#
# Copyright (c) 2012 SUSE LINUX Products 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/
#
%bcond_with ffmpeg
%bcond_with mad
%bcond_with faad
%define soname 0
Name: qmmp
Version: 0.5.4
Release: 0
Summary: XMMS-like audio player
License: GPL-2.0+
Group: Productivity/Multimedia/Sound/Players
Url: http://%{name}.ylsoftware.com/
Source0: http://%{name}.googlecode.com/files/%{name}-%{version}.tar.bz2
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: libmpcdec-devel
BuildRequires: pkgconfig(QtCore)
BuildRequires: pkgconfig(QtDBus)
BuildRequires: pkgconfig(QtGui)
BuildRequires: pkgconfig(QtNetwork)
BuildRequires: pkgconfig(QtOpenGL)
BuildRequires: pkgconfig(QtXml)
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(enca) >= 1.9
BuildRequires: pkgconfig(flac)
# Standard Jack version is not new enough until openSUSE 12.1
%if 0%{?suse_version} > 1140
BuildRequires: pkgconfig(jack)
%endif
BuildRequires: update-desktop-files
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(samplerate)
BuildRequires: pkgconfig(sndfile)
BuildRequires: pkgconfig(taglib)
BuildRequires: pkgconfig(vorbisfile)
BuildRequires: pkgconfig(wavpack)
%if %{with ffmpeg}
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavutil)
%endif
%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 lib%{name}%{soname}
Summary: Qmmp library
Group: System/Libraries
Recommends: lib%{name}%{soname}-plugin-mplayer
Recommends: lib%{name}%{soname}-plugins
%description -n lib%{name}%{soname}
Qmmp library.
%package -n lib%{name}%{soname}-plugins
Summary: Plugins for lib%{name}
Group: System/Libraries
%description -n lib%{name}%{soname}-plugins
Plugins for lib%{name}.
%package -n lib%{name}%{soname}-plugin-mplayer
Summary: MPlayer plugin for lib%{name}
Group: System/Libraries
Requires: %{_bindir}/mplayer
%description -n lib%{name}%{soname}-plugin-mplayer
MPlayer plugin for lib%{name}.
%package -n lib%{name}-devel
Summary: Development files for lib%{name}
Group: Development/Libraries/C and C++
Requires: lib%{name}%{soname} = %{version}
%description -n lib%{name}-devel
Development files for lib%{name}.
%prep
%setup -q
%build
mkdir build
cd build
export CFLAGS='%{optflags}'
export CXXFLAGS='%{optflags}'
cmake -DCMAKE_SKIP_RPATH=ON -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DLIB_DIR=%{_lib} -DCMAKE_BUILD_TYPE=Release ..
make %{?_smp_mflags} VERBOSE=1
%install
cd build
%make_install
%suse_update_desktop_file %{name}
%suse_update_desktop_file %{name}_enqueue
%suse_update_desktop_file %{name}_cue
%post -n lib%{name}%{soname} -p /sbin/ldconfig
%postun -n lib%{name}%{soname} -p /sbin/ldconfig
%files
%defattr(0644,root,root,0755)
%doc AUTHORS ChangeLog COPYING README
%attr(0755,root,root) %{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/applications/%{name}_enqueue.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}*
%files -n lib%{name}%{soname}
%defattr(0644,root,root,0755)
%{_libdir}/lib%{name}.so.%{soname}*
%{_libdir}/lib%{name}ui.so.%{soname}*
%files -n lib%{name}%{soname}-plugins
%defattr(0644,root,root,0755)
%{_libdir}/%{name}
%exclude %{_libdir}/%{name}/Engines/libmplayer.so
%{_datadir}/applications/%{name}_cue.desktop
%files -n lib%{name}%{soname}-plugin-mplayer
%defattr(0644,root,root,0755)
%{_libdir}/%{name}/Engines/libmplayer.so
%files -n lib%{name}-devel
%defattr(0644,root,root,0755)
%{_includedir}/%{name}
%{_includedir}/%{name}ui
%{_libdir}/lib%{name}.so
%{_libdir}/lib%{name}ui.so
%changelog