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