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