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