2 # - Gstreamer error: "A text/uri-list decoder plugin is required to play this stream, but not installed."
3 # - apply patches to libprojectM.spec and use
4 # - sub-package for kde4 stuff (or nuke them):
5 # /usr/share/kde4/services/clementine-feed.protocol
6 # /usr/share/kde4/services/clementine-itms.protocol
7 # /usr/share/kde4/services/clementine-itpc.protocol
8 # /usr/share/kde4/services/clementine-zune.protocol
11 %bcond_with static_projectm # with static projectM
12 %bcond_with libspotify # build with system libspotify instead of downloading blob
13 %bcond_with tests # build without tests
16 %define qt_installed %(pkg-config --silence-errors --modversion QtCore 2>/dev/null || echo ERROR)
17 %define sqlite_ver 3.14.0-2
18 Summary: A music player and library organiser
19 Summary(hu.UTF-8): Egy zenelejátszó és gyűjtemény-kezelő
20 Summary(pl.UTF-8): Odtwarzacz muzyki i organizator biblioteczki
24 License: GPL v3 and GPL v2+
25 Group: X11/Applications/Multimedia
26 Source0: https://github.com/clementine-player/Clementine/releases/download/%{version}/%{name}-%{version}.tar.xz
27 # Source0-md5: 18cc5f66aa5fbb2781198a65439bd38a
28 Patch0: %{name}-c++.patch
29 Patch1: unbundle-po.patch
30 Patch2: %{name}-udisks-headers.patch
31 Patch3: %{name}-mygpo.patch
33 Patch5: %{name}-protobuf.patch
34 Patch6: %{name}-cryptopp.patch
35 URL: http://www.clementine-player.org/
36 BuildRequires: OpenGL-devel
37 BuildRequires: QtCore-devel >= %{qt_ver}
38 BuildRequires: QtDBus-devel >= %{qt_ver}
39 BuildRequires: QtGui-devel >= %{qt_ver}
40 BuildRequires: QtIOCompressor-devel >= 2.3
41 BuildRequires: QtNetwork-devel >= %{qt_ver}
42 BuildRequires: QtOpenGL-devel >= %{qt_ver}
43 BuildRequires: QtSingleApplication-devel >= 2.6-4
44 BuildRequires: QtSql-devel >= %{qt_ver}
45 %{?with_tests:BuildRequires: QtTest-devel >= %{qt_ver}}
46 BuildRequires: QtXml-devel >= %{qt_ver}
47 BuildRequires: boost-devel
48 BuildRequires: cmake >= 2.6
49 BuildRequires: cryptopp-devel >= 5.6.1-4
50 BuildRequires: desktop-file-utils
51 BuildRequires: fftw3-devel
52 BuildRequires: gettext-tools
53 %{?with_static_projectm:BuildRequires: glew-devel}
54 BuildRequires: glib2-devel >= 2.0
55 BuildRequires: gstreamer-devel >= 1.0
56 BuildRequires: gstreamer-plugins-base-devel >= 1.0
57 BuildRequires: gtest-devel
58 BuildRequires: libcdio-devel
59 BuildRequires: libchromaprint-devel
60 BuildRequires: libechonest-devel
61 BuildRequires: libgpod-devel >= 0.7.92
62 BuildRequires: libimobiledevice-devel >= 1.1.5
63 BuildRequires: liblastfm-devel >= 0.3.3
64 BuildRequires: libmtp-devel >= 1.0
65 #BuildRequires: libmygpo-qt-devel >= 1.0.9
66 BuildRequires: libplist-devel
67 %{!?with_static_projectm:BuildRequires: libprojectM-devel >= 1:2.0.1-4}
68 BuildRequires: libqxt-devel
69 %{?with_libspotify:BuildRequires: libspotify-devel >= 12.1.45}
70 BuildRequires: libusbmuxd-devel
71 BuildRequires: libxml2-devel >= 2.0
72 BuildRequires: pkgconfig
73 BuildRequires: protobuf-devel
74 BuildRequires: pulseaudio-devel
75 BuildRequires: qjson-devel
76 BuildRequires: qt4-build >= %{qt_ver}
77 BuildRequires: qt4-linguist
78 BuildRequires: qt4-qmake
79 BuildRequires: rpmbuild(find_lang) >= 1.38
80 BuildRequires: rpmbuild(macros) >= 1.596
81 BuildRequires: sed >= 4.0
82 BuildRequires: sparsehash-devel
83 BuildRequires: sqlite3-devel >= %{sqlite_ver}
84 BuildRequires: taglib-devel >= 1.8
85 BuildRequires: tar >= 1:1.22
87 Requires(post,postun): desktop-file-utils
88 Requires(post,postun): gtk-update-icon-cache
89 Requires(post,postun): hicolor-icon-theme
90 BuildRequires: sqlite3 >= %{sqlite_ver}
91 Requires: QtSingleApplication >= 2.6-4
92 Requires: QtSql-sqlite3 >= %{qt_installed}
93 Requires: gstreamer-audio-effects-base
94 Suggests: gstreamer-flac
95 Suggests: gstreamer-libav
96 Suggests: gstreamer-mpg123
97 # if we do not link, we use datafiles
98 %{!?with_static_projectm:Requires: libprojectM}
99 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
101 # see libprojectM.spec for explanation
102 %define filterout_ld -Wl,--as-needed -Wl,--no-copy-dt-needed-entries
105 Clementine is a modern music player and library organiser. It is
106 largely a port of Amarok 1.4, with some features rewritten to take
109 %description -l hu.UTF-8
110 Clementine egy modern zenelejátszó és gyűjtemény kezelő. Túlnyomórészt
111 az Amarok 1.4 port-ja, néhány funkciója újraírva, hogy kihasználhassa
114 %description -l pl.UTF-8
115 Clementine to nowoczesny odtwarzacz muzyki i organizator biblioteczki.
116 Jest w dużej części portem Amaroka 1.4 z niektórymi funkcjami
117 przepisanymi tak, aby wykorzystać Qt4.
129 # cleanup vendor. keep only needed libraries.
130 %{__mv} 3rdparty 3rdparty.dist
135 test -d 3rdparty/$dir || mkdir -p 3rdparty/$dir
136 mv 3rdparty.dist/$path 3rdparty/$path
141 %{?with_static_projectm:vendor libprojectm}
144 # requires 1.0.9, but only 1.0.8 is released
147 # Don't build tests. They require gmock
148 %{__sed} -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
150 %{__sed} -i -e 's/-Wall//' src/CMakeLists.txt
153 install -d build/src/translations
155 # as our buildtype is not Release, need to pass these manually. see CMakeLists.txt ~135
156 CXXFLAGS="%{rpmcxxflags} -fpermissive -DNDEBUG -DQT_NO_DEBUG_OUTPUT"
158 -DBUILD_WERROR:BOOL=OFF \
159 -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
160 -DCMAKE_INCLUDE_PATH=%{_includedir}/qt4 \
161 -DBUNDLE_PROJECTM_PRESETS=OFF \
162 -DUSE_SYSTEM_QTSINGLEAPPLICATION=ON \
163 -DUSE_SYSTEM_QXT=ON \
164 -DUSE_SYSTEM_PROJECTM=ON \
165 -DQTSINGLEAPPLICATION_INCLUDE_DIRS=%{_includedir}/qt4/QtSolutions \
169 desktop-file-validate ../dist/%{name}.desktop
175 rm -rf $RPM_BUILD_ROOT
177 %{__make} -C build install \
178 DESTDIR=$RPM_BUILD_ROOT
180 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/kde4/services
183 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{mk_MK,mk}
184 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{si_LK,si}
185 # empty copies of il,tr
186 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/he_IL
187 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/tr_TR
189 %find_lang %{name} --with-qm
191 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps
192 cp -p dist/icons/ubuntu-mono-light/clementine-panel-grey.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel-grey.png
193 cp -p dist/icons/ubuntu-mono-light/clementine-panel.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel.png
196 rm -rf $RPM_BUILD_ROOT
199 %update_desktop_database_post
200 %update_icon_cache hicolor
203 %update_desktop_database_postun
204 %update_icon_cache hicolor
206 %files -f %{name}.lang
207 %defattr(644,root,root,755)
209 %attr(755,root,root) %{_bindir}/clementine
210 %attr(755,root,root) %{_bindir}/clementine-tagreader
211 %{_desktopdir}/clementine.desktop
212 %{_iconsdir}/hicolor/*/apps/clementine-panel-grey.png
213 %{_iconsdir}/hicolor/*/apps/clementine-panel.png
214 %{_iconsdir}/hicolor/*/apps/clementine.png
215 %{_iconsdir}/hicolor/*/apps/clementine.svg
216 %{_datadir}/appdata/clementine.appdata.xml