]> git.pld-linux.org Git - packages/clementine.git/blob - clementine.spec
rebuild with built in debug
[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:        5
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 BuildRequires:  QtCore-devel >= %{qtver}
31 BuildRequires:  QtDBus-devel >= %{qtver}
32 BuildRequires:  QtGui-devel >= %{qtver}
33 BuildRequires:  QtIOCompressor-devel
34 BuildRequires:  QtNetwork-devel >= %{qtver}
35 BuildRequires:  QtOpenGL-devel >= %{qtver}
36 BuildRequires:  QtSingleApplication-devel >= 2.6-4
37 BuildRequires:  QtSql-devel >= %{qtver}
38 %{?with_tests:BuildRequires:    QtTest-devel >= %{qtver}}
39 BuildRequires:  QtXml-devel >= %{qtver}
40 BuildRequires:  boost-devel
41 BuildRequires:  cmake >= 2.6
42 #%{?with_static_projectm:BuildRequires: ftgl-devel >= 2.1.3}
43 BuildRequires:  gettext-devel
44 %{?with_static_projectm:BuildRequires:  glew-devel}
45 BuildRequires:  glib2-devel
46 BuildRequires:  gstreamer0.10-devel
47 BuildRequires:  gstreamer0.10-plugins-base-devel
48 BuildRequires:  gtest-devel
49 BuildRequires:  libgpod-devel >= 0.7.92
50 BuildRequires:  libimobiledevice-devel
51 BuildRequires:  libindicate-qt-devel
52 BuildRequires:  liblastfm-devel >= 0.3.3
53 BuildRequires:  libmtp-devel
54 BuildRequires:  libplist-devel
55 %{!?with_static_projectm:BuildRequires: libprojectM-devel >= 1:2.0.1-4}
56 BuildRequires:  libqxt-devel
57 BuildRequires:  libxml2-devel
58 BuildRequires:  pkgconfig
59 BuildRequires:  pkgconfig
60 BuildRequires:  protobuf-devel
61 BuildRequires:  qca-devel
62 BuildRequires:  qjson-devel
63 BuildRequires:  qt4-build >= %{qtver}
64 BuildRequires:  qt4-linguist
65 BuildRequires:  qt4-qmake
66 BuildRequires:  rpmbuild(find_lang) >= 1.33
67 BuildRequires:  rpmbuild(macros) >= 1.596
68 BuildRequires:  sed >= 4.0
69 %{!?with_static_sqlite:BuildRequires:   sqlite3-devel}
70 BuildRequires:  taglib-devel >= 1.6
71 BuildRequires:  usbmuxd-devel
72 Requires(post,postun):  desktop-file-utils
73 Requires(post,postun):  gtk-update-icon-cache
74 Requires(post,postun):  hicolor-icon-theme
75 Requires:       QtSingleApplication >= 2.6-4
76 %{!?with_static_sqlite:Requires:        QtSql-sqlite3 >= %{qtver}}
77 Requires:       gstreamer0.10-audio-effects-base
78 Requires:       gstreamer0.10-mad
79 # while we do not link (yet), we use datafiles
80 Requires:       libprojectM
81 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
82
83 # see libprojectM.spec for explanation
84 %define         filterout_ld    -Wl,--as-needed -Wl,--no-copy-dt-needed-entries
85
86 %description
87 Clementine is a modern music player and library organiser. It is
88 largely a port of Amarok 1.4, with some features rewritten to take
89 advantage of Qt4.
90
91 %description -l hu.UTF-8
92 Clementine egy modern zenelejátszó és gyűjtemény kezelő. Túlnyomórészt
93 az Amarok 1.4 port-ja, néhány funkciója újraírva, hogy kihasználhassa
94 a Qt4 előnyeit.
95
96 %prep
97 %setup -q
98 %patch0 -p1
99 %patch1 -p1
100
101 # We already don't use these but just to make sure
102 rm -rf 3rdparty/gmock
103 %{!?with_static_sqlite:rm -rf 3rdparty/qsqlite}
104 rm -rf 3rdparty/qtsingleapplication
105 rm -rf 3rdparty/qxt
106 rm -rf 3rdparty/qtiocompressor
107 %{!?with_static_projectm:rm -rf 3rdparty/libprojectM}
108
109 # Don't build tests. They require gmock
110 sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
111 # remove -Wall
112 sed -i -e 's/-Wall//' src/CMakeLists.txt
113 # ...and -Werror
114 sed -i -e 's/-Werror//' src/CMakeLists.txt
115
116 %build
117 install -d build
118 install -d build/src/translations
119 cd build
120 # as our buildtype is not Release, need to pass these manually. see CMakeLists.txt ~125
121 CXXFLAGS="%{rpmcxxflags} -DNDEBUG -DQT_NO_DEBUG_OUTPUT"
122 %cmake \
123         -DBUNDLE_PROJECTM_PRESETS=OFF \
124         -DUSE_SYSTEM_QTSINGLEAPPLICATION=ON \
125         -DQTSINGLEAPPLICATION_INCLUDE_DIRS=%{_includedir}/qt4/QtSolutions/ \
126         -DUSE_SYSTEM_QXT=ON \
127         -DUSE_SYSTEM_PROJECTM=ON \
128         -DSTATIC_SQLITE=%{?with_static_sqlite:ON}%{!?with_static_sqlite:OFF} \
129         ..
130 %{__make}
131
132 %install
133 rm -rf $RPM_BUILD_ROOT
134 %{__make} -C build install \
135         DESTDIR=$RPM_BUILD_ROOT
136
137 rm $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps/application-x-clementine.svg
138
139 # not in our glibc?
140 rm -r $RPM_BUILD_ROOT%{_localedir}/tr_TR
141
142 %find_lang %{name} --with-qm
143
144 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps
145 cp -a dist/icons/ubuntu-mono-light/clementine-panel-grey.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel-grey.png
146 cp -a dist/icons/ubuntu-mono-light/clementine-panel.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel.png
147
148 %clean
149 rm -rf $RPM_BUILD_ROOT
150
151 %post
152 %update_desktop_database_post
153 %update_icon_cache hicolor
154
155 %postun
156 %update_desktop_database_postun
157 %update_icon_cache hicolor
158
159 %files -f %{name}.lang
160 %defattr(644,root,root,755)
161 %doc Changelog
162 %attr(755,root,root) %{_bindir}/clementine
163 %attr(755,root,root) %{_bindir}/clementine-tagreader
164 %{_desktopdir}/clementine.desktop
165 %{_pixmapsdir}/clementine.png
166 %{_iconsdir}/hicolor/*/apps/clementine-panel-grey.png
167 %{_iconsdir}/hicolor/*/apps/clementine-panel.png
This page took 0.036185 seconds and 4 git commands to generate.