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