]> git.pld-linux.org Git - packages/clementine.git/blame - clementine.spec
- release 5 (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
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 17Summary: A music player and library organiser
df3c0ac1 18Summary(hu.UTF-8): Egy zenelejátszó és gyűjtemény-kezelő
bf1e6952 19Name: clementine
a4707694 20Version: 1.2.3
267b04ed 21Release: 5
bf1e6952
ER
22License: GPL v3 and GPL v2+
23Group: Applications/Multimedia
a4707694
JR
24Source0: https://github.com/clementine-player/Clementine/archive/%{version}.tar.gz?/%{name}-%{version}.tar.gz
25# Source0-md5: 725b92ad4699de1b2ffdf48fe01ed092
f823a794 26Patch0: desktop-install.patch
10ecf727 27Patch1: unbundle-po.patch
68fe38b0 28Patch3: %{name}-dt_categories.patch
5fe14c9e 29Patch4: %{name}-mygpo.patch
58fa3d37 30Patch5: %{name}-desktop.patch
9d35d08c 31Patch6: %{name}-udisks-headers.patch
1aea93ea 32URL: http://www.clementine-player.org/
64d9867e
ER
33BuildRequires: QtCore-devel >= %{qtver}
34BuildRequires: QtDBus-devel >= %{qtver}
35BuildRequires: QtGui-devel >= %{qtver}
f2d911f2 36BuildRequires: QtIOCompressor-devel
64d9867e
ER
37BuildRequires: QtNetwork-devel >= %{qtver}
38BuildRequires: QtOpenGL-devel >= %{qtver}
acb98f48 39BuildRequires: QtSingleApplication-devel >= 2.6-4
64d9867e
ER
40BuildRequires: QtSql-devel >= %{qtver}
41%{?with_tests:BuildRequires: QtTest-devel >= %{qtver}}
42BuildRequires: QtXml-devel >= %{qtver}
7dce7848 43BuildRequires: QtXmlPatterns-devel >= %{qtver}
bf1e6952 44BuildRequires: boost-devel
7279ad3f 45BuildRequires: cmake >= 2.6
58fa3d37 46BuildRequires: desktop-file-utils
608ae6ac 47BuildRequires: gettext-tools
f823a794 48%{?with_static_projectm:BuildRequires: glew-devel}
8f83a8c0 49BuildRequires: glib2-devel
dbbdd85a
JK
50BuildRequires: gstreamer0.10-devel
51BuildRequires: gstreamer0.10-plugins-base-devel
bf1e6952 52BuildRequires: gtest-devel
aa506418
ER
53BuildRequires: libcdio-devel
54BuildRequires: libchromaprint-devel
9feefe74 55BuildRequires: libechonest-devel
8f83a8c0 56BuildRequires: libgpod-devel >= 0.7.92
fbe6cce5 57BuildRequires: libimobiledevice-devel >= 1.1.5
2eedc3b1 58BuildRequires: libindicate-qt-devel
e0ba0da9 59BuildRequires: liblastfm-devel >= 0.3.3
8f83a8c0 60BuildRequires: libmtp-devel
1aea93ea 61BuildRequires: libmygpo-qt-devel >= 1.0.7
8f83a8c0 62BuildRequires: libplist-devel
f823a794 63%{!?with_static_projectm:BuildRequires: libprojectM-devel >= 1:2.0.1-4}
bf1e6952 64BuildRequires: libqxt-devel
aa506418 65%{?with_libspotify:BuildRequires: libspotify-devel >= 12.1.45}
11d9e7ee 66BuildRequires: libusbmuxd-devel
8f83a8c0 67BuildRequires: libxml2-devel
75ec0859 68BuildRequires: pkgconfig
2eedc3b1 69BuildRequires: pkgconfig
e0ba0da9 70BuildRequires: protobuf-devel
49968d1b 71BuildRequires: qca-devel
e0ba0da9 72BuildRequires: qjson-devel
64d9867e 73BuildRequires: qt4-build >= %{qtver}
b6199a83 74BuildRequires: qt4-linguist
75BuildRequires: qt4-qmake
0b414294 76BuildRequires: rpmbuild(find_lang) >= 1.38
2eedc3b1 77BuildRequires: rpmbuild(macros) >= 1.596
bf1e6952 78BuildRequires: sed >= 4.0
6f798db9 79BuildRequires: sparsehash-devel
742e4e0a 80%{!?with_static_sqlite:BuildRequires: sqlite3-devel}
f2d911f2 81BuildRequires: taglib-devel >= 1.6
726826ed 82Requires(post,postun): desktop-file-utils
23941661
AF
83Requires(post,postun): gtk-update-icon-cache
84Requires(post,postun): hicolor-icon-theme
acb98f48 85Requires: QtSingleApplication >= 2.6-4
64d9867e 86%{!?with_static_sqlite:Requires: QtSql-sqlite3 >= %{qtver}}
dbbdd85a 87Requires: gstreamer0.10-audio-effects-base
862961b4 88Requires: gstreamer0.10-mad
cb052d79 89Suggests: gstreamer0.10-flac
1bc4a891
ER
90# if we do not link, we use datafiles
91%{!?with_static_projectm:Requires: libprojectM}
bf1e6952
ER
92BuildRoot: %{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
98Clementine is a modern music player and library organiser. It is
99largely a port of Amarok 1.4, with some features rewritten to take
100advantage of Qt4.
101
df3c0ac1
ZU
102%description -l hu.UTF-8
103Clementine egy modern zenelejátszó és gyűjtemény kezelő. Túlnyomórészt
104az Amarok 1.4 port-ja, néhány funkciója újraírva, hogy kihasználhassa
105a 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
8e4b706b
ER
122# cleanup vendor. keep only needed libraries.
123# (the rest are packaged with system packages)
124mv 3rdparty 3rdparty.dist
125vendor() {
126 local path dir
127 for path; do
128 dir=$(dirname $path)
129 test -d 3rdparty/$dir || mkdir -p 3rdparty/$dir
130 mv 3rdparty.dist/$path 3rdparty/$path
131 done
132}
133vendor sha2 qocoa
134%{?with_static_sqlite:vendor qsqlite}
135%{?with_static_projectm:vendor libprojectm}
bf1e6952 136
7279ad3f 137# Don't build tests. They require gmock
f2d911f2 138sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
ea86e9d9
BZ
139# remove -Wall
140sed -i -e 's/-Wall//' src/CMakeLists.txt
064e709c
JR
141# ...and -Werror
142sed -i -e 's/-Werror//' src/CMakeLists.txt
bf1e6952
ER
143
144%build
145install -d build
7aaa97de 146install -d build/src/translations
bf1e6952 147cd build
6b78beb2
ER
148# as our buildtype is not Release, need to pass these manually. see CMakeLists.txt ~125
149CXXFLAGS="%{rpmcxxflags} -DNDEBUG -DQT_NO_DEBUG_OUTPUT"
88ca6f4b 150%cmake \
dc08053f 151 -DCMAKE_INCLUDE_PATH=%{_includedir}/qt4 \
f2d911f2 152 -DBUNDLE_PROJECTM_PRESETS=OFF \
f823a794
ER
153 -DUSE_SYSTEM_QTSINGLEAPPLICATION=ON \
154 -DUSE_SYSTEM_QXT=ON \
155 -DUSE_SYSTEM_PROJECTM=ON \
742e4e0a 156 -DSTATIC_SQLITE=%{?with_static_sqlite:ON}%{!?with_static_sqlite:OFF} \
dc08053f 157 -DQTSINGLEAPPLICATION_INCLUDE_DIRS=%{_includedir}/qt4/QtSolutions \
88ca6f4b 158 ..
bf1e6952
ER
159%{__make}
160
58fa3d37
ER
161%if %{with tests}
162desktop-file-validate ../dist/%{name}.desktop
163%endif
164
bf1e6952
ER
165%install
166rm -rf $RPM_BUILD_ROOT
167%{__make} -C build install \
168 DESTDIR=$RPM_BUILD_ROOT
169
f823a794
ER
170rm $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps/application-x-clementine.svg
171
dbbdd85a
JK
172# not in our glibc?
173rm -r $RPM_BUILD_ROOT%{_localedir}/tr_TR
21bb3051
ER
174rm -r $RPM_BUILD_ROOT%{_localedir}/he_IL
175rm -r $RPM_BUILD_ROOT%{_localedir}/mk_MK
176rm -r $RPM_BUILD_ROOT%{_localedir}/si_LK
dbbdd85a 177
10ecf727
ER
178%find_lang %{name} --with-qm
179
23f69c7b 180install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps
58fa3d37
ER
181cp -p dist/icons/ubuntu-mono-light/clementine-panel-grey.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel-grey.png
182cp -p dist/icons/ubuntu-mono-light/clementine-panel.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel.png
23f69c7b 183
bf1e6952
ER
184%clean
185rm -rf $RPM_BUILD_ROOT
186
726826ed
ER
187%post
188%update_desktop_database_post
2eedc3b1 189%update_icon_cache hicolor
726826ed
ER
190
191%postun
192%update_desktop_database_postun
2eedc3b1 193%update_icon_cache hicolor
726826ed 194
10ecf727 195%files -f %{name}.lang
bf1e6952 196%defattr(644,root,root,755)
e0ba0da9 197%doc Changelog
bf1e6952 198%attr(755,root,root) %{_bindir}/clementine
dbbdd85a 199%attr(755,root,root) %{_bindir}/clementine-tagreader
bf1e6952 200%{_desktopdir}/clementine.desktop
7279ad3f 201%{_pixmapsdir}/clementine.png
23f69c7b
BZ
202%{_iconsdir}/hicolor/*/apps/clementine-panel-grey.png
203%{_iconsdir}/hicolor/*/apps/clementine-panel.png
This page took 0.139795 seconds and 4 git commands to generate.