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 URL: http://www.clementine-player.org/
34 BuildRequires: OpenGL-devel
35 BuildRequires: QtCore-devel >= %{qt_ver}
36 BuildRequires: QtDBus-devel >= %{qt_ver}
37 BuildRequires: QtGui-devel >= %{qt_ver}
38 BuildRequires: QtIOCompressor-devel >= 2.3
39 BuildRequires: QtNetwork-devel >= %{qt_ver}
40 BuildRequires: QtOpenGL-devel >= %{qt_ver}
41 BuildRequires: QtSingleApplication-devel >= 2.6-4
42 BuildRequires: QtSql-devel >= %{qt_ver}
43 %{?with_tests:BuildRequires: QtTest-devel >= %{qt_ver}}
44 BuildRequires: QtXml-devel >= %{qt_ver}
45 BuildRequires: boost-devel
46 BuildRequires: cmake >= 2.6
47 BuildRequires: cryptopp-devel >= 5.6.1-4
48 BuildRequires: desktop-file-utils
49 BuildRequires: fftw3-devel
50 BuildRequires: gettext-tools
51 %{?with_static_projectm:BuildRequires: glew-devel}
52 BuildRequires: glib2-devel >= 2.0
53 BuildRequires: gstreamer-devel >= 1.0
54 BuildRequires: gstreamer-plugins-base-devel >= 1.0
55 BuildRequires: gtest-devel
56 BuildRequires: libcdio-devel
57 BuildRequires: libchromaprint-devel
58 BuildRequires: libechonest-devel
59 BuildRequires: libgpod-devel >= 0.7.92
60 BuildRequires: libimobiledevice-devel >= 1.1.5
61 BuildRequires: liblastfm-devel >= 0.3.3
62 BuildRequires: libmtp-devel >= 1.0
63 #BuildRequires: libmygpo-qt-devel >= 1.0.9
64 BuildRequires: libplist-devel
65 %{!?with_static_projectm:BuildRequires: libprojectM-devel >= 1:2.0.1-4}
66 BuildRequires: libqxt-devel
67 %{?with_libspotify:BuildRequires: libspotify-devel >= 12.1.45}
68 BuildRequires: libusbmuxd-devel
69 BuildRequires: libxml2-devel >= 2.0
70 BuildRequires: pkgconfig
71 BuildRequires: protobuf-devel
72 BuildRequires: pulseaudio-devel
73 BuildRequires: qjson-devel
74 BuildRequires: qt4-build >= %{qt_ver}
75 BuildRequires: qt4-linguist
76 BuildRequires: qt4-qmake
77 BuildRequires: rpmbuild(find_lang) >= 1.38
78 BuildRequires: rpmbuild(macros) >= 1.596
79 BuildRequires: sed >= 4.0
80 BuildRequires: sparsehash-devel
81 BuildRequires: sqlite3-devel >= %{sqlite_ver}
82 BuildRequires: taglib-devel >= 1.8
83 BuildRequires: tar >= 1:1.22
85 Requires(post,postun): desktop-file-utils
86 Requires(post,postun): gtk-update-icon-cache
87 Requires(post,postun): hicolor-icon-theme
88 BuildRequires: sqlite3 >= %{sqlite_ver}
89 Requires: QtSingleApplication >= 2.6-4
90 Requires: QtSql-sqlite3 >= %{qt_installed}
91 Requires: gstreamer-audio-effects-base
92 Suggests: gstreamer-flac
93 Suggests: gstreamer-libav
94 Suggests: gstreamer-mpg123
95 # if we do not link, we use datafiles
96 %{!?with_static_projectm:Requires: libprojectM}
97 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
99 # see libprojectM.spec for explanation
100 %define filterout_ld -Wl,--as-needed -Wl,--no-copy-dt-needed-entries
103 Clementine is a modern music player and library organiser. It is
104 largely a port of Amarok 1.4, with some features rewritten to take
107 %description -l hu.UTF-8
108 Clementine egy modern zenelejátszó és gyűjtemény kezelő. Túlnyomórészt
109 az Amarok 1.4 port-ja, néhány funkciója újraírva, hogy kihasználhassa
112 %description -l pl.UTF-8
113 Clementine to nowoczesny odtwarzacz muzyki i organizator biblioteczki.
114 Jest w dużej części portem Amaroka 1.4 z niektórymi funkcjami
115 przepisanymi tak, aby wykorzystać Qt4.
125 # cleanup vendor. keep only needed libraries.
126 %{__mv} 3rdparty 3rdparty.dist
131 test -d 3rdparty/$dir || mkdir -p 3rdparty/$dir
132 mv 3rdparty.dist/$path 3rdparty/$path
137 %{?with_static_projectm:vendor libprojectm}
140 # requires 1.0.9, but only 1.0.8 is released
143 # Don't build tests. They require gmock
144 %{__sed} -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
146 %{__sed} -i -e 's/-Wall//' src/CMakeLists.txt
149 install -d build/src/translations
151 # as our buildtype is not Release, need to pass these manually. see CMakeLists.txt ~135
152 CXXFLAGS="%{rpmcxxflags} -fpermissive -DNDEBUG -DQT_NO_DEBUG_OUTPUT"
154 -DBUILD_WERROR:BOOL=OFF \
155 -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
156 -DCMAKE_INCLUDE_PATH=%{_includedir}/qt4 \
157 -DBUNDLE_PROJECTM_PRESETS=OFF \
158 -DUSE_SYSTEM_QTSINGLEAPPLICATION=ON \
159 -DUSE_SYSTEM_QXT=ON \
160 -DUSE_SYSTEM_PROJECTM=ON \
161 -DQTSINGLEAPPLICATION_INCLUDE_DIRS=%{_includedir}/qt4/QtSolutions \
165 desktop-file-validate ../dist/%{name}.desktop
171 rm -rf $RPM_BUILD_ROOT
173 %{__make} -C build install \
174 DESTDIR=$RPM_BUILD_ROOT
176 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/kde4/services
179 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{mk_MK,mk}
180 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{si_LK,si}
181 # empty copies of il,tr
182 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/he_IL
183 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/tr_TR
185 %find_lang %{name} --with-qm
187 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps
188 cp -p dist/icons/ubuntu-mono-light/clementine-panel-grey.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel-grey.png
189 cp -p dist/icons/ubuntu-mono-light/clementine-panel.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel.png
192 rm -rf $RPM_BUILD_ROOT
195 %update_desktop_database_post
196 %update_icon_cache hicolor
199 %update_desktop_database_postun
200 %update_icon_cache hicolor
202 %files -f %{name}.lang
203 %defattr(644,root,root,755)
205 %attr(755,root,root) %{_bindir}/clementine
206 %attr(755,root,root) %{_bindir}/clementine-tagreader
207 %{_desktopdir}/clementine.desktop
208 %{_iconsdir}/hicolor/*/apps/clementine-panel-grey.png
209 %{_iconsdir}/hicolor/*/apps/clementine-panel.png
210 %{_iconsdir}/hicolor/*/apps/clementine.png
211 %{_iconsdir}/hicolor/*/apps/clementine.svg
212 %{_datadir}/appdata/clementine.appdata.xml