]> git.pld-linux.org Git - packages/clementine.git/blob - clementine.spec
versions from cmakefile.txt
[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 Patch6:         %{name}-udisks-headers.patch
31 URL:            http://www.clementine-player.org/
32 BuildRequires:  QtCore-devel >= %{qtver}
33 BuildRequires:  QtDBus-devel >= %{qtver}
34 BuildRequires:  QtGui-devel >= %{qtver}
35 BuildRequires:  QtIOCompressor-devel
36 BuildRequires:  QtNetwork-devel >= %{qtver}
37 BuildRequires:  QtOpenGL-devel >= %{qtver}
38 BuildRequires:  QtSingleApplication-devel >= 2.6-4
39 BuildRequires:  QtSql-devel >= %{qtver}
40 %{?with_tests:BuildRequires:    QtTest-devel >= %{qtver}}
41 BuildRequires:  QtXml-devel >= %{qtver}
42 BuildRequires:  QtXmlPatterns-devel >= %{qtver}
43 BuildRequires:  boost-devel
44 BuildRequires:  cmake >= 2.6
45 BuildRequires:  cryptopp-devel >= 5.6.1-4
46 BuildRequires:  desktop-file-utils
47 BuildRequires:  gettext-tools
48 %{?with_static_projectm:BuildRequires:  glew-devel}
49 BuildRequires:  glib2-devel
50 BuildRequires:  gstreamer0.10-devel
51 BuildRequires:  gstreamer0.10-plugins-base-devel
52 BuildRequires:  gtest-devel
53 BuildRequires:  libcdio-devel
54 BuildRequires:  libchromaprint-devel
55 BuildRequires:  libechonest-devel
56 BuildRequires:  libgpod-devel >= 0.7.92
57 BuildRequires:  libimobiledevice-devel >= 1.1.5
58 BuildRequires:  libindicate-qt-devel
59 BuildRequires:  liblastfm-devel >= 0.3.3
60 BuildRequires:  libmtp-devel >= 1.0
61 BuildRequires:  libmygpo-qt-devel >= 1.0.7
62 BuildRequires:  libplist-devel
63 %{!?with_static_projectm:BuildRequires: libprojectM-devel >= 1:2.0.1-4}
64 BuildRequires:  libqxt-devel
65 %{?with_libspotify:BuildRequires:       libspotify-devel >= 12.1.45}
66 BuildRequires:  libusbmuxd-devel
67 BuildRequires:  libxml2-devel
68 BuildRequires:  pkgconfig
69 BuildRequires:  pkgconfig
70 BuildRequires:  protobuf-devel
71 BuildRequires:  qca-devel
72 BuildRequires:  qjson-devel
73 BuildRequires:  qt4-build >= %{qtver}
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 %{!?with_static_sqlite:BuildRequires:   sqlite3-devel}
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 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 -n %{name}-%{version}%{subver}
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_INCLUDE_PATH=%{_includedir}/qt4 \
147         -DBUNDLE_PROJECTM_PRESETS=OFF \
148         -DUSE_SYSTEM_QTSINGLEAPPLICATION=ON \
149         -DUSE_SYSTEM_QXT=ON \
150         -DUSE_SYSTEM_PROJECTM=ON \
151         -DSTATIC_SQLITE=%{?with_static_sqlite:ON}%{!?with_static_sqlite:OFF} \
152         -DQTSINGLEAPPLICATION_INCLUDE_DIRS=%{_includedir}/qt4/QtSolutions \
153         ..
154 %{__make}
155
156 %if %{with tests}
157 desktop-file-validate ../dist/%{name}.desktop
158 %endif
159
160 %install
161 rm -rf $RPM_BUILD_ROOT
162 %{__make} -C build install \
163         DESTDIR=$RPM_BUILD_ROOT
164
165 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/kde4/services
166
167 # not in our glibc?
168 rm -r $RPM_BUILD_ROOT%{_localedir}/tr_TR
169 rm -r $RPM_BUILD_ROOT%{_localedir}/he_IL
170 rm -r $RPM_BUILD_ROOT%{_localedir}/mk_MK
171 rm -r $RPM_BUILD_ROOT%{_localedir}/si_LK
172
173 %find_lang %{name} --with-qm
174
175 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps
176 cp -p dist/icons/ubuntu-mono-light/clementine-panel-grey.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel-grey.png
177 cp -p dist/icons/ubuntu-mono-light/clementine-panel.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel.png
178
179 %clean
180 rm -rf $RPM_BUILD_ROOT
181
182 %post
183 %update_desktop_database_post
184 %update_icon_cache hicolor
185
186 %postun
187 %update_desktop_database_postun
188 %update_icon_cache hicolor
189
190 %files -f %{name}.lang
191 %defattr(644,root,root,755)
192 %doc Changelog
193 %attr(755,root,root) %{_bindir}/clementine
194 %attr(755,root,root) %{_bindir}/clementine-tagreader
195 %{_desktopdir}/clementine.desktop
196 %{_iconsdir}/hicolor/*/apps/clementine-panel-grey.png
197 %{_iconsdir}/hicolor/*/apps/clementine-panel.png
198 %{_iconsdir}/hicolor/*/apps/clementine.png
199 %{_iconsdir}/hicolor/*/apps/clementine.svg
200 %{_datadir}/appdata/clementine.appdata.xml
This page took 0.044957 seconds and 4 git commands to generate.