]>
Commit | Line | Data |
---|---|---|
2c687024 | 1 | # TODO: |
f2d911f2 | 2 | # - Gstreamer error: "A text/uri-list decoder plugin is required to play this stream, but not installed." |
f2d911f2 | 3 | # - apply patches to libprojectM.spec and use |
6b78beb2 ER |
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 | |
2c687024 | 9 | # |
10 | # Conditional build: | |
c6f8dd12 | 11 | %bcond_without static_sqlite # with static sqlite3 |
3834eb29 | 12 | %bcond_with static_projectm # with static projectM |
aa506418 | 13 | %bcond_with libspotify # build with system libspotify instead of downloading blob |
58fa3d37 | 14 | %bcond_without tests # build without tests |
0b056df0 | 15 | |
064e709c | 16 | %define qtver %(pkg-config --silence-errors --modversion QtCore 2>/dev/null || echo ERROR) |
bf1e6952 | 17 | Summary: A music player and library organiser |
df3c0ac1 | 18 | Summary(hu.UTF-8): Egy zenelejátszó és gyűjtemény-kezelő |
bf1e6952 | 19 | Name: clementine |
a4707694 JR |
20 | Version: 1.2.3 |
21 | Release: 1 | |
bf1e6952 ER |
22 | License: GPL v3 and GPL v2+ |
23 | Group: Applications/Multimedia | |
a4707694 JR |
24 | Source0: https://github.com/clementine-player/Clementine/archive/%{version}.tar.gz?/%{name}-%{version}.tar.gz |
25 | # Source0-md5: 725b92ad4699de1b2ffdf48fe01ed092 | |
f823a794 | 26 | Patch0: desktop-install.patch |
10ecf727 | 27 | Patch1: unbundle-po.patch |
68fe38b0 | 28 | Patch3: %{name}-dt_categories.patch |
5fe14c9e | 29 | Patch4: %{name}-mygpo.patch |
58fa3d37 | 30 | Patch5: %{name}-desktop.patch |
9d35d08c | 31 | Patch6: %{name}-udisks-headers.patch |
1aea93ea | 32 | URL: http://www.clementine-player.org/ |
64d9867e ER |
33 | BuildRequires: QtCore-devel >= %{qtver} |
34 | BuildRequires: QtDBus-devel >= %{qtver} | |
35 | BuildRequires: QtGui-devel >= %{qtver} | |
f2d911f2 | 36 | BuildRequires: QtIOCompressor-devel |
64d9867e ER |
37 | BuildRequires: QtNetwork-devel >= %{qtver} |
38 | BuildRequires: QtOpenGL-devel >= %{qtver} | |
acb98f48 | 39 | BuildRequires: QtSingleApplication-devel >= 2.6-4 |
64d9867e ER |
40 | BuildRequires: QtSql-devel >= %{qtver} |
41 | %{?with_tests:BuildRequires: QtTest-devel >= %{qtver}} | |
42 | BuildRequires: QtXml-devel >= %{qtver} | |
7dce7848 | 43 | BuildRequires: QtXmlPatterns-devel >= %{qtver} |
bf1e6952 | 44 | BuildRequires: boost-devel |
7279ad3f | 45 | BuildRequires: cmake >= 2.6 |
58fa3d37 | 46 | BuildRequires: desktop-file-utils |
608ae6ac | 47 | BuildRequires: gettext-tools |
f823a794 | 48 | %{?with_static_projectm:BuildRequires: glew-devel} |
8f83a8c0 | 49 | BuildRequires: glib2-devel |
dbbdd85a JK |
50 | BuildRequires: gstreamer0.10-devel |
51 | BuildRequires: gstreamer0.10-plugins-base-devel | |
bf1e6952 | 52 | BuildRequires: gtest-devel |
aa506418 ER |
53 | BuildRequires: libcdio-devel |
54 | BuildRequires: libchromaprint-devel | |
9feefe74 | 55 | BuildRequires: libechonest-devel |
8f83a8c0 | 56 | BuildRequires: libgpod-devel >= 0.7.92 |
fbe6cce5 | 57 | BuildRequires: libimobiledevice-devel >= 1.1.5 |
2eedc3b1 | 58 | BuildRequires: libindicate-qt-devel |
e0ba0da9 | 59 | BuildRequires: liblastfm-devel >= 0.3.3 |
8f83a8c0 | 60 | BuildRequires: libmtp-devel |
1aea93ea | 61 | BuildRequires: libmygpo-qt-devel >= 1.0.7 |
8f83a8c0 | 62 | BuildRequires: libplist-devel |
f823a794 | 63 | %{!?with_static_projectm:BuildRequires: libprojectM-devel >= 1:2.0.1-4} |
bf1e6952 | 64 | BuildRequires: libqxt-devel |
aa506418 | 65 | %{?with_libspotify:BuildRequires: libspotify-devel >= 12.1.45} |
11d9e7ee | 66 | BuildRequires: libusbmuxd-devel |
8f83a8c0 | 67 | BuildRequires: libxml2-devel |
75ec0859 | 68 | BuildRequires: pkgconfig |
2eedc3b1 | 69 | BuildRequires: pkgconfig |
e0ba0da9 | 70 | BuildRequires: protobuf-devel |
49968d1b | 71 | BuildRequires: qca-devel |
e0ba0da9 | 72 | BuildRequires: qjson-devel |
64d9867e | 73 | BuildRequires: qt4-build >= %{qtver} |
b6199a83 | 74 | BuildRequires: qt4-linguist |
75 | BuildRequires: qt4-qmake | |
7aaa97de | 76 | BuildRequires: rpmbuild(find_lang) >= 1.33 |
2eedc3b1 | 77 | BuildRequires: rpmbuild(macros) >= 1.596 |
bf1e6952 | 78 | BuildRequires: sed >= 4.0 |
6f798db9 | 79 | BuildRequires: sparsehash-devel |
742e4e0a | 80 | %{!?with_static_sqlite:BuildRequires: sqlite3-devel} |
f2d911f2 | 81 | BuildRequires: taglib-devel >= 1.6 |
726826ed | 82 | Requires(post,postun): desktop-file-utils |
23941661 AF |
83 | Requires(post,postun): gtk-update-icon-cache |
84 | Requires(post,postun): hicolor-icon-theme | |
acb98f48 | 85 | Requires: QtSingleApplication >= 2.6-4 |
64d9867e | 86 | %{!?with_static_sqlite:Requires: QtSql-sqlite3 >= %{qtver}} |
dbbdd85a | 87 | Requires: gstreamer0.10-audio-effects-base |
862961b4 | 88 | Requires: gstreamer0.10-mad |
cb052d79 | 89 | Suggests: gstreamer0.10-flac |
1bc4a891 ER |
90 | # if we do not link, we use datafiles |
91 | %{!?with_static_projectm:Requires: libprojectM} | |
bf1e6952 ER |
92 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
93 | ||
f2d911f2 ER |
94 | # see libprojectM.spec for explanation |
95 | %define filterout_ld -Wl,--as-needed -Wl,--no-copy-dt-needed-entries | |
96 | ||
bf1e6952 ER |
97 | %description |
98 | Clementine is a modern music player and library organiser. It is | |
99 | largely a port of Amarok 1.4, with some features rewritten to take | |
100 | advantage of Qt4. | |
101 | ||
df3c0ac1 ZU |
102 | %description -l hu.UTF-8 |
103 | Clementine egy modern zenelejátszó és gyűjtemény kezelő. Túlnyomórészt | |
104 | az Amarok 1.4 port-ja, néhány funkciója újraírva, hogy kihasználhassa | |
105 | a Qt4 előnyeit. | |
106 | ||
bf1e6952 | 107 | %prep |
a4707694 | 108 | %setup -q -n Clementine-%{version} |
f2d911f2 | 109 | %patch0 -p1 |
10ecf727 | 110 | %patch1 -p1 |
68fe38b0 | 111 | %patch3 -p1 |
5fe14c9e | 112 | %patch4 -p1 |
58fa3d37 | 113 | %patch5 -p1 |
9d35d08c | 114 | %patch6 -p1 |
bf1e6952 | 115 | |
1aea93ea ER |
116 | # Remove all 3rdparty libraries except: |
117 | # - universalchardet - not available as a separate library. | |
1bc4a891 ER |
118 | # - libprojectM - see bcond |
119 | # - sha2 - ? | |
1aea93ea | 120 | # - qocoa - ? |
1bc4a891 | 121 | # - qsqlite - see bcond |
5fe14c9e ER |
122 | mv 3rdparty 3rdparty.keep |
123 | install -d 3rdparty | |
1bc4a891 | 124 | mv 3rdparty.keep/{sha2,qocoa%{?with_static_sqlite:,qsqlite}%{?with_static_projectm:,libprojectm}} 3rdparty |
bf1e6952 | 125 | |
7279ad3f | 126 | # Don't build tests. They require gmock |
f2d911f2 | 127 | sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt |
ea86e9d9 BZ |
128 | # remove -Wall |
129 | sed -i -e 's/-Wall//' src/CMakeLists.txt | |
064e709c JR |
130 | # ...and -Werror |
131 | sed -i -e 's/-Werror//' src/CMakeLists.txt | |
bf1e6952 ER |
132 | |
133 | %build | |
134 | install -d build | |
7aaa97de | 135 | install -d build/src/translations |
bf1e6952 | 136 | cd build |
6b78beb2 ER |
137 | # as our buildtype is not Release, need to pass these manually. see CMakeLists.txt ~125 |
138 | CXXFLAGS="%{rpmcxxflags} -DNDEBUG -DQT_NO_DEBUG_OUTPUT" | |
88ca6f4b | 139 | %cmake \ |
f2d911f2 | 140 | -DBUNDLE_PROJECTM_PRESETS=OFF \ |
f823a794 | 141 | -DUSE_SYSTEM_QTSINGLEAPPLICATION=ON \ |
862961b4 | 142 | -DQTSINGLEAPPLICATION_INCLUDE_DIRS=%{_includedir}/qt4/QtSolutions/ \ |
f823a794 ER |
143 | -DUSE_SYSTEM_QXT=ON \ |
144 | -DUSE_SYSTEM_PROJECTM=ON \ | |
742e4e0a | 145 | -DSTATIC_SQLITE=%{?with_static_sqlite:ON}%{!?with_static_sqlite:OFF} \ |
88ca6f4b | 146 | .. |
bf1e6952 ER |
147 | %{__make} |
148 | ||
58fa3d37 ER |
149 | %if %{with tests} |
150 | desktop-file-validate ../dist/%{name}.desktop | |
151 | %endif | |
152 | ||
bf1e6952 ER |
153 | %install |
154 | rm -rf $RPM_BUILD_ROOT | |
155 | %{__make} -C build install \ | |
156 | DESTDIR=$RPM_BUILD_ROOT | |
157 | ||
f823a794 ER |
158 | rm $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps/application-x-clementine.svg |
159 | ||
dbbdd85a JK |
160 | # not in our glibc? |
161 | rm -r $RPM_BUILD_ROOT%{_localedir}/tr_TR | |
21bb3051 ER |
162 | rm -r $RPM_BUILD_ROOT%{_localedir}/he_IL |
163 | rm -r $RPM_BUILD_ROOT%{_localedir}/mk_MK | |
164 | rm -r $RPM_BUILD_ROOT%{_localedir}/si_LK | |
dbbdd85a | 165 | |
10ecf727 ER |
166 | %find_lang %{name} --with-qm |
167 | ||
23f69c7b | 168 | install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps |
58fa3d37 ER |
169 | cp -p dist/icons/ubuntu-mono-light/clementine-panel-grey.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel-grey.png |
170 | cp -p dist/icons/ubuntu-mono-light/clementine-panel.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel.png | |
23f69c7b | 171 | |
bf1e6952 ER |
172 | %clean |
173 | rm -rf $RPM_BUILD_ROOT | |
174 | ||
726826ed ER |
175 | %post |
176 | %update_desktop_database_post | |
2eedc3b1 | 177 | %update_icon_cache hicolor |
726826ed ER |
178 | |
179 | %postun | |
180 | %update_desktop_database_postun | |
2eedc3b1 | 181 | %update_icon_cache hicolor |
726826ed | 182 | |
10ecf727 | 183 | %files -f %{name}.lang |
bf1e6952 | 184 | %defattr(644,root,root,755) |
e0ba0da9 | 185 | %doc Changelog |
bf1e6952 | 186 | %attr(755,root,root) %{_bindir}/clementine |
dbbdd85a | 187 | %attr(755,root,root) %{_bindir}/clementine-tagreader |
bf1e6952 | 188 | %{_desktopdir}/clementine.desktop |
7279ad3f | 189 | %{_pixmapsdir}/clementine.png |
23f69c7b BZ |
190 | %{_iconsdir}/hicolor/*/apps/clementine-panel-grey.png |
191 | %{_iconsdir}/hicolor/*/apps/clementine-panel.png |