summaryrefslogtreecommitdiff
path: root/packaging/libdrm.spec
blob: 97e31159b48ee166db9713983bc7e778769230c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
Name:           libdrm
Version:        2.4.118
Release:        0
License:        MIT
Url:            http://cgit.freedesktop.org/mesa/drm
Summary:        Userspace interface to kernel DRM services
Group:          Graphics & UI Framework/Libraries
Source0:        %{name}-%{version}.tar.bz2
Source1001:		%name.manifest

BuildRequires:  kernel-headers
BuildRequires:  pkgconfig(pciaccess)
BuildRequires:  meson
BuildRequires:  python3

%description
Direct Rendering Manager headers and kernel modules.

%package tools
Summary:        Diagnostic utilities for DRI and DRM
Group:          Graphics & UI Framework/Utilities
Obsoletes:      libdrm < %version-%release
Provides:       libdrm = %version-%release

%description tools
Diagnoistic tools to run a test for DRI and DRM

%package tools-exynos
Summary:	Diagnostic utilities for exynos
Group:          Graphics & UI Framework/Utilities

%description tools-exynos
Diagnoistic tools to run a test for exynos

%package devel
Summary:        Userspace interface to kernel DRM services
Requires:       kernel-headers
Requires:       libdrm = %{version}-%{release}
%ifarch i586 i686 %ix86 x86_64
Requires:       libdrm-intel = %{version}-%{release}
%endif

%description devel
Direct Rendering Manager headers and kernel modules.

Development related files.

%package intel
Summary:        Userspace interface to intel graphics kernel DRM buffer management

%description intel
Userspace interface to intel graphics kernel DRM buffer management files

%package freedreno
Summary:        Userspace interface to freedreno graphics kernel drm buffer management
requires:       libdrm = %{version}-%{release}

%description freedreno
Userspace interface to freedreno graphics kernel drm buffer management files

%package freedreno-devel
Summary:        headers and developement files for freedreno drm services
requires:       libdrm = %{version}-%{release}
requires:       libdrm-devel = %{version}-%{release}

%description freedreno-devel
Direct rendering manager headers and development related files for freedreno.

%prep
%setup -q
cp %{SOURCE1001} .

%build
export CFLAGS+=" -fPIE -Wno-format-truncation -fno-strict-aliasing"
meson setup --prefix /usr --libdir %{_libdir} \
       -Dudev=true \
       -Dradeon=disabled \
       -Damdgpu=disabled \
       -Dnouveau=disabled \
       -Dfreedreno=enabled \
       -Dfreedreno-kgsl=true \
%ifarch i586 i686 %ix86 x86_64
       -Dintel=enabled \
%endif
       -Dexynos=enabled \
       -Dvigs=enabled \
       -Dinstall-test-programs=true \
       -Dcairo-tests=disabled \
       -Detnaviv=disabled \
       -Db_pie=true \
       builddir

ninja -C builddir all

%install
export DESTDIR=%{buildroot}
ninja -C builddir install

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post intel -p /sbin/ldconfig

%postun intel -p /sbin/ldconfig

%files
%manifest %{name}.manifest
%license COPYING
%{_libdir}/libdrm.so.*
%{_libdir}/libdrm_exynos.so.*
%{_libdir}/libdrm_vigs.so.*
%{_libdir}/libdrm_freedreno.so.*

%files tools
%manifest %{name}.manifest
%{_bindir}/drmdevice
%{_bindir}/modeprint
%{_bindir}/modetest
%{_bindir}/proptest
%{_bindir}/vbltest

%files tools-exynos
%manifest %{name}.manifest
%{_bindir}/exynos_fimg2d_event
%{_bindir}/exynos_fimg2d_perf
%{_bindir}/exynos_fimg2d_test

%files devel
%manifest %{name}.manifest
%dir %{_includedir}/libdrm
%{_includedir}/libdrm/*.h
%dir %{_includedir}/exynos
%{_includedir}/exynos/*.h
%{_includedir}/*.h
%{_libdir}/libdrm.so
%{_libdir}/pkgconfig/libdrm.pc
%ifarch i586 i686 %ix86 x86_64
%{_libdir}/libdrm_intel.so
%{_libdir}/pkgconfig/libdrm_intel.pc
%endif
%ifarch %{arm} aarch64
%{_libdir}/pkgconfig/libdrm_vc4.pc
%endif
%{_libdir}/libdrm_exynos.so
%{_libdir}/pkgconfig/libdrm_exynos.pc
%{_libdir}/libdrm_vigs.so
%{_libdir}/pkgconfig/libdrm_vigs.pc

%ifarch i586 i686 %ix86 x86_64
%files intel
%manifest %{name}.manifest
%{_libdir}/libdrm_intel.so.*
%endif

%files freedreno
%{_libdir}/libdrm_freedreno.so.*

%files freedreno-devel
%manifest %{name}.manifest
%dir %{_includedir}/freedreno
%{_includedir}/freedreno/*.h
%{_libdir}/libdrm_freedreno.so
%{_libdir}/pkgconfig/libdrm_freedreno.pc