]> git.pld-linux.org Git - packages/clementine.git/blob - clementine.spec
Release 24 (by relup.sh)
[packages/clementine.git] / clementine.spec
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
18 Summary:        A music player and library organiser
19 Summary(hu.UTF-8):      Egy zenelejátszó és gyűjtemény-kezelő
20 Name:           clementine
21 Version:        1.3.1
22 Release:        11
23 License:        GPL v3 and GPL v2+
24 Group:          X11/Applications/Multimedia
25 Source0:        https://github.com/clementine-player/Clementine/releases/download/%{version}/%{name}-%{version}.tar.xz
26 # Source0-md5:  18cc5f66aa5fbb2781198a65439bd38a
27 Patch0:         %{name}-c++.patch
28 Patch1:         unbundle-po.patch
29 Patch2:         %{name}-udisks-headers.patch
30 Patch3:         %{name}-mygpo.patch
31 Patch4:         moc.patch
32 URL:            http://www.clementine-player.org/
33 BuildRequires:  OpenGL-devel
34 BuildRequires:  QtCore-devel >= %{qt_ver}
35 BuildRequires:  QtDBus-devel >= %{qt_ver}
36 BuildRequires:  QtGui-devel >= %{qt_ver}
37 BuildRequires:  QtIOCompressor-devel >= 2.3
38 BuildRequires:  QtNetwork-devel >= %{qt_ver}
39 BuildRequires:  QtOpenGL-devel >= %{qt_ver}
40 BuildRequires:  QtSingleApplication-devel >= 2.6-4
41 BuildRequires:  QtSql-devel >= %{qt_ver}
42 %{?with_tests:BuildRequires:    QtTest-devel >= %{qt_ver}}
43 BuildRequires:  QtXml-devel >= %{qt_ver}
44 BuildRequires:  boost-devel
45 BuildRequires:  cmake >= 2.6
46 BuildRequires:  cryptopp-devel >= 5.6.1-4
47 BuildRequires:  desktop-file-utils
48 BuildRequires:  fftw3-devel
49 BuildRequires:  gettext-tools
50 %{?with_static_projectm:BuildRequires:  glew-devel}
51 BuildRequires:  glib2-devel >= 2.0
52 BuildRequires:  gstreamer-devel >= 1.0
53 BuildRequires:  gstreamer-plugins-base-devel >= 1.0
54 BuildRequires:  gtest-devel
55 BuildRequires:  libcdio-devel
56 BuildRequires:  libchromaprint-devel
57 BuildRequires:  libechonest-devel
58 BuildRequires:  libgpod-devel >= 0.7.92
59 BuildRequires:  libimobiledevice-devel >= 1.1.5
60 BuildRequires:  liblastfm-devel >= 0.3.3
61 BuildRequires:  libmtp-devel >= 1.0
62 #BuildRequires: libmygpo-qt-devel >= 1.0.9
63 BuildRequires:  libplist-devel
64 %{!?with_static_projectm:BuildRequires: libprojectM-devel >= 1:2.0.1-4}
65 BuildRequires:  libqxt-devel
66 %{?with_libspotify:BuildRequires:       libspotify-devel >= 12.1.45}
67 BuildRequires:  libusbmuxd-devel
68 BuildRequires:  libxml2-devel >= 2.0
69 BuildRequires:  pkgconfig
70 BuildRequires:  protobuf-devel
71 BuildRequires:  pulseaudio-devel
72 BuildRequires:  qjson-devel
73 BuildRequires:  qt4-build >= %{qt_ver}
74 BuildRequires:  qt4-linguist
75 BuildRequires:  qt4-qmake
76 BuildRequires:  rpmbuild(find_lang) >= 1.38
77 BuildRequires:  rpmbuild(macros) >= 1.596
78 BuildRequires:  sed >= 4.0
79 BuildRequires:  sparsehash-devel
80 BuildRequires:  sqlite3-devel >= %{sqlite_ver}
81 BuildRequires:  taglib-devel >= 1.8
82 BuildRequires:  tar >= 1:1.22
83 BuildRequires:  xz
84 Requires(post,postun):  desktop-file-utils
85 Requires(post,postun):  gtk-update-icon-cache
86 Requires(post,postun):  hicolor-icon-theme
87 BuildRequires:  sqlite3 >= %{sqlite_ver}
88 Requires:       QtSingleApplication >= 2.6-4
89 Requires:       QtSql-sqlite3 >= %{qt_installed}
90 Requires:       gstreamer-audio-effects-base
91 Suggests:       gstreamer-flac
92 Suggests:       gstreamer-libav
93 Suggests:       gstreamer-mpg123
94 # if we do not link, we use datafiles
95 %{!?with_static_projectm:Requires:      libprojectM}
96 BuildRoot:      %{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
102 Clementine is a modern music player and library organiser. It is
103 largely a port of Amarok 1.4, with some features rewritten to take
104 advantage of Qt4.
105
106 %description -l hu.UTF-8
107 Clementine egy modern zenelejátszó és gyűjtemény kezelő. Túlnyomórészt
108 az Amarok 1.4 port-ja, néhány funkciója újraírva, hogy kihasználhassa
109 a 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
121 vendor() {
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 }
129 vendor sha2 qocoa
130 vendor qsqlite
131 %{?with_static_projectm:vendor libprojectm}
132 # missing in pld
133 vendor vreen
134 # requires 1.0.9, but only 1.0.8 is released
135 vendor libmygpo-qt
136
137 # Don't build tests. They require gmock
138 sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
139 # remove -Wall
140 sed -i -e 's/-Wall//' src/CMakeLists.txt
141
142 %build
143 install -d build
144 install -d build/src/translations
145 cd build
146 # as our buildtype is not Release, need to pass these manually. see CMakeLists.txt ~135
147 CXXFLAGS="%{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
160 desktop-file-validate ../dist/%{name}.desktop
161
162 %if %{with tests}
163 %endif
164
165 %install
166 rm -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
181 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps
182 cp -p dist/icons/ubuntu-mono-light/clementine-panel-grey.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel-grey.png
183 cp -p dist/icons/ubuntu-mono-light/clementine-panel.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel.png
184
185 %clean
186 rm -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.048136 seconds and 3 git commands to generate.