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