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