]> git.pld-linux.org Git - packages/qtav.git/blob - qtav.spec
- fix internal deps
[packages/qtav.git] / qtav.spec
1 Summary:        A media playback framework based on Qt and FFmpeg
2 Name:           qtav
3 Version:        1.12.0
4 Release:        3
5 License:        LGPLv2+ and GPLv3+ and BSD
6 Group:          Development/Libraries
7 URL:            http://www.qtav.org/
8 Source0:        https://github.com/wang-bin/QtAV/archive/v%{version}.tar.gz
9 # Source0-md5:  9a28d4e5061569f709be6eb649e51499
10 BuildRequires:  OpenAL-devel
11 BuildRequires:  Qt5Core-devel
12 BuildRequires:  Qt5Declarative-devel
13 BuildRequires:  Qt5Quick-devel
14 BuildRequires:  Qt5Svg-devel
15 BuildRequires:  desktop-file-utils
16 BuildRequires:  dos2unix
17 BuildRequires:  ffmpeg-devel
18 BuildRequires:  libass-devel
19 BuildRequires:  libva-devel
20 BuildRequires:  pulseaudio-devel
21 BuildRequires:  uchardet-devel
22 BuildRequires:  xorg-lib-libXv-devel
23 Requires:       hicolor-icon-theme
24
25 %description
26 QtAV is a multimedia playback library based on Qt and FFmpeg. It can
27 help you to write a player with less effort than ever before.
28
29 Features include:
30   - Hardware decoding suppprt: DXVA2, VAAPI, VDA, CedarX, CUDA.
31   - OpenGL and ES2 support for Hi10P and other 16-bit YUV videos.
32   - Video capture in rgb and yuv format.
33   - OSD and custom filters.
34   - filters in libavfilter, for example stero3d, blur.
35   - Subtitle.
36   - Transform video using GraphicsItemRenderer. (rotate, shear, etc)
37   - Playing frame by frame (currently support forward playing).
38   - Playback speed control. At any speed.
39   - Variant streams: locale file, http, rtsp, etc.
40   - Choose audio channel.
41   - Choose media stream, e.g. play a desired audio track.
42   - Multiple render engine support. Currently supports QPainter, GDI+,
43     Direct2D, XV and OpenGL(and ES2).
44   - Dynamically change render engine when playing.
45   - Multiple video outputs for 1 player.
46   - Region of interest(ROI), i.e. video cropping.
47   - Video eq: brightness, contrast, saturation, hue.
48   - QML support as a plugin. Most playback APIs are compatible with
49     QtMultiMedia module.
50
51 %package -n libqtav
52 Summary:        QtAV library
53 Group:          Libraries
54 Requires:       ffmpeg
55
56 %description -n libqtav
57 QtAV is a multimedia playback library based on Qt and FFmpeg. It can
58 help you to write a player with less effort than ever before.
59
60 This package contains the QtAV library.
61
62 %package widgets
63 Summary:        QtAV Widgets module
64 Group:          Applications/Multimedia
65 Requires:       %{name} = %{version}-%{release}
66
67 %description widgets
68 QtAV is a multimedia playback library based on Qt and FFmpeg. It can
69 help you to write a player with less effort than ever before.
70
71 This package contains a set of widgets to play media.
72
73 %package devel
74 Summary:        QtAV development files
75 Group:          Development/Libraries
76 Requires:       %{name} = %{version}-%{release}
77 Requires:       %{name}-widgets = %{version}-%{release}
78
79 %description devel
80 QtAV is a multimedia playback library based on Qt and FFmpeg. It can
81 help you to write a player with less effort than ever before.
82
83 This package contains the header development files for building some
84 QtAV applications using QtAV headers.
85
86 %package qml-module
87 Summary:        QtAV QML module
88 Group:          Development/Libraries
89
90 %description qml-module
91 QtAV is a multimedia playback library based on Qt and FFmpeg. It can
92 help you to write a player with less effort than ever before.
93
94 This package contains the QtAV QML module for Qt declarative.
95
96 %package players
97 Summary:        QtAV/QML players
98 Group:          Applications/Multimedia
99 License:        GPL v3
100 Requires:       %{name} = %{version}-%{release}
101 Requires:       %{name}-widgets = %{version}-%{release}
102 Requires:       qtav-qml-module = %{version}-%{release}
103
104 %description players
105 QtAV is a multimedia playback framework based on Qt and FFmpeg. High
106 performance. User & developer friendly.
107
108 This package contains the QtAV based players.
109
110 %prep
111 %setup -q -n QtAV-%{version}
112
113 %build
114 install -d build
115 cd build
116 export CPATH="`pkg-config --variable=includedir libavformat`"
117 qmake-qt5 \
118   QMAKE_CFLAGS="%{rpmcppflags} %{rpmcflags}" \
119   QMAKE_CXXFLAGS="%{rpmcxxflags}"                                  \
120   QMAKE_LFLAGS="%{rpmldflags}"    \
121   QMAKE_STRIP=""                                                                          \
122   CONFIG+="no_rpath recheck config_libass_link release" \
123   ..
124 %{__make}
125
126 %install
127 rm -rf $RPM_BUILD_ROOT
128
129 %{__make} -C build install \
130         DESTDIR=$RPM_BUILD_ROOT \
131         INSTALL_ROOT=$RPM_BUILD_ROOT
132
133 install -d $RPM_BUILD_ROOT%{_bindir}
134 ln -sfv %{_libdir}/qt5/bin/Player $RPM_BUILD_ROOT%{_bindir}
135 ln -sfv %{_libdir}/qt5/bin/QMLPlayer $RPM_BUILD_ROOT%{_bindir}
136 install -D src/QtAV.svg $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps/QtAV.svg
137
138 # library links
139 ln -sfv %{_libdir}/libQtAV.so $RPM_BUILD_ROOT%{_libdir}/libQt5AV.so
140 ln -sfv %{_libdir}/libQtAVWidgets.so $RPM_BUILD_ROOT%{_libdir}/libQt5AVWidgets.so
141
142 %clean
143 rm -rf $RPM_BUILD_ROOT
144
145 %post -p /sbin/ldconfig
146 %post widgets -p /sbin/ldconfig
147
148 %post players
149 %{_bindir}/%update_desktop_database
150 %update_icon_cache_post hicolor &>/dev/null ||:
151
152 %postun -p /sbin/ldconfig
153 %postun widgets -p /sbin/ldconfig
154
155 %postun players
156 %{_bindir}/%update_desktop_database
157 if [ $1 -eq 0 ]; then
158     %update_icon_cache_post hicolor &>/dev/null ||:
159     %{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
160 fi
161
162 %posttrans players
163 %{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
164
165 %files
166 %defattr(644,root,root,755)
167 %doc README.md Changelog
168 %attr(755,root,root) %ghost %{_libdir}/libQtAV.so.1
169 %attr(755,root,root) %{_libdir}/libQtAV.so.*.*
170
171 %files widgets
172 %defattr(644,root,root,755)
173 %attr(755,root,root) %ghost %{_libdir}/libQtAVWidgets.so.1
174 %attr(755,root,root) %{_libdir}/libQtAVWidgets.so.*.*
175
176 %files devel
177 %defattr(644,root,root,755)
178 %{_includedir}/qt5/QtAV
179 %{_includedir}/qt5/QtAVWidgets
180 %attr(755,root,root) %{_libdir}/libQtAV.so
181 %{_libdir}/libQtAV.prl
182 %attr(755,root,root) %{_libdir}/libQt5AV.so
183 %attr(755,root,root) %{_libdir}/libQtAVWidgets.so
184 %{_libdir}/libQtAVWidgets.prl
185 %attr(755,root,root) %{_libdir}/libQt5AVWidgets.so
186 %{_libdir}/qt5/mkspecs/features/av.prf
187 %{_libdir}/qt5/mkspecs/features/avwidgets.prf
188 %{_libdir}/qt5/mkspecs/modules/qt_lib_av.pri
189 %{_libdir}/qt5/mkspecs/modules/qt_lib_av_private.pri
190 %{_libdir}/qt5/mkspecs/modules/qt_lib_avwidgets.pri
191 %{_libdir}/qt5/mkspecs/modules/qt_lib_avwidgets_private.pri
192
193 %files qml-module
194 %defattr(644,root,root,755)
195 %doc README.md Changelog
196 %{_libdir}/qt5/qml/QtAV/Video.qml
197 %{_libdir}/qt5/qml/QtAV/libQmlAV.so
198 %{_libdir}/qt5/qml/QtAV/plugins.qmltypes
199 %{_libdir}/qt5/qml/QtAV/qmldir
200
201 %files players
202 %defattr(644,root,root,755)
203 %doc README.md Changelog
204 %attr(755,root,root) %{_libdir}/qt5/bin/Player
205 %attr(755,root,root) %{_libdir}/qt5/bin/QMLPlayer
206 %attr(755,root,root) %{_bindir}/Player
207 %attr(755,root,root) %{_bindir}/QMLPlayer
208 %{_iconsdir}/hicolor/*/apps/QtAV.svg
209 %{_desktopdir}/Player.desktop
210 %{_desktopdir}/QMLPlayer.desktop
This page took 0.128925 seconds and 3 git commands to generate.