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