]> git.pld-linux.org Git - packages/clementine.git/blob - clementine.spec
suggest gst flac for .flac support
[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 # - Google Drive support (missing Google sparsehash)
5 # - package for kde4 stuff (or nuke them):
6 #        /usr/share/kde4/services/clementine-feed.protocol
7 #        /usr/share/kde4/services/clementine-itms.protocol
8 #        /usr/share/kde4/services/clementine-itpc.protocol
9 #        /usr/share/kde4/services/clementine-zune.protocol
10 #
11 # Conditional build:
12 %bcond_without  static_sqlite   # with static sqlite3
13 %bcond_with     static_projectm # with static projectM
14 %bcond_with     libspotify      # build with system libspotify instead of downloading blob
15
16 %define         qtver   %(pkg-config --silence-errors --modversion QtCore 2>/dev/null || echo ERROR)
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.1.1
21 Release:        6
22 License:        GPL v3 and GPL v2+
23 Group:          Applications/Multimedia
24 URL:            http://www.clementine-player.org/
25 Source0:        http://clementine-player.googlecode.com/files/%{name}-%{version}.tar.gz
26 # Source0-md5:  28e4afb822388bd337a761db8f86febf
27 Patch0:         desktop-install.patch
28 Patch1:         unbundle-po.patch
29 Patch2:         %{name}-1.1.1-libimobiledevice-fix.patch
30 Patch3:         %{name}-dt_categories.patch
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 #%{?with_static_projectm:BuildRequires: ftgl-devel >= 2.1.3}
45 BuildRequires:  gettext-devel
46 %{?with_static_projectm:BuildRequires:  glew-devel}
47 BuildRequires:  glib2-devel
48 BuildRequires:  gstreamer0.10-devel
49 BuildRequires:  gstreamer0.10-plugins-base-devel
50 BuildRequires:  gtest-devel
51 BuildRequires:  libcdio-devel
52 BuildRequires:  libchromaprint-devel
53 BuildRequires:  libgpod-devel >= 0.7.92
54 BuildRequires:  libimobiledevice-devel >= 1.1.5
55 BuildRequires:  libindicate-qt-devel
56 BuildRequires:  liblastfm-devel >= 0.3.3
57 BuildRequires:  libmtp-devel
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:  libxml2-devel
63 BuildRequires:  pkgconfig
64 BuildRequires:  pkgconfig
65 BuildRequires:  protobuf-devel
66 BuildRequires:  qca-devel
67 BuildRequires:  qjson-devel
68 BuildRequires:  qt4-build >= %{qtver}
69 BuildRequires:  qt4-linguist
70 BuildRequires:  qt4-qmake
71 BuildRequires:  rpmbuild(find_lang) >= 1.33
72 BuildRequires:  rpmbuild(macros) >= 1.596
73 BuildRequires:  sed >= 4.0
74 %{!?with_static_sqlite:BuildRequires:   sqlite3-devel}
75 BuildRequires:  taglib-devel >= 1.6
76 BuildRequires:  usbmuxd-devel
77 Requires(post,postun):  desktop-file-utils
78 Requires(post,postun):  gtk-update-icon-cache
79 Requires(post,postun):  hicolor-icon-theme
80 Requires:       QtSingleApplication >= 2.6-4
81 %{!?with_static_sqlite:Requires:        QtSql-sqlite3 >= %{qtver}}
82 Requires:       gstreamer0.10-audio-effects-base
83 Requires:       gstreamer0.10-mad
84 Suggests:       gstreamer0.10-flac
85 # while we do not link (yet), we use datafiles
86 Requires:       libprojectM
87 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
88
89 # see libprojectM.spec for explanation
90 %define         filterout_ld    -Wl,--as-needed -Wl,--no-copy-dt-needed-entries
91
92 %description
93 Clementine is a modern music player and library organiser. It is
94 largely a port of Amarok 1.4, with some features rewritten to take
95 advantage of Qt4.
96
97 %description -l hu.UTF-8
98 Clementine egy modern zenelejátszó és gyűjtemény kezelő. Túlnyomórészt
99 az Amarok 1.4 port-ja, néhány funkciója újraírva, hogy kihasználhassa
100 a Qt4 előnyeit.
101
102 %prep
103 %setup -q
104 %patch0 -p1
105 %patch1 -p1
106 %patch2 -p1
107 %patch3 -p1
108
109 # We already don't use these but just to make sure
110 rm -rf 3rdparty/gmock
111 %{!?with_static_sqlite:rm -rf 3rdparty/qsqlite}
112 rm -rf 3rdparty/qtsingleapplication
113 rm -rf 3rdparty/qxt
114 rm -rf 3rdparty/qtiocompressor
115 %{!?with_static_projectm:rm -rf 3rdparty/libprojectM}
116
117 # Don't build tests. They require gmock
118 sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
119 # remove -Wall
120 sed -i -e 's/-Wall//' src/CMakeLists.txt
121 # ...and -Werror
122 sed -i -e 's/-Werror//' src/CMakeLists.txt
123
124 %build
125 install -d build
126 install -d build/src/translations
127 cd build
128 # as our buildtype is not Release, need to pass these manually. see CMakeLists.txt ~125
129 CXXFLAGS="%{rpmcxxflags} -DNDEBUG -DQT_NO_DEBUG_OUTPUT"
130 %cmake \
131         -DBUNDLE_PROJECTM_PRESETS=OFF \
132         -DUSE_SYSTEM_QTSINGLEAPPLICATION=ON \
133         -DQTSINGLEAPPLICATION_INCLUDE_DIRS=%{_includedir}/qt4/QtSolutions/ \
134         -DUSE_SYSTEM_QXT=ON \
135         -DUSE_SYSTEM_PROJECTM=ON \
136         -DSTATIC_SQLITE=%{?with_static_sqlite:ON}%{!?with_static_sqlite:OFF} \
137         ..
138 %{__make}
139
140 %install
141 rm -rf $RPM_BUILD_ROOT
142 %{__make} -C build install \
143         DESTDIR=$RPM_BUILD_ROOT
144
145 rm $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps/application-x-clementine.svg
146
147 # not in our glibc?
148 rm -r $RPM_BUILD_ROOT%{_localedir}/tr_TR
149
150 %find_lang %{name} --with-qm
151
152 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps
153 cp -a dist/icons/ubuntu-mono-light/clementine-panel-grey.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel-grey.png
154 cp -a dist/icons/ubuntu-mono-light/clementine-panel.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel.png
155
156 %clean
157 rm -rf $RPM_BUILD_ROOT
158
159 %post
160 %update_desktop_database_post
161 %update_icon_cache hicolor
162
163 %postun
164 %update_desktop_database_postun
165 %update_icon_cache hicolor
166
167 %files -f %{name}.lang
168 %defattr(644,root,root,755)
169 %doc Changelog
170 %attr(755,root,root) %{_bindir}/clementine
171 %attr(755,root,root) %{_bindir}/clementine-tagreader
172 %{_desktopdir}/clementine.desktop
173 %{_pixmapsdir}/clementine.png
174 %{_iconsdir}/hicolor/*/apps/clementine-panel-grey.png
175 %{_iconsdir}/hicolor/*/apps/clementine-panel.png
This page took 0.047717 seconds and 4 git commands to generate.