]> git.pld-linux.org Git - packages/clementine.git/blame - clementine.spec
- release 21 (by relup.sh)
[packages/clementine.git] / clementine.spec
CommitLineData
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:
3834eb29 11%bcond_with static_projectm # with static projectM
aa506418 12%bcond_with libspotify # build with system libspotify instead of downloading blob
0a7f4db6 13%bcond_with tests # build without tests
0b056df0 14
9d2e5daa 15%define qt_ver 4.5.0
988c637f
JB
16%define qt_installed %(pkg-config --silence-errors --modversion QtCore 2>/dev/null || echo ERROR)
17%define sqlite_ver 3.14.0-2
bf1e6952 18Summary: A music player and library organiser
df3c0ac1 19Summary(hu.UTF-8): Egy zenelejátszó és gyűjtemény-kezelő
4c8a513a 20Summary(pl.UTF-8): Odtwarzacz muzyki i organizator biblioteczki
bf1e6952 21Name: clementine
19313dac 22Version: 1.3.1
fc547449 23Release: 21
bf1e6952 24License: GPL v3 and GPL v2+
bf2543c3 25Group: X11/Applications/Multimedia
19313dac
ER
26Source0: https://github.com/clementine-player/Clementine/releases/download/%{version}/%{name}-%{version}.tar.xz
27# Source0-md5: 18cc5f66aa5fbb2781198a65439bd38a
988c637f 28Patch0: %{name}-c++.patch
10ecf727 29Patch1: unbundle-po.patch
bf2543c3
ER
30Patch2: %{name}-udisks-headers.patch
31Patch3: %{name}-mygpo.patch
e1e09755 32Patch4: moc.patch
3c8d97d3
JB
33Patch5: %{name}-protobuf.patch
34Patch6: %{name}-cryptopp.patch
1aea93ea 35URL: http://www.clementine-player.org/
988c637f
JB
36BuildRequires: OpenGL-devel
37BuildRequires: QtCore-devel >= %{qt_ver}
38BuildRequires: QtDBus-devel >= %{qt_ver}
39BuildRequires: QtGui-devel >= %{qt_ver}
6db3c45c 40BuildRequires: QtIOCompressor-devel >= 2.3
988c637f
JB
41BuildRequires: QtNetwork-devel >= %{qt_ver}
42BuildRequires: QtOpenGL-devel >= %{qt_ver}
acb98f48 43BuildRequires: QtSingleApplication-devel >= 2.6-4
988c637f
JB
44BuildRequires: QtSql-devel >= %{qt_ver}
45%{?with_tests:BuildRequires: QtTest-devel >= %{qt_ver}}
46BuildRequires: QtXml-devel >= %{qt_ver}
bf1e6952 47BuildRequires: boost-devel
7279ad3f 48BuildRequires: cmake >= 2.6
b401e3aa 49BuildRequires: cryptopp-devel >= 5.6.1-4
58fa3d37 50BuildRequires: desktop-file-utils
988c637f 51BuildRequires: fftw3-devel
608ae6ac 52BuildRequires: gettext-tools
f823a794 53%{?with_static_projectm:BuildRequires: glew-devel}
988c637f
JB
54BuildRequires: glib2-devel >= 2.0
55BuildRequires: gstreamer-devel >= 1.0
56BuildRequires: gstreamer-plugins-base-devel >= 1.0
bf1e6952 57BuildRequires: gtest-devel
aa506418
ER
58BuildRequires: libcdio-devel
59BuildRequires: libchromaprint-devel
9feefe74 60BuildRequires: libechonest-devel
8f83a8c0 61BuildRequires: libgpod-devel >= 0.7.92
fbe6cce5 62BuildRequires: libimobiledevice-devel >= 1.1.5
e0ba0da9 63BuildRequires: liblastfm-devel >= 0.3.3
257df204 64BuildRequires: libmtp-devel >= 1.0
988c637f 65#BuildRequires: libmygpo-qt-devel >= 1.0.9
8f83a8c0 66BuildRequires: libplist-devel
f823a794 67%{!?with_static_projectm:BuildRequires: libprojectM-devel >= 1:2.0.1-4}
bf1e6952 68BuildRequires: libqxt-devel
aa506418 69%{?with_libspotify:BuildRequires: libspotify-devel >= 12.1.45}
11d9e7ee 70BuildRequires: libusbmuxd-devel
988c637f 71BuildRequires: libxml2-devel >= 2.0
2eedc3b1 72BuildRequires: pkgconfig
e0ba0da9 73BuildRequires: protobuf-devel
988c637f 74BuildRequires: pulseaudio-devel
e0ba0da9 75BuildRequires: qjson-devel
988c637f 76BuildRequires: qt4-build >= %{qt_ver}
b6199a83 77BuildRequires: qt4-linguist
78BuildRequires: qt4-qmake
0b414294 79BuildRequires: rpmbuild(find_lang) >= 1.38
2eedc3b1 80BuildRequires: rpmbuild(macros) >= 1.596
bf1e6952 81BuildRequires: sed >= 4.0
6f798db9 82BuildRequires: sparsehash-devel
988c637f 83BuildRequires: sqlite3-devel >= %{sqlite_ver}
257df204 84BuildRequires: taglib-devel >= 1.8
ce2dc7f3
ER
85BuildRequires: tar >= 1:1.22
86BuildRequires: xz
726826ed 87Requires(post,postun): desktop-file-utils
23941661
AF
88Requires(post,postun): gtk-update-icon-cache
89Requires(post,postun): hicolor-icon-theme
988c637f 90BuildRequires: sqlite3 >= %{sqlite_ver}
acb98f48 91Requires: QtSingleApplication >= 2.6-4
988c637f 92Requires: QtSql-sqlite3 >= %{qt_installed}
fbf1b864 93Requires: gstreamer-audio-effects-base
fbf1b864 94Suggests: gstreamer-flac
6047619e
JR
95Suggests: gstreamer-libav
96Suggests: gstreamer-mpg123
1bc4a891
ER
97# if we do not link, we use datafiles
98%{!?with_static_projectm:Requires: libprojectM}
bf1e6952
ER
99BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
100
f2d911f2
ER
101# see libprojectM.spec for explanation
102%define filterout_ld -Wl,--as-needed -Wl,--no-copy-dt-needed-entries
103
bf1e6952
ER
104%description
105Clementine is a modern music player and library organiser. It is
106largely a port of Amarok 1.4, with some features rewritten to take
107advantage of Qt4.
108
df3c0ac1
ZU
109%description -l hu.UTF-8
110Clementine egy modern zenelejátszó és gyűjtemény kezelő. Túlnyomórészt
111az Amarok 1.4 port-ja, néhány funkciója újraírva, hogy kihasználhassa
112a Qt4 előnyeit.
113
4c8a513a
JB
114%description -l pl.UTF-8
115Clementine to nowoczesny odtwarzacz muzyki i organizator biblioteczki.
116Jest w dużej części portem Amaroka 1.4 z niektórymi funkcjami
117przepisanymi tak, aby wykorzystać Qt4.
118
bf1e6952 119%prep
19313dac 120%setup -q
988c637f 121%patch0 -p1
10ecf727 122%patch1 -p1
bf2543c3
ER
123%patch2 -p1
124#%patch3 -p1
e1e09755 125%patch4 -p1
3c8d97d3
JB
126%patch5 -p1
127%patch6 -p1
bf1e6952 128
8e4b706b 129# cleanup vendor. keep only needed libraries.
988c637f 130%{__mv} 3rdparty 3rdparty.dist
8e4b706b
ER
131vendor() {
132 local path dir
133 for path; do
134 dir=$(dirname $path)
135 test -d 3rdparty/$dir || mkdir -p 3rdparty/$dir
136 mv 3rdparty.dist/$path 3rdparty/$path
137 done
138}
139vendor sha2 qocoa
6db3c45c 140vendor qsqlite
8e4b706b 141%{?with_static_projectm:vendor libprojectm}
5bd3313b
ER
142# missing in pld
143vendor vreen
257df204 144# requires 1.0.9, but only 1.0.8 is released
5bd3313b 145vendor libmygpo-qt
bf1e6952 146
7279ad3f 147# Don't build tests. They require gmock
4c8a513a 148%{__sed} -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
ea86e9d9 149# remove -Wall
4c8a513a 150%{__sed} -i -e 's/-Wall//' src/CMakeLists.txt
bf1e6952
ER
151
152%build
7aaa97de 153install -d build/src/translations
bf1e6952 154cd build
257df204 155# as our buildtype is not Release, need to pass these manually. see CMakeLists.txt ~135
a86e995f 156CXXFLAGS="%{rpmcxxflags} -fpermissive -DNDEBUG -DQT_NO_DEBUG_OUTPUT"
88ca6f4b 157%cmake \
ce2dc7f3 158 -DBUILD_WERROR:BOOL=OFF \
19313dac 159 -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
dc08053f 160 -DCMAKE_INCLUDE_PATH=%{_includedir}/qt4 \
f2d911f2 161 -DBUNDLE_PROJECTM_PRESETS=OFF \
f823a794
ER
162 -DUSE_SYSTEM_QTSINGLEAPPLICATION=ON \
163 -DUSE_SYSTEM_QXT=ON \
164 -DUSE_SYSTEM_PROJECTM=ON \
dc08053f 165 -DQTSINGLEAPPLICATION_INCLUDE_DIRS=%{_includedir}/qt4/QtSolutions \
88ca6f4b 166 ..
bf1e6952
ER
167%{__make}
168
58fa3d37 169desktop-file-validate ../dist/%{name}.desktop
0a7f4db6
ER
170
171%if %{with tests}
58fa3d37
ER
172%endif
173
bf1e6952
ER
174%install
175rm -rf $RPM_BUILD_ROOT
4c8a513a 176
bf1e6952
ER
177%{__make} -C build install \
178 DESTDIR=$RPM_BUILD_ROOT
179
9de89a56 180%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/kde4/services
f823a794 181
988c637f
JB
182# unify locale codes
183%{__mv} $RPM_BUILD_ROOT%{_localedir}/{mk_MK,mk}
184%{__mv} $RPM_BUILD_ROOT%{_localedir}/{si_LK,si}
185# empty copies of il,tr
186%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/he_IL
187%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/tr_TR
dbbdd85a 188
10ecf727
ER
189%find_lang %{name} --with-qm
190
23f69c7b 191install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps
58fa3d37
ER
192cp -p dist/icons/ubuntu-mono-light/clementine-panel-grey.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel-grey.png
193cp -p dist/icons/ubuntu-mono-light/clementine-panel.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel.png
23f69c7b 194
bf1e6952
ER
195%clean
196rm -rf $RPM_BUILD_ROOT
197
726826ed
ER
198%post
199%update_desktop_database_post
2eedc3b1 200%update_icon_cache hicolor
726826ed
ER
201
202%postun
203%update_desktop_database_postun
2eedc3b1 204%update_icon_cache hicolor
726826ed 205
10ecf727 206%files -f %{name}.lang
bf1e6952 207%defattr(644,root,root,755)
e0ba0da9 208%doc Changelog
bf1e6952 209%attr(755,root,root) %{_bindir}/clementine
dbbdd85a 210%attr(755,root,root) %{_bindir}/clementine-tagreader
bf1e6952 211%{_desktopdir}/clementine.desktop
23f69c7b
BZ
212%{_iconsdir}/hicolor/*/apps/clementine-panel-grey.png
213%{_iconsdir}/hicolor/*/apps/clementine-panel.png
9de89a56
ER
214%{_iconsdir}/hicolor/*/apps/clementine.png
215%{_iconsdir}/hicolor/*/apps/clementine.svg
216%{_datadir}/appdata/clementine.appdata.xml
This page took 0.057395 seconds and 4 git commands to generate.