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