]>
Commit | Line | Data |
---|---|---|
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 | # | |
5 | # Conditional build: | |
6 | %bcond_without static_sqlite # with static sqlite3 | |
7 | %bcond_with static_projectm # with static projectM | |
8 | ||
9 | %define qtver %(pkg-config --silence-errors --modversion QtCore 2>/dev/null || echo ERROR) | |
10 | Summary: A music player and library organiser | |
11 | Summary(hu.UTF-8): Egy zenelejátszó és gyűjtemény-kezelő | |
12 | Name: clementine | |
13 | Version: 1.0.1 | |
14 | Release: 1 | |
15 | License: GPL v3 and GPL v2+ | |
16 | Group: Applications/Multimedia | |
17 | URL: http://www.clementine-player.org/ | |
18 | Source0: http://clementine-player.googlecode.com/files/%{name}-%{version}.tar.gz | |
19 | # Source0-md5: 54dc47eb2de5960cd1654e1249a59bc6 | |
20 | Patch0: desktop-install.patch | |
21 | Patch1: unbundle-po.patch | |
22 | BuildRequires: QtCore-devel >= %{qtver} | |
23 | BuildRequires: QtDBus-devel >= %{qtver} | |
24 | BuildRequires: QtGui-devel >= %{qtver} | |
25 | BuildRequires: QtIOCompressor-devel | |
26 | BuildRequires: QtNetwork-devel >= %{qtver} | |
27 | BuildRequires: QtOpenGL-devel >= %{qtver} | |
28 | BuildRequires: QtSingleApplication-devel >= 2.6-4 | |
29 | BuildRequires: QtSql-devel >= %{qtver} | |
30 | %{?with_tests:BuildRequires: QtTest-devel >= %{qtver}} | |
31 | BuildRequires: QtXml-devel >= %{qtver} | |
32 | BuildRequires: boost-devel | |
33 | BuildRequires: cmake >= 2.6 | |
34 | #%{?with_static_projectm:BuildRequires: ftgl-devel >= 2.1.3} | |
35 | BuildRequires: gettext-devel | |
36 | %{?with_static_projectm:BuildRequires: glew-devel} | |
37 | BuildRequires: glib2-devel | |
38 | BuildRequires: gstreamer-devel >= 0.10 | |
39 | BuildRequires: gtest-devel | |
40 | BuildRequires: libgpod-devel >= 0.7.92 | |
41 | BuildRequires: libimobiledevice-devel | |
42 | BuildRequires: libindicate-qt-devel | |
43 | BuildRequires: liblastfm-devel >= 0.3.3 | |
44 | BuildRequires: libmtp-devel | |
45 | BuildRequires: libplist-devel | |
46 | %{!?with_static_projectm:BuildRequires: libprojectM-devel >= 1:2.0.1-4} | |
47 | BuildRequires: libqxt-devel | |
48 | BuildRequires: libxml2-devel | |
49 | BuildRequires: pkgconfig | |
50 | BuildRequires: pkgconfig | |
51 | BuildRequires: protobuf-devel | |
52 | BuildRequires: qjson-devel | |
53 | BuildRequires: qt4-build >= %{qtver} | |
54 | BuildRequires: qt4-linguist | |
55 | BuildRequires: qt4-qmake | |
56 | BuildRequires: rpmbuild(find_lang) >= 1.33 | |
57 | BuildRequires: rpmbuild(macros) >= 1.596 | |
58 | BuildRequires: sed >= 4.0 | |
59 | %{!?with_static_sqlite:BuildRequires: sqlite3-devel} | |
60 | BuildRequires: taglib-devel >= 1.6 | |
61 | BuildRequires: usbmuxd-devel | |
62 | Requires(post,postun): desktop-file-utils | |
63 | Requires(post,postun): gtk-update-icon-cache | |
64 | Requires(post,postun): hicolor-icon-theme | |
65 | Requires: QtSingleApplication >= 2.6-4 | |
66 | %{!?with_static_sqlite:Requires: QtSql-sqlite3 >= %{qtver}} | |
67 | Requires: gstreamer-audio-effects-base | |
68 | # while we do not link (yet), we use datafiles | |
69 | Requires: libprojectM | |
70 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
71 | ||
72 | # see libprojectM.spec for explanation | |
73 | %define filterout_ld -Wl,--as-needed -Wl,--no-copy-dt-needed-entries | |
74 | ||
75 | %description | |
76 | Clementine is a modern music player and library organiser. It is | |
77 | largely a port of Amarok 1.4, with some features rewritten to take | |
78 | advantage of Qt4. | |
79 | ||
80 | %description -l hu.UTF-8 | |
81 | Clementine egy modern zenelejátszó és gyűjtemény kezelő. Túlnyomórészt | |
82 | az Amarok 1.4 port-ja, néhány funkciója újraírva, hogy kihasználhassa | |
83 | a Qt4 előnyeit. | |
84 | ||
85 | %prep | |
86 | %setup -q -n %{name}-%{version} | |
87 | %patch0 -p1 | |
88 | %patch1 -p1 | |
89 | ||
90 | # We already don't use these but just to make sure | |
91 | rm -rf 3rdparty/gmock | |
92 | %{!?with_static_sqlite:rm -rf 3rdparty/qsqlite} | |
93 | rm -rf 3rdparty/qtsingleapplication | |
94 | rm -rf 3rdparty/qxt | |
95 | rm -rf 3rdparty/qtiocompressor | |
96 | %{!?with_static_projectm:rm -rf 3rdparty/libprojectM} | |
97 | ||
98 | # Don't build tests. They require gmock | |
99 | sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt | |
100 | # remove -Wall | |
101 | sed -i -e 's/-Wall//' src/CMakeLists.txt | |
102 | ||
103 | %build | |
104 | install -d build | |
105 | install -d build/src/translations | |
106 | cd build | |
107 | %cmake \ | |
108 | -DBUNDLE_PROJECTM_PRESETS=OFF \ | |
109 | -DUSE_SYSTEM_QTSINGLEAPPLICATION=ON \ | |
110 | -DQTSINGLEAPPLICATION_INCLUDE_DIRS=%{_includedir}/qt4/QtSolutions/ \ | |
111 | -DUSE_SYSTEM_QXT=ON \ | |
112 | -DUSE_SYSTEM_PROJECTM=ON \ | |
113 | -DSTATIC_SQLITE=%{?with_static_sqlite:ON}%{!?with_static_sqlite:OFF} \ | |
114 | .. | |
115 | %{__make} | |
116 | ||
117 | %install | |
118 | rm -rf $RPM_BUILD_ROOT | |
119 | %{__make} -C build install \ | |
120 | DESTDIR=$RPM_BUILD_ROOT | |
121 | ||
122 | rm $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps/application-x-clementine.svg | |
123 | ||
124 | %find_lang %{name} --with-qm | |
125 | ||
126 | install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps | |
127 | cp -a dist/icons/ubuntu-mono-light/clementine-panel-grey.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel-grey.png | |
128 | cp -a dist/icons/ubuntu-mono-light/clementine-panel.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel.png | |
129 | ||
130 | %clean | |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
133 | %post | |
134 | %update_desktop_database_post | |
135 | %update_icon_cache hicolor | |
136 | ||
137 | %postun | |
138 | %update_desktop_database_postun | |
139 | %update_icon_cache hicolor | |
140 | ||
141 | %files -f %{name}.lang | |
142 | %defattr(644,root,root,755) | |
143 | %doc Changelog | |
144 | %attr(755,root,root) %{_bindir}/clementine | |
145 | %{_desktopdir}/clementine.desktop | |
146 | %{_pixmapsdir}/clementine.png | |
147 | %{_iconsdir}/hicolor/*/apps/clementine-panel-grey.png | |
148 | %{_iconsdir}/hicolor/*/apps/clementine-panel.png |