]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without qt4 # Qt4 Phonon backend | |
4 | %bcond_without qt5 # Qt5 Phonon (Phonon4Qt5) backend | |
5 | ||
6 | %define phonon_ver 4.7.0 | |
7 | %define qt4_ver 4.7.1 | |
8 | %define qt5_ver 4.7.1 | |
9 | %define kdever 4.5.5 | |
10 | %define vlc_ver 2.0.1 | |
11 | ||
12 | Summary: VLC backend for Phonon | |
13 | Summary(pl.UTF-8): Wtyczka VLC dla Phonona | |
14 | Name: phonon-backend-vlc | |
15 | Version: 0.8.2 | |
16 | Release: 3 | |
17 | License: LGPL v2.1+ | |
18 | Group: X11/Applications | |
19 | Source0: http://download.kde.org/stable/phonon/phonon-backend-vlc/%{version}/src/%{name}-%{version}.tar.xz | |
20 | # Source0-md5: 3937517ce4929dea4398ad9834507f97 | |
21 | #URL: http:// | |
22 | BuildRequires: cmake >= 2.8.6 | |
23 | BuildRequires: vlc-devel >= %{vlc_ver} | |
24 | BuildRequires: rpmbuild(macros) >= 1.605 | |
25 | %if %{with qt4} | |
26 | BuildRequires: QtCore-devel >= %{qt4_ver} | |
27 | BuildRequires: QtGui-devel >= %{qt4_ver} | |
28 | BuildRequires: phonon-devel >= %{phonon_ver} | |
29 | BuildRequires: qt4-build >= %{qt4_ver} | |
30 | BuildRequires: qt4-qmake >= %{qt4_ver} | |
31 | %endif | |
32 | %if %{with qt5} | |
33 | BuildRequires: Qt5Core-devel >= %{qt5_ver} | |
34 | BuildRequires: Qt5Gui-devel >= %{qt5_ver} | |
35 | BuildRequires: Qt5Widgets-devel >= %{qt5_ver} | |
36 | BuildRequires: phonon-qt5-devel >= %{phonon_ver} | |
37 | BuildRequires: qt5-build >= %{qt5_ver} | |
38 | BuildRequires: qt5-qmake >= %{qt5_ver} | |
39 | %endif | |
40 | Requires: phonon >= %{phonon_ver} | |
41 | Requires: vlc >= %{vlc_ver} | |
42 | Provides: qt4-phonon-backend = %{version} | |
43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
44 | ||
45 | %description | |
46 | VLC backend for Phonon. | |
47 | ||
48 | %description -l pl.UTF-8 | |
49 | Wtyczka VLC dla Phonona. | |
50 | ||
51 | %package -n phonon-qt5-backend-vlc | |
52 | Summary: VLC backend for Qt5 Phonon | |
53 | Summary(pl.UTF-8): Wtyczka VLC dla Phonona opartego na Qt5 | |
54 | Group: Libraries | |
55 | Requires: phonon-qt5 >= %{phonon_ver} | |
56 | Requires: vlc >= %{vlc_ver} | |
57 | Provides: qt5-phonon-backend = %{version} | |
58 | ||
59 | %description -n phonon-qt5-backend-vlc | |
60 | VLC backend for Qt5 Phonon. | |
61 | ||
62 | %description -n phonon-qt5-backend-vlc -l pl.UTF-8 | |
63 | Wtyczka VLC dla Phonona opartego na Qt5. | |
64 | ||
65 | %prep | |
66 | %setup -q | |
67 | ||
68 | %build | |
69 | %if %{with qt4} | |
70 | install -d build-qt4 | |
71 | cd build-qt4 | |
72 | %cmake .. | |
73 | %{__make} -j1 | |
74 | cd .. | |
75 | %endif | |
76 | ||
77 | %if %{with qt5} | |
78 | install -d build-qt5 | |
79 | cd build-qt5 | |
80 | %cmake .. \ | |
81 | -DPHONON_BUILD_PHONON4QT5=ON | |
82 | %{__make} -j1 | |
83 | cd .. | |
84 | %endif | |
85 | ||
86 | %install | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %if %{with qt4} | |
90 | %{__make} -C build-qt4 install \ | |
91 | DESTDIR=$RPM_BUILD_ROOT | |
92 | %endif | |
93 | ||
94 | %if %{with qt5} | |
95 | %{__make} -C build-qt5 install \ | |
96 | DESTDIR=$RPM_BUILD_ROOT | |
97 | %endif | |
98 | ||
99 | %clean | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
102 | %if %{with qt4} | |
103 | %files | |
104 | %defattr(644,root,root,755) | |
105 | %doc AUTHORS | |
106 | %attr(755,root,root) %{_libdir}/kde4/plugins/phonon_backend/phonon_vlc.so | |
107 | %{_datadir}/kde4/services/phononbackends/vlc.desktop | |
108 | %endif | |
109 | ||
110 | %if %{with qt5} | |
111 | %files -n phonon-qt5-backend-vlc | |
112 | %defattr(644,root,root,755) | |
113 | %attr(755,root,root) %{_libdir}/qt5/plugins/phonon4qt5_backend/phonon_vlc.so | |
114 | %endif |