packaging: Bump to 1.4.1
[platform/upstream/libva.git] / packaging / libva.spec
1 %bcond_with wayland
2 %bcond_with mesa
3 %bcond_with x
4
5 Name:           libva
6 Version:        1.4.1
7 Release:        0
8 License:        MIT
9 Summary:        Video Acceleration (VA) API for Linux
10 Url:            http://freedesktop.org/wiki/Software/vaapi
11 #X-Vc-Url:      git://anongit.freedesktop.org/libva
12 Group:          Multimedia/Video
13 Source:         %{name}-%{version}.tar.bz2
14 BuildRequires:  gcc-c++
15 BuildRequires:  libtool
16 BuildRequires:  pkg-config
17 BuildRequires:  xz
18 %if %{with mesa}
19 BuildRequires:  mesa-devel
20 %else
21 BuildRequires: pkgconfig(glesv2)
22 BuildRequires:  pkgconfig(egl)
23 %endif
24 BuildRequires:  pkgconfig(libdrm)
25 BuildRequires:  pkgconfig(libudev)
26 %if %{with x}
27 BuildRequires:  pkgconfig(x11)
28 BuildRequires:  pkgconfig(xext)
29 BuildRequires:  pkgconfig(xfixes)
30 BuildRequires:  pkgconfig(xrandr)
31 BuildRequires:  pkgconfig(xv)
32 %endif
33 %if %{with wayland}
34 BuildRequires:  pkgconfig(wayland-egl)
35 BuildRequires:  pkgconfig(wayland-client)
36 %endif
37 ExclusiveArch:  %ix86 x86_64
38
39 %description
40 The libva library implements the Video Acceleration (VA) API for Linux.
41 The library loads a hardware dependendent driver.
42
43 %package devel
44 Summary:        Video Acceleration (VA) API for Linux -- development files
45 Group:          Development/Libraries
46 Requires:       libva = %{version}
47 Requires:       pkgconfig(libdrm)
48 %if %{with x}
49 Requires:       pkgconfig(gl)
50 Requires:       pkgconfig(x11)
51 Requires:       pkgconfig(xfixes)
52 %endif
53 %if %{with wayland}
54 Requires:  pkgconfig(wayland-egl)
55 Requires:  pkgconfig(wayland-client)
56 %endif
57
58 %description devel
59 The libva library implements the Video Acceleration (VA) API for Linux.
60 The library loads a hardware dependendent driver.
61
62 This package provides the development environment for libva.
63
64 %package -n vaapi-tools
65 Summary:        Video Acceleration (VA) API for Linux
66 Group:          Multimedia/Video
67
68 %description -n vaapi-tools
69 The libva library implements the Video Acceleration (VA) API for Linux.
70 The library loads a hardware dependendent driver.
71
72 This is a set of tools around vaapi livrary.
73
74 %package -n vaapi-dummy-driver
75 Summary:        Video Acceleration (VA) API for Linux
76 Group:          Multimedia/Video
77
78 %description -n vaapi-dummy-driver
79 The libva library implements the Video Acceleration (VA) API for Linux.
80 The library loads a hardware dependendent driver.
81
82 This contains the dummy driver.
83
84 %prep
85 %setup -q
86
87 %build
88 # --enable-x11 set to no explicitly, otherwise it will mislead libva build when other package brings in X11 lib
89 %autogen
90 %configure --enable-dummy-driver \
91            --enable-dummy-backend \
92 %if %{with x}
93 %if %{with mesa}
94            --enable-glx \
95 %endif
96 %else
97         --enable-x11=no \
98 %endif
99            --enable-egl \
100 %if %{with wayland}
101            --enable-wayland \
102 %endif
103            --with-drivers-path=%{_libdir}/dri
104 make %{?_smp_mflags}
105
106 %install
107 %make_install
108 grep -r include %{buildroot}%{_includedir}
109
110 %post -p /sbin/ldconfig
111
112 %postun -p /sbin/ldconfig
113
114 %files -n vaapi-tools
115 %defattr(-,root,root,-)
116 %{_bindir}/vainfo
117 %{_bindir}/avcenc
118 %{_bindir}/h264encode
119 %{_bindir}/mpeg2vldemo
120 %{_bindir}/mpeg2vaenc
121 %if %{with x}
122 %{_bindir}/putsurface
123 %endif
124 %{_bindir}/loadjpeg
125 %if %{with wayland}
126 %{_bindir}/putsurface_wayland
127 %endif
128
129 %files -n vaapi-dummy-driver
130 %defattr(-,root,root,-)
131 %dir %{_libdir}/dri
132 %{_libdir}/dri/dummy_drv_video.so
133
134 %files
135 %defattr(-, root, root)
136 %license COPYING
137 %{_libdir}/libva.so.*
138 %{_libdir}/libva-tpi.so.*
139 %if %{with x}
140 %{_libdir}/libva-x11.so.*
141 %endif
142 %if %{with mesa} && %{with x}
143     %{_libdir}/libva-glx.so.*
144 %endif
145 %{_libdir}/libva-egl.so.*
146 %if %{with wayland}
147 %{_libdir}/libva-wayland.so.*
148 %endif
149 %{_libdir}/libva-drm.so.*
150
151 %files devel
152 %defattr(-,root,root,-)
153 %{_libdir}/libva.so
154 %{_libdir}/libva-tpi.so
155 %if %{with x}
156 %{_libdir}/libva-x11.so
157 %endif
158 %if %{with mesa} && %{with x}
159     %{_libdir}/libva-glx.so
160 %endif
161 %{_libdir}/libva-egl.so
162 %if %{with wayland}
163 %{_libdir}/libva-wayland.so
164 %endif
165 %{_libdir}/libva-drm.so
166 %{_includedir}/va
167 %{_libdir}/pkgconfig/libva*.pc
168
169 %changelog