]> git.pld-linux.org Git - packages/clementine.git/blame - clementine.spec
BR cryptopp-devel with .pc
[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:
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
ce2dc7f3
ER
16%define rel 0.1
17%define subver rc1
064e709c 18%define qtver %(pkg-config --silence-errors --modversion QtCore 2>/dev/null || echo ERROR)
bf1e6952 19Summary: A music player and library organiser
df3c0ac1 20Summary(hu.UTF-8): Egy zenelejátszó és gyűjtemény-kezelő
bf1e6952 21Name: clementine
ce2dc7f3
ER
22Version: 1.3.0
23Release: 0.%{subver}.%{rel}
bf1e6952
ER
24License: GPL v3 and GPL v2+
25Group: Applications/Multimedia
ce2dc7f3
ER
26Source0: https://github.com/clementine-player/Clementine/releases/download/1.3rc1/%{name}-%{version}%{subver}.tar.xz
27# Source0-md5: c709615f6c5061e5ff1f43bbb1f9255a
10ecf727 28Patch1: unbundle-po.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
b401e3aa 46BuildRequires: cryptopp-devel >= 5.6.1-4
58fa3d37 47BuildRequires: desktop-file-utils
608ae6ac 48BuildRequires: gettext-tools
f823a794 49%{?with_static_projectm:BuildRequires: glew-devel}
8f83a8c0 50BuildRequires: glib2-devel
dbbdd85a
JK
51BuildRequires: gstreamer0.10-devel
52BuildRequires: gstreamer0.10-plugins-base-devel
bf1e6952 53BuildRequires: gtest-devel
aa506418
ER
54BuildRequires: libcdio-devel
55BuildRequires: libchromaprint-devel
9feefe74 56BuildRequires: libechonest-devel
8f83a8c0 57BuildRequires: libgpod-devel >= 0.7.92
fbe6cce5 58BuildRequires: libimobiledevice-devel >= 1.1.5
2eedc3b1 59BuildRequires: libindicate-qt-devel
e0ba0da9 60BuildRequires: liblastfm-devel >= 0.3.3
8f83a8c0 61BuildRequires: libmtp-devel
1aea93ea 62BuildRequires: libmygpo-qt-devel >= 1.0.7
8f83a8c0 63BuildRequires: libplist-devel
f823a794 64%{!?with_static_projectm:BuildRequires: libprojectM-devel >= 1:2.0.1-4}
bf1e6952 65BuildRequires: libqxt-devel
aa506418 66%{?with_libspotify:BuildRequires: libspotify-devel >= 12.1.45}
11d9e7ee 67BuildRequires: libusbmuxd-devel
8f83a8c0 68BuildRequires: libxml2-devel
75ec0859 69BuildRequires: pkgconfig
2eedc3b1 70BuildRequires: pkgconfig
e0ba0da9 71BuildRequires: protobuf-devel
49968d1b 72BuildRequires: qca-devel
e0ba0da9 73BuildRequires: qjson-devel
64d9867e 74BuildRequires: qt4-build >= %{qtver}
b6199a83 75BuildRequires: qt4-linguist
76BuildRequires: qt4-qmake
0b414294 77BuildRequires: rpmbuild(find_lang) >= 1.38
2eedc3b1 78BuildRequires: rpmbuild(macros) >= 1.596
bf1e6952 79BuildRequires: sed >= 4.0
6f798db9 80BuildRequires: sparsehash-devel
742e4e0a 81%{!?with_static_sqlite:BuildRequires: sqlite3-devel}
f2d911f2 82BuildRequires: taglib-devel >= 1.6
ce2dc7f3
ER
83BuildRequires: tar >= 1:1.22
84BuildRequires: xz
726826ed 85Requires(post,postun): desktop-file-utils
23941661
AF
86Requires(post,postun): gtk-update-icon-cache
87Requires(post,postun): hicolor-icon-theme
acb98f48 88Requires: QtSingleApplication >= 2.6-4
64d9867e 89%{!?with_static_sqlite:Requires: QtSql-sqlite3 >= %{qtver}}
dbbdd85a 90Requires: gstreamer0.10-audio-effects-base
862961b4 91Requires: gstreamer0.10-mad
cb052d79 92Suggests: gstreamer0.10-flac
1bc4a891
ER
93# if we do not link, we use datafiles
94%{!?with_static_projectm:Requires: libprojectM}
bf1e6952
ER
95BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
96
f2d911f2
ER
97# see libprojectM.spec for explanation
98%define filterout_ld -Wl,--as-needed -Wl,--no-copy-dt-needed-entries
99
bf1e6952
ER
100%description
101Clementine is a modern music player and library organiser. It is
102largely a port of Amarok 1.4, with some features rewritten to take
103advantage of Qt4.
104
df3c0ac1
ZU
105%description -l hu.UTF-8
106Clementine egy modern zenelejátszó és gyűjtemény kezelő. Túlnyomórészt
107az Amarok 1.4 port-ja, néhány funkciója újraírva, hogy kihasználhassa
108a Qt4 előnyeit.
109
bf1e6952 110%prep
ce2dc7f3 111%setup -q -n %{name}-%{version}%{subver}
10ecf727 112%patch1 -p1
ce2dc7f3
ER
113#%patch4 -p1
114#%patch5 -p1
115#%patch6 -p1
bf1e6952 116
1aea93ea
ER
117# Remove all 3rdparty libraries except:
118# - universalchardet - not available as a separate library.
1bc4a891
ER
119# - libprojectM - see bcond
120# - sha2 - ?
1aea93ea 121# - qocoa - ?
1bc4a891 122# - qsqlite - see bcond
8e4b706b
ER
123# cleanup vendor. keep only needed libraries.
124# (the rest are packaged with system packages)
125mv 3rdparty 3rdparty.dist
126vendor() {
127 local path dir
128 for path; do
129 dir=$(dirname $path)
130 test -d 3rdparty/$dir || mkdir -p 3rdparty/$dir
131 mv 3rdparty.dist/$path 3rdparty/$path
132 done
133}
134vendor sha2 qocoa
135%{?with_static_sqlite:vendor qsqlite}
136%{?with_static_projectm:vendor libprojectm}
bf1e6952 137
7279ad3f 138# Don't build tests. They require gmock
f2d911f2 139sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
ea86e9d9
BZ
140# remove -Wall
141sed -i -e 's/-Wall//' src/CMakeLists.txt
bf1e6952
ER
142
143%build
144install -d build
7aaa97de 145install -d build/src/translations
bf1e6952 146cd build
6b78beb2
ER
147# as our buildtype is not Release, need to pass these manually. see CMakeLists.txt ~125
148CXXFLAGS="%{rpmcxxflags} -DNDEBUG -DQT_NO_DEBUG_OUTPUT"
88ca6f4b 149%cmake \
ce2dc7f3 150 -DBUILD_WERROR:BOOL=OFF \
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.067901 seconds and 4 git commands to generate.