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 # - 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_without static_sqlite # with static sqlite3
12 %bcond_with static_projectm # with static projectM
13 %bcond_with libspotify # build with system libspotify instead of downloading blob
15 %define qtver %(pkg-config --silence-errors --modversion QtCore 2>/dev/null || echo ERROR)
16 Summary: A music player and library organiser
17 Summary(hu.UTF-8): Egy zenelejátszó és gyűjtemény-kezelő
21 License: GPL v3 and GPL v2+
22 Group: Applications/Multimedia
23 URL: http://www.clementine-player.org/
24 Source0: http://clementine-player.googlecode.com/files/%{name}-%{version}.tar.gz
25 # Source0-md5: 28e4afb822388bd337a761db8f86febf
26 Patch0: desktop-install.patch
27 Patch1: unbundle-po.patch
28 Patch2: %{name}-1.1.1-libimobiledevice-fix.patch
29 Patch3: %{name}-dt_categories.patch
30 Patch4: %{name}-mygpo.patch
31 BuildRequires: QtCore-devel >= %{qtver}
32 BuildRequires: QtDBus-devel >= %{qtver}
33 BuildRequires: QtGui-devel >= %{qtver}
34 BuildRequires: QtIOCompressor-devel
35 BuildRequires: QtNetwork-devel >= %{qtver}
36 BuildRequires: QtOpenGL-devel >= %{qtver}
37 BuildRequires: QtSingleApplication-devel >= 2.6-4
38 BuildRequires: QtSql-devel >= %{qtver}
39 %{?with_tests:BuildRequires: QtTest-devel >= %{qtver}}
40 BuildRequires: QtXml-devel >= %{qtver}
41 BuildRequires: QtXmlPatterns-devel >= %{qtver}
42 BuildRequires: boost-devel
43 BuildRequires: cmake >= 2.6
44 #%{?with_static_projectm:BuildRequires: ftgl-devel >= 2.1.3}
45 BuildRequires: gettext-devel
46 %{?with_static_projectm:BuildRequires: glew-devel}
47 BuildRequires: glib2-devel
48 BuildRequires: gstreamer0.10-devel
49 BuildRequires: gstreamer0.10-plugins-base-devel
50 BuildRequires: gtest-devel
51 BuildRequires: libcdio-devel
52 BuildRequires: libchromaprint-devel
53 BuildRequires: libgpod-devel >= 0.7.92
54 BuildRequires: libimobiledevice-devel >= 1.1.5
55 BuildRequires: libindicate-qt-devel
56 BuildRequires: liblastfm-devel >= 0.3.3
57 BuildRequires: libmtp-devel
58 BuildRequires: libmygpo-qt-devel
59 BuildRequires: libplist-devel
60 %{!?with_static_projectm:BuildRequires: libprojectM-devel >= 1:2.0.1-4}
61 BuildRequires: libqxt-devel
62 %{?with_libspotify:BuildRequires: libspotify-devel >= 12.1.45}
63 BuildRequires: libxml2-devel
64 BuildRequires: pkgconfig
65 BuildRequires: pkgconfig
66 BuildRequires: protobuf-devel
67 BuildRequires: qca-devel
68 BuildRequires: qjson-devel
69 BuildRequires: qt4-build >= %{qtver}
70 BuildRequires: qt4-linguist
71 BuildRequires: qt4-qmake
72 BuildRequires: rpmbuild(find_lang) >= 1.33
73 BuildRequires: rpmbuild(macros) >= 1.596
74 BuildRequires: sed >= 4.0
75 BuildRequires: sparsehash-devel
76 %{!?with_static_sqlite:BuildRequires: sqlite3-devel}
77 BuildRequires: taglib-devel >= 1.6
78 BuildRequires: usbmuxd-devel
79 Requires(post,postun): desktop-file-utils
80 Requires(post,postun): gtk-update-icon-cache
81 Requires(post,postun): hicolor-icon-theme
82 Requires: QtSingleApplication >= 2.6-4
83 %{!?with_static_sqlite:Requires: QtSql-sqlite3 >= %{qtver}}
84 Requires: gstreamer0.10-audio-effects-base
85 Requires: gstreamer0.10-mad
86 Suggests: gstreamer0.10-flac
88 # while we do not link (yet), we use datafiles
90 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
92 # see libprojectM.spec for explanation
93 %define filterout_ld -Wl,--as-needed -Wl,--no-copy-dt-needed-entries
96 Clementine is a modern music player and library organiser. It is
97 largely a port of Amarok 1.4, with some features rewritten to take
100 %description -l hu.UTF-8
101 Clementine egy modern zenelejátszó és gyűjtemény kezelő. Túlnyomórészt
102 az Amarok 1.4 port-ja, néhány funkciója újraírva, hogy kihasználhassa
113 # Remove all 3rdparty libraries exceph universalchardet
114 # as it is not available as a separate library.
115 mv 3rdparty 3rdparty.keep
117 mv 3rdparty.keep/{universalchardet,sha2,libechonest,qocoa%{?with_static_sqlite:,qsqlite}%{?with_static_projectm:,libprojectM}} 3rdparty
119 # Don't build tests. They require gmock
120 sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
122 sed -i -e 's/-Wall//' src/CMakeLists.txt
124 sed -i -e 's/-Werror//' src/CMakeLists.txt
128 install -d build/src/translations
130 # as our buildtype is not Release, need to pass these manually. see CMakeLists.txt ~125
131 CXXFLAGS="%{rpmcxxflags} -DNDEBUG -DQT_NO_DEBUG_OUTPUT"
133 -DBUNDLE_PROJECTM_PRESETS=OFF \
134 -DUSE_SYSTEM_QTSINGLEAPPLICATION=ON \
135 -DQTSINGLEAPPLICATION_INCLUDE_DIRS=%{_includedir}/qt4/QtSolutions/ \
136 -DUSE_SYSTEM_QXT=ON \
137 -DUSE_SYSTEM_PROJECTM=ON \
138 -DSTATIC_SQLITE=%{?with_static_sqlite:ON}%{!?with_static_sqlite:OFF} \
143 rm -rf $RPM_BUILD_ROOT
144 %{__make} -C build install \
145 DESTDIR=$RPM_BUILD_ROOT
147 rm $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps/application-x-clementine.svg
150 rm -r $RPM_BUILD_ROOT%{_localedir}/tr_TR
152 %find_lang %{name} --with-qm
154 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps
155 cp -a dist/icons/ubuntu-mono-light/clementine-panel-grey.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel-grey.png
156 cp -a dist/icons/ubuntu-mono-light/clementine-panel.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel.png
159 rm -rf $RPM_BUILD_ROOT
162 %update_desktop_database_post
163 %update_icon_cache hicolor
166 %update_desktop_database_postun
167 %update_icon_cache hicolor
169 %files -f %{name}.lang
170 %defattr(644,root,root,755)
172 %attr(755,root,root) %{_bindir}/clementine
173 %attr(755,root,root) %{_bindir}/clementine-tagreader
174 %{_desktopdir}/clementine.desktop
175 %{_pixmapsdir}/clementine.png
176 %{_iconsdir}/hicolor/*/apps/clementine-panel-grey.png
177 %{_iconsdir}/hicolor/*/apps/clementine-panel.png