]> git.pld-linux.org Git - packages/clementine.git/blob - clementine.spec
- release 9 (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         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:        9
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 Patch4:         moc.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 >= 2.3
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:  boost-devel
42 BuildRequires:  cmake >= 2.6
43 BuildRequires:  cryptopp-devel >= 5.6.1-4
44 BuildRequires:  desktop-file-utils
45 BuildRequires:  gettext-tools
46 %{?with_static_projectm:BuildRequires:  glew-devel}
47 BuildRequires:  glib2-devel
48 BuildRequires:  gstreamer-devel
49 BuildRequires:  gstreamer-plugins-base-devel
50 BuildRequires:  gtest-devel
51 BuildRequires:  libcdio-devel
52 BuildRequires:  libchromaprint-devel
53 BuildRequires:  libechonest-devel
54 BuildRequires:  libgpod-devel >= 0.7.92
55 BuildRequires:  libimobiledevice-devel >= 1.1.5
56 BuildRequires:  liblastfm-devel >= 0.3.3
57 BuildRequires:  libmtp-devel >= 1.0
58 BuildRequires:  libmygpo-qt-devel >= 1.0.7
59 BuildRequires:  libplist-devel
60 %{!?with_static_projectm:BuildRequires: libprojectM-devel >= 1:2.0.1-4}
61 BuildRequires:  libqxt-devel
62 %{?with_libspotify:BuildRequires:       libspotify-devel >= 12.1.45}
63 BuildRequires:  libusbmuxd-devel
64 BuildRequires:  libxml2-devel
65 BuildRequires:  pkgconfig
66 BuildRequires:  pkgconfig
67 BuildRequires:  protobuf-devel
68 BuildRequires:  qjson-devel
69 BuildRequires:  qt4-build >= %{qtver}
70 BuildRequires:  qt4-linguist
71 BuildRequires:  qt4-qmake
72 BuildRequires:  rpmbuild(find_lang) >= 1.38
73 BuildRequires:  rpmbuild(macros) >= 1.596
74 BuildRequires:  sed >= 4.0
75 BuildRequires:  sparsehash-devel
76 BuildRequires:  sqlite3-devel >= %{sqlitever}
77 BuildRequires:  taglib-devel >= 1.8
78 BuildRequires:  tar >= 1:1.22
79 BuildRequires:  xz
80 Requires(post,postun):  desktop-file-utils
81 Requires(post,postun):  gtk-update-icon-cache
82 Requires(post,postun):  hicolor-icon-theme
83 BuildRequires:  sqlite3 >= %{sqlitever}
84 Requires:       QtSingleApplication >= 2.6-4
85 Requires:       QtSql-sqlite3 >= %{qtver}
86 Requires:       gstreamer-audio-effects-base
87 Suggests:       gstreamer-flac
88 Suggests:       gstreamer-libav
89 Suggests:       gstreamer-mpg123
90 # if we do not link, we use datafiles
91 %{!?with_static_projectm:Requires:      libprojectM}
92 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
93
94 # see libprojectM.spec for explanation
95 %define         filterout_ld    -Wl,--as-needed -Wl,--no-copy-dt-needed-entries
96
97 %description
98 Clementine is a modern music player and library organiser. It is
99 largely a port of Amarok 1.4, with some features rewritten to take
100 advantage of Qt4.
101
102 %description -l hu.UTF-8
103 Clementine egy modern zenelejátszó és gyűjtemény kezelő. Túlnyomórészt
104 az Amarok 1.4 port-ja, néhány funkciója újraírva, hogy kihasználhassa
105 a Qt4 előnyeit.
106
107 %prep
108 %setup -q
109 %patch1 -p1
110 %patch2 -p1
111 #%patch3 -p1
112 %patch4 -p1
113
114 # cleanup vendor. keep only needed libraries.
115 mv 3rdparty 3rdparty.dist
116 vendor() {
117         local path dir
118         for path; do
119                 dir=$(dirname $path)
120                 test -d 3rdparty/$dir || mkdir -p 3rdparty/$dir
121                 mv 3rdparty.dist/$path 3rdparty/$path
122         done
123 }
124 vendor sha2 qocoa
125 vendor qsqlite
126 %{?with_static_projectm:vendor libprojectm}
127 # missing in pld
128 vendor vreen
129 # requires 1.0.9, but only 1.0.8 is released
130 vendor libmygpo-qt
131
132 # Don't build tests. They require gmock
133 sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
134 # remove -Wall
135 sed -i -e 's/-Wall//' src/CMakeLists.txt
136
137 %build
138 install -d build
139 install -d build/src/translations
140 cd build
141 # as our buildtype is not Release, need to pass these manually. see CMakeLists.txt ~135
142 CXXFLAGS="%{rpmcxxflags} -fpermissive -DNDEBUG -DQT_NO_DEBUG_OUTPUT"
143 %cmake \
144         -DBUILD_WERROR:BOOL=OFF \
145         -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
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         -DQTSINGLEAPPLICATION_INCLUDE_DIRS=%{_includedir}/qt4/QtSolutions \
152         ..
153 %{__make}
154
155 desktop-file-validate ../dist/%{name}.desktop
156
157 %if %{with tests}
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.109951 seconds and 3 git commands to generate.