]> git.pld-linux.org Git - packages/clementine.git/blame - clementine.spec
use libusbmuxd-devel now
[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
JR
20Version: 1.2.3
21Release: 1
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
7aaa97de 76BuildRequires: rpmbuild(find_lang) >= 1.33
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
5fe14c9e
ER
122mv 3rdparty 3rdparty.keep
123install -d 3rdparty
1bc4a891 124mv 3rdparty.keep/{sha2,qocoa%{?with_static_sqlite:,qsqlite}%{?with_static_projectm:,libprojectm}} 3rdparty
bf1e6952 125
7279ad3f 126# Don't build tests. They require gmock
f2d911f2 127sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
ea86e9d9
BZ
128# remove -Wall
129sed -i -e 's/-Wall//' src/CMakeLists.txt
064e709c
JR
130# ...and -Werror
131sed -i -e 's/-Werror//' src/CMakeLists.txt
bf1e6952
ER
132
133%build
134install -d build
7aaa97de 135install -d build/src/translations
bf1e6952 136cd build
6b78beb2
ER
137# as our buildtype is not Release, need to pass these manually. see CMakeLists.txt ~125
138CXXFLAGS="%{rpmcxxflags} -DNDEBUG -DQT_NO_DEBUG_OUTPUT"
88ca6f4b 139%cmake \
f2d911f2 140 -DBUNDLE_PROJECTM_PRESETS=OFF \
f823a794 141 -DUSE_SYSTEM_QTSINGLEAPPLICATION=ON \
862961b4 142 -DQTSINGLEAPPLICATION_INCLUDE_DIRS=%{_includedir}/qt4/QtSolutions/ \
f823a794
ER
143 -DUSE_SYSTEM_QXT=ON \
144 -DUSE_SYSTEM_PROJECTM=ON \
742e4e0a 145 -DSTATIC_SQLITE=%{?with_static_sqlite:ON}%{!?with_static_sqlite:OFF} \
88ca6f4b 146 ..
bf1e6952
ER
147%{__make}
148
58fa3d37
ER
149%if %{with tests}
150desktop-file-validate ../dist/%{name}.desktop
151%endif
152
bf1e6952
ER
153%install
154rm -rf $RPM_BUILD_ROOT
155%{__make} -C build install \
156 DESTDIR=$RPM_BUILD_ROOT
157
f823a794
ER
158rm $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps/application-x-clementine.svg
159
dbbdd85a
JK
160# not in our glibc?
161rm -r $RPM_BUILD_ROOT%{_localedir}/tr_TR
21bb3051
ER
162rm -r $RPM_BUILD_ROOT%{_localedir}/he_IL
163rm -r $RPM_BUILD_ROOT%{_localedir}/mk_MK
164rm -r $RPM_BUILD_ROOT%{_localedir}/si_LK
dbbdd85a 165
10ecf727
ER
166%find_lang %{name} --with-qm
167
23f69c7b 168install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps
58fa3d37
ER
169cp -p dist/icons/ubuntu-mono-light/clementine-panel-grey.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel-grey.png
170cp -p dist/icons/ubuntu-mono-light/clementine-panel.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel.png
23f69c7b 171
bf1e6952
ER
172%clean
173rm -rf $RPM_BUILD_ROOT
174
726826ed
ER
175%post
176%update_desktop_database_post
2eedc3b1 177%update_icon_cache hicolor
726826ed
ER
178
179%postun
180%update_desktop_database_postun
2eedc3b1 181%update_icon_cache hicolor
726826ed 182
10ecf727 183%files -f %{name}.lang
bf1e6952 184%defattr(644,root,root,755)
e0ba0da9 185%doc Changelog
bf1e6952 186%attr(755,root,root) %{_bindir}/clementine
dbbdd85a 187%attr(755,root,root) %{_bindir}/clementine-tagreader
bf1e6952 188%{_desktopdir}/clementine.desktop
7279ad3f 189%{_pixmapsdir}/clementine.png
23f69c7b
BZ
190%{_iconsdir}/hicolor/*/apps/clementine-panel-grey.png
191%{_iconsdir}/hicolor/*/apps/clementine-panel.png
This page took 0.109275 seconds and 4 git commands to generate.