]>
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 |
ce2dc7f3 | 4 | # - sub-package for kde4 stuff (or nuke them): |
6b78beb2 ER |
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 | |
ce2dc7f3 ER |
16 | %define rel 0.1 |
17 | %define subver rc1 | |
064e709c | 18 | %define qtver %(pkg-config --silence-errors --modversion QtCore 2>/dev/null || echo ERROR) |
bf1e6952 | 19 | Summary: A music player and library organiser |
df3c0ac1 | 20 | Summary(hu.UTF-8): Egy zenelejátszó és gyűjtemény-kezelő |
bf1e6952 | 21 | Name: clementine |
ce2dc7f3 ER |
22 | Version: 1.3.0 |
23 | Release: 0.%{subver}.%{rel} | |
bf1e6952 ER |
24 | License: GPL v3 and GPL v2+ |
25 | Group: Applications/Multimedia | |
ce2dc7f3 ER |
26 | Source0: https://github.com/clementine-player/Clementine/releases/download/1.3rc1/%{name}-%{version}%{subver}.tar.xz |
27 | # Source0-md5: c709615f6c5061e5ff1f43bbb1f9255a | |
10ecf727 | 28 | Patch1: unbundle-po.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 |
b401e3aa | 46 | BuildRequires: cryptopp-devel >= 5.6.1-4 |
58fa3d37 | 47 | BuildRequires: desktop-file-utils |
608ae6ac | 48 | BuildRequires: gettext-tools |
f823a794 | 49 | %{?with_static_projectm:BuildRequires: glew-devel} |
8f83a8c0 | 50 | BuildRequires: glib2-devel |
dbbdd85a JK |
51 | BuildRequires: gstreamer0.10-devel |
52 | BuildRequires: gstreamer0.10-plugins-base-devel | |
bf1e6952 | 53 | BuildRequires: gtest-devel |
aa506418 ER |
54 | BuildRequires: libcdio-devel |
55 | BuildRequires: libchromaprint-devel | |
9feefe74 | 56 | BuildRequires: libechonest-devel |
8f83a8c0 | 57 | BuildRequires: libgpod-devel >= 0.7.92 |
fbe6cce5 | 58 | BuildRequires: libimobiledevice-devel >= 1.1.5 |
2eedc3b1 | 59 | BuildRequires: libindicate-qt-devel |
e0ba0da9 | 60 | BuildRequires: liblastfm-devel >= 0.3.3 |
8f83a8c0 | 61 | BuildRequires: libmtp-devel |
1aea93ea | 62 | BuildRequires: libmygpo-qt-devel >= 1.0.7 |
8f83a8c0 | 63 | BuildRequires: libplist-devel |
f823a794 | 64 | %{!?with_static_projectm:BuildRequires: libprojectM-devel >= 1:2.0.1-4} |
bf1e6952 | 65 | BuildRequires: libqxt-devel |
aa506418 | 66 | %{?with_libspotify:BuildRequires: libspotify-devel >= 12.1.45} |
11d9e7ee | 67 | BuildRequires: libusbmuxd-devel |
8f83a8c0 | 68 | BuildRequires: libxml2-devel |
75ec0859 | 69 | BuildRequires: pkgconfig |
2eedc3b1 | 70 | BuildRequires: pkgconfig |
e0ba0da9 | 71 | BuildRequires: protobuf-devel |
49968d1b | 72 | BuildRequires: qca-devel |
e0ba0da9 | 73 | BuildRequires: qjson-devel |
64d9867e | 74 | BuildRequires: qt4-build >= %{qtver} |
b6199a83 | 75 | BuildRequires: qt4-linguist |
76 | BuildRequires: qt4-qmake | |
0b414294 | 77 | BuildRequires: rpmbuild(find_lang) >= 1.38 |
2eedc3b1 | 78 | BuildRequires: rpmbuild(macros) >= 1.596 |
bf1e6952 | 79 | BuildRequires: sed >= 4.0 |
6f798db9 | 80 | BuildRequires: sparsehash-devel |
742e4e0a | 81 | %{!?with_static_sqlite:BuildRequires: sqlite3-devel} |
f2d911f2 | 82 | BuildRequires: taglib-devel >= 1.6 |
ce2dc7f3 ER |
83 | BuildRequires: tar >= 1:1.22 |
84 | BuildRequires: xz | |
726826ed | 85 | Requires(post,postun): desktop-file-utils |
23941661 AF |
86 | Requires(post,postun): gtk-update-icon-cache |
87 | Requires(post,postun): hicolor-icon-theme | |
acb98f48 | 88 | Requires: QtSingleApplication >= 2.6-4 |
64d9867e | 89 | %{!?with_static_sqlite:Requires: QtSql-sqlite3 >= %{qtver}} |
dbbdd85a | 90 | Requires: gstreamer0.10-audio-effects-base |
862961b4 | 91 | Requires: gstreamer0.10-mad |
cb052d79 | 92 | Suggests: gstreamer0.10-flac |
1bc4a891 ER |
93 | # if we do not link, we use datafiles |
94 | %{!?with_static_projectm:Requires: libprojectM} | |
bf1e6952 ER |
95 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
96 | ||
f2d911f2 ER |
97 | # see libprojectM.spec for explanation |
98 | %define filterout_ld -Wl,--as-needed -Wl,--no-copy-dt-needed-entries | |
99 | ||
bf1e6952 ER |
100 | %description |
101 | Clementine is a modern music player and library organiser. It is | |
102 | largely a port of Amarok 1.4, with some features rewritten to take | |
103 | advantage of Qt4. | |
104 | ||
df3c0ac1 ZU |
105 | %description -l hu.UTF-8 |
106 | Clementine egy modern zenelejátszó és gyűjtemény kezelő. Túlnyomórészt | |
107 | az Amarok 1.4 port-ja, néhány funkciója újraírva, hogy kihasználhassa | |
108 | a Qt4 előnyeit. | |
109 | ||
bf1e6952 | 110 | %prep |
ce2dc7f3 | 111 | %setup -q -n %{name}-%{version}%{subver} |
10ecf727 | 112 | %patch1 -p1 |
ce2dc7f3 ER |
113 | #%patch4 -p1 |
114 | #%patch5 -p1 | |
115 | #%patch6 -p1 | |
bf1e6952 | 116 | |
8e4b706b | 117 | # cleanup vendor. keep only needed libraries. |
8e4b706b ER |
118 | mv 3rdparty 3rdparty.dist |
119 | vendor() { | |
120 | local path dir | |
121 | for path; do | |
122 | dir=$(dirname $path) | |
123 | test -d 3rdparty/$dir || mkdir -p 3rdparty/$dir | |
124 | mv 3rdparty.dist/$path 3rdparty/$path | |
125 | done | |
126 | } | |
127 | vendor sha2 qocoa | |
128 | %{?with_static_sqlite:vendor qsqlite} | |
129 | %{?with_static_projectm:vendor libprojectm} | |
5bd3313b ER |
130 | # missing in pld |
131 | vendor vreen | |
132 | # temporary for 1.3.0 | |
133 | vendor libmygpo-qt | |
bf1e6952 | 134 | |
7279ad3f | 135 | # Don't build tests. They require gmock |
f2d911f2 | 136 | sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt |
ea86e9d9 BZ |
137 | # remove -Wall |
138 | sed -i -e 's/-Wall//' src/CMakeLists.txt | |
bf1e6952 ER |
139 | |
140 | %build | |
141 | install -d build | |
7aaa97de | 142 | install -d build/src/translations |
bf1e6952 | 143 | cd build |
6b78beb2 ER |
144 | # as our buildtype is not Release, need to pass these manually. see CMakeLists.txt ~125 |
145 | CXXFLAGS="%{rpmcxxflags} -DNDEBUG -DQT_NO_DEBUG_OUTPUT" | |
88ca6f4b | 146 | %cmake \ |
ce2dc7f3 | 147 | -DBUILD_WERROR:BOOL=OFF \ |
dc08053f | 148 | -DCMAKE_INCLUDE_PATH=%{_includedir}/qt4 \ |
f2d911f2 | 149 | -DBUNDLE_PROJECTM_PRESETS=OFF \ |
f823a794 ER |
150 | -DUSE_SYSTEM_QTSINGLEAPPLICATION=ON \ |
151 | -DUSE_SYSTEM_QXT=ON \ | |
152 | -DUSE_SYSTEM_PROJECTM=ON \ | |
742e4e0a | 153 | -DSTATIC_SQLITE=%{?with_static_sqlite:ON}%{!?with_static_sqlite:OFF} \ |
dc08053f | 154 | -DQTSINGLEAPPLICATION_INCLUDE_DIRS=%{_includedir}/qt4/QtSolutions \ |
88ca6f4b | 155 | .. |
bf1e6952 ER |
156 | %{__make} |
157 | ||
58fa3d37 ER |
158 | %if %{with tests} |
159 | desktop-file-validate ../dist/%{name}.desktop | |
160 | %endif | |
161 | ||
bf1e6952 ER |
162 | %install |
163 | rm -rf $RPM_BUILD_ROOT | |
164 | %{__make} -C build install \ | |
165 | DESTDIR=$RPM_BUILD_ROOT | |
166 | ||
f823a794 ER |
167 | rm $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps/application-x-clementine.svg |
168 | ||
dbbdd85a JK |
169 | # not in our glibc? |
170 | rm -r $RPM_BUILD_ROOT%{_localedir}/tr_TR | |
21bb3051 ER |
171 | rm -r $RPM_BUILD_ROOT%{_localedir}/he_IL |
172 | rm -r $RPM_BUILD_ROOT%{_localedir}/mk_MK | |
173 | rm -r $RPM_BUILD_ROOT%{_localedir}/si_LK | |
dbbdd85a | 174 | |
10ecf727 ER |
175 | %find_lang %{name} --with-qm |
176 | ||
23f69c7b | 177 | install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps |
58fa3d37 ER |
178 | cp -p dist/icons/ubuntu-mono-light/clementine-panel-grey.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel-grey.png |
179 | cp -p dist/icons/ubuntu-mono-light/clementine-panel.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel.png | |
23f69c7b | 180 | |
bf1e6952 ER |
181 | %clean |
182 | rm -rf $RPM_BUILD_ROOT | |
183 | ||
726826ed ER |
184 | %post |
185 | %update_desktop_database_post | |
2eedc3b1 | 186 | %update_icon_cache hicolor |
726826ed ER |
187 | |
188 | %postun | |
189 | %update_desktop_database_postun | |
2eedc3b1 | 190 | %update_icon_cache hicolor |
726826ed | 191 | |
10ecf727 | 192 | %files -f %{name}.lang |
bf1e6952 | 193 | %defattr(644,root,root,755) |
e0ba0da9 | 194 | %doc Changelog |
bf1e6952 | 195 | %attr(755,root,root) %{_bindir}/clementine |
dbbdd85a | 196 | %attr(755,root,root) %{_bindir}/clementine-tagreader |
bf1e6952 | 197 | %{_desktopdir}/clementine.desktop |
7279ad3f | 198 | %{_pixmapsdir}/clementine.png |
23f69c7b BZ |
199 | %{_iconsdir}/hicolor/*/apps/clementine-panel-grey.png |
200 | %{_iconsdir}/hicolor/*/apps/clementine-panel.png |