]> git.pld-linux.org Git - packages/clementine.git/blob - clementine.spec
fix unhandled locales
[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 # - 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         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.2.1
21 Release:        1
22 License:        GPL v3 and GPL v2+
23 Group:          Applications/Multimedia
24 Source0:        http://clementine-player.googlecode.com/files/%{name}-%{version}.tar.gz
25 # Source0-md5:  5d079e12f5925845cc7e38ce2f4a1e20
26 Patch0:         desktop-install.patch
27 Patch1:         unbundle-po.patch
28 Patch3:         %{name}-dt_categories.patch
29 Patch4:         %{name}-mygpo.patch
30 Patch5:         %{name}-desktop.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:  desktop-file-utils
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:  libcdio-devel
53 BuildRequires:  libchromaprint-devel
54 BuildRequires:  libechonest-devel
55 BuildRequires:  libgpod-devel >= 0.7.92
56 BuildRequires:  libimobiledevice-devel >= 1.1.5
57 BuildRequires:  libindicate-qt-devel
58 BuildRequires:  liblastfm-devel >= 0.3.3
59 BuildRequires:  libmtp-devel
60 BuildRequires:  libmygpo-qt-devel >= 1.0.7
61 BuildRequires:  libplist-devel
62 %{!?with_static_projectm:BuildRequires: libprojectM-devel >= 1:2.0.1-4}
63 BuildRequires:  libqxt-devel
64 %{?with_libspotify:BuildRequires:       libspotify-devel >= 12.1.45}
65 BuildRequires:  libxml2-devel
66 BuildRequires:  pkgconfig
67 BuildRequires:  pkgconfig
68 BuildRequires:  protobuf-devel
69 BuildRequires:  qca-devel
70 BuildRequires:  qjson-devel
71 BuildRequires:  qt4-build >= %{qtver}
72 BuildRequires:  qt4-linguist
73 BuildRequires:  qt4-qmake
74 BuildRequires:  rpmbuild(find_lang) >= 1.33
75 BuildRequires:  rpmbuild(macros) >= 1.596
76 BuildRequires:  sed >= 4.0
77 BuildRequires:  sparsehash-devel
78 %{!?with_static_sqlite:BuildRequires:   sqlite3-devel}
79 BuildRequires:  taglib-devel >= 1.6
80 BuildRequires:  usbmuxd-devel
81 Requires(post,postun):  desktop-file-utils
82 Requires(post,postun):  gtk-update-icon-cache
83 Requires(post,postun):  hicolor-icon-theme
84 Requires:       QtSingleApplication >= 2.6-4
85 %{!?with_static_sqlite:Requires:        QtSql-sqlite3 >= %{qtver}}
86 Requires:       gstreamer0.10-audio-effects-base
87 Requires:       gstreamer0.10-mad
88 Suggests:       gstreamer0.10-flac
89 # if we do not link, we use datafiles
90 %{!?with_static_projectm:Requires:      libprojectM}
91 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
92
93 # see libprojectM.spec for explanation
94 %define         filterout_ld    -Wl,--as-needed -Wl,--no-copy-dt-needed-entries
95
96 %description
97 Clementine is a modern music player and library organiser. It is
98 largely a port of Amarok 1.4, with some features rewritten to take
99 advantage of Qt4.
100
101 %description -l hu.UTF-8
102 Clementine egy modern zenelejátszó és gyűjtemény kezelő. Túlnyomórészt
103 az Amarok 1.4 port-ja, néhány funkciója újraírva, hogy kihasználhassa
104 a Qt4 előnyeit.
105
106 %prep
107 %setup -q
108 %patch0 -p1
109 %patch1 -p1
110 %patch3 -p1
111 %patch4 -p1
112 %patch5 -p1
113
114 # Remove all 3rdparty libraries except:
115 # - universalchardet - not available as a separate library.
116 # - libprojectM - see bcond
117 # - sha2 - ?
118 # - qocoa - ?
119 # - qsqlite - see bcond
120 mv 3rdparty 3rdparty.keep
121 install -d 3rdparty
122 mv 3rdparty.keep/{sha2,qocoa%{?with_static_sqlite:,qsqlite}%{?with_static_projectm:,libprojectm}} 3rdparty
123
124 # Don't build tests. They require gmock
125 sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
126 # remove -Wall
127 sed -i -e 's/-Wall//' src/CMakeLists.txt
128 # ...and -Werror
129 sed -i -e 's/-Werror//' src/CMakeLists.txt
130
131 %build
132 install -d build
133 install -d build/src/translations
134 cd build
135 # as our buildtype is not Release, need to pass these manually. see CMakeLists.txt ~125
136 CXXFLAGS="%{rpmcxxflags} -DNDEBUG -DQT_NO_DEBUG_OUTPUT"
137 %cmake \
138         -DBUNDLE_PROJECTM_PRESETS=OFF \
139         -DUSE_SYSTEM_QTSINGLEAPPLICATION=ON \
140         -DQTSINGLEAPPLICATION_INCLUDE_DIRS=%{_includedir}/qt4/QtSolutions/ \
141         -DUSE_SYSTEM_QXT=ON \
142         -DUSE_SYSTEM_PROJECTM=ON \
143         -DSTATIC_SQLITE=%{?with_static_sqlite:ON}%{!?with_static_sqlite:OFF} \
144         ..
145 %{__make}
146
147 %if %{with tests}
148 desktop-file-validate ../dist/%{name}.desktop
149 %endif
150
151 %install
152 rm -rf $RPM_BUILD_ROOT
153 %{__make} -C build install \
154         DESTDIR=$RPM_BUILD_ROOT
155
156 rm $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps/application-x-clementine.svg
157
158 # not in our glibc?
159 rm -r $RPM_BUILD_ROOT%{_localedir}/tr_TR
160 rm -r $RPM_BUILD_ROOT%{_localedir}/he_IL
161 rm -r $RPM_BUILD_ROOT%{_localedir}/mk_MK
162 rm -r $RPM_BUILD_ROOT%{_localedir}/si_LK
163
164 %find_lang %{name} --with-qm
165
166 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps
167 cp -p dist/icons/ubuntu-mono-light/clementine-panel-grey.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel-grey.png
168 cp -p dist/icons/ubuntu-mono-light/clementine-panel.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel.png
169
170 %clean
171 rm -rf $RPM_BUILD_ROOT
172
173 %post
174 %update_desktop_database_post
175 %update_icon_cache hicolor
176
177 %postun
178 %update_desktop_database_postun
179 %update_icon_cache hicolor
180
181 %files -f %{name}.lang
182 %defattr(644,root,root,755)
183 %doc Changelog
184 %attr(755,root,root) %{_bindir}/clementine
185 %attr(755,root,root) %{_bindir}/clementine-tagreader
186 %{_desktopdir}/clementine.desktop
187 %{_pixmapsdir}/clementine.png
188 %{_iconsdir}/hicolor/*/apps/clementine-panel-grey.png
189 %{_iconsdir}/hicolor/*/apps/clementine-panel.png
This page took 0.07454 seconds and 4 git commands to generate.