]> git.pld-linux.org Git - packages/cantata.git/blob - cantata.spec
take lrelease path from cmake config
[packages/cantata.git] / cantata.spec
1 # TODO
2 # - handle /usr/share/cantata/fonts/fontawesome-4.3.0.ttf
3 #
4 # Conditional build:
5 %bcond_without  udisks  # UDisks support
6 %bcond_with     musicbrainz     # musicbrainz5
7
8 %define         qtver   5.11
9
10 Summary:        Music Player Daemon (MPD) graphical client
11 Name:           cantata
12 Version:        2.4.2
13 Release:        1
14 License:        GPL v2+
15 Group:          Applications/Multimedia
16 # https://github.com/CDrummond/cantata/releases
17 Source0:        https://github.com/CDrummond/cantata/releases/download/v%{version}/%{name}-%{version}.tar.bz2
18 # Source0-md5:  83b6a2504f1fa40e88d06272aab9f512
19 Patch0:         %{name}-lrelease.patch
20 Patch101:       system-qtiocompressor.patch
21 Patch105:       icons_crash.patch
22 Patch106:       libdir.patch
23 URL:            https://github.com/cdrummond/cantata
24 BuildRequires:  Qt5Concurrent-devel >= %{qtver}
25 BuildRequires:  Qt5Core-devel >= %{qtver}
26 BuildRequires:  Qt5DBus-devel >= %{qtver}
27 BuildRequires:  Qt5Gui-devel >= %{qtver}
28 BuildRequires:  Qt5IOCompressor-devel
29 BuildRequires:  Qt5Network-devel >= %{qtver}
30 BuildRequires:  Qt5Sql-devel >= %{qtver}
31 BuildRequires:  Qt5Svg-devel >= %{qtver}
32 BuildRequires:  Qt5Widgets-devel >= %{qtver}
33 BuildRequires:  Qt5Xml-devel >= %{qtver}
34 BuildRequires:  avahi-devel
35 BuildRequires:  cmake >= 2.6
36 BuildRequires:  desktop-file-utils
37 BuildRequires:  libcddb-devel
38 BuildRequires:  libcdio-paranoia-devel
39 BuildRequires:  libmtp-devel >= 1.1.0
40 %{?with_musicbrainz:BuildRequires:      libmusicbrainz5-devel}
41 # C++11
42 BuildRequires:  libstdc++-devel >= 6:4.7
43 BuildRequires:  media-player-info
44 BuildRequires:  pkgconfig
45 BuildRequires:  qt5-build >= %{qtver}
46 BuildRequires:  qt5-linguist >= %{qtver}
47 BuildRequires:  qt5-qmake >= %{qtver}
48 BuildRequires:  rpmbuild(find_lang) >= 1.37
49 BuildRequires:  rpmbuild(macros) >= 1.596
50 BuildRequires:  systemd-devel
51 BuildRequires:  taglib-devel >= 1.6
52 BuildRequires:  vlc-devel
53 BuildRequires:  zlib-devel
54 Requires:       Qt5Concurrent >= %{qtver}
55 Requires:       Qt5Core >= %{qtver}
56 Requires:       Qt5DBus >= %{qtver}
57 Requires:       Qt5Gui >= %{qtver}
58 Requires:       Qt5Network >= %{qtver}
59 Requires:       Qt5Sql >= %{qtver}
60 Requires:       Qt5Sql-sqldriver-sqlite3 >= %{qtver}
61 Requires:       Qt5Svg >= %{qtver}
62 Requires:       Qt5Widgets >= %{qtver}
63 Requires:       Qt5Xml >= %{qtver}
64 Requires:       gtk-update-icon-cache
65 Requires:       hicolor-icon-theme
66 Requires:       libmtp >= 1.1.0
67 Requires:       media-player-info
68 Requires:       taglib >= 1.6
69 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70
71 %description
72 Cantata is a graphical client for the music player daemon (MPD).
73
74 Features:
75 - Multiple MPD collections.
76 - Highly customisable layout.
77 - Songs grouped by album in play queue.
78 - Context view to show artist, album, and song information of current
79   track.
80 - Simple tag editor.
81 - File organizer - use tags to organize files and folders.
82 - Ability to calculate ReplyGain tags.
83 - Dynamic playlists.
84 - Online services; Jamendo, Magnatune, SoundCloud, and Podcasts.
85 - Radio stream support - with the ability to search for streams via
86   TuneIn and ShoutCast.
87 - USB-Mass-Storage and MTP device support.
88 - Audio CD ripping and playback.
89 - Playback of non-MPD songs, via simple in-built HTTP server.
90 - MPRISv2 DBUS interface.
91 - Support for KDE global shortcuts (KDE builds), GNOME media keys, and
92   generic media keys (via Qxt support)
93 - Ubuntu/ambiance theme integration.
94
95 %prep
96 %setup -q
97 %patch0 -p1
98
99 %patch101 -p1
100 rm -rfv 3rdparty/{qjson,qtiocompressor}
101
102 rm -rfv 3rdparty/{qtsingleapplication,qxt}
103 sed -i.system-qxt-headers -e 's|^#include "qxt/qxtglobalshortcut.h"|#include <QxtGlobalShortcut>|g' \
104         gui/qxtmediakeys.cpp
105
106 #%patch105 -p1
107 %patch106 -p1
108
109 %build
110 install -d build
111 cd build
112 CXXFLAGS="%{rpmcxxflags} -I/usr/include/qt5/QtSolutions"
113 %cmake \
114         -DCANTATA_HELPERS_LIB_DIR=%{_lib} \
115         -DENABLE_FFMPEG:BOOL=OFF \
116         -DENABLE_LIBVLC=ON \
117         -DENABLE_MPG123:BOOL=OFF \
118         -DENABLE_MUSICBRAINZ=%{?with_musicbrainz:ON}%{!?with_musicbrainz:OFF} \
119         -DENABLE_UDISKS2:BOOL=%{?with_udisks:ON}%{!?with_udisks:OFF} \
120         ..
121
122 %{__make}
123
124 %install
125 rm -rf $RPM_BUILD_ROOT
126 %{__make} install/fast -C build \
127         DESTDIR=$RPM_BUILD_ROOT
128
129 %find_lang %{name} --with-qm
130
131 desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/cantata.desktop
132
133 %clean
134 rm -rf $RPM_BUILD_ROOT
135
136 %post
137 %update_desktop_database
138 %update_icon_cache hicolor
139
140 %postun
141 %update_desktop_database
142 %update_icon_cache hicolor
143
144 %files -f %{name}.lang
145 %defattr(644,root,root,755)
146 %doc AUTHORS ChangeLog LICENSE README TODO
147 %attr(755,root,root) %{_bindir}/cantata
148 %dir %{_libdir}/%{name}
149 %attr(755,root,root) %{_libdir}/%{name}/cantata-tags
150 %{_desktopdir}/cantata.desktop
151 %{_iconsdir}/hicolor/*/*/*.png
152 %{_iconsdir}/hicolor/*/*/*.svg
153 %dir %{_datadir}/%{name}
154 %dir %{_datadir}/%{name}/translations
155 #%{_datadir}/%{name}/config
156 %{_datadir}/%{name}/icons
157 #%{_datadir}/%{name}/mpd
158 %{_datadir}/%{name}/scripts
159 #%{_datadir}/%{name}/themes
This page took 0.057983 seconds and 4 git commands to generate.