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