1 |
%define name directfb |
2 |
%define version 1.4.11 |
3 |
%define release %mkrel 2 |
4 |
%define oname DirectFB |
5 |
%define api 1.4 |
6 |
%define major 5 |
7 |
%define libname %mklibname %{name} %{api} %{major} |
8 |
%define develname %mklibname %name -d |
9 |
|
10 |
# Multiple applications support |
11 |
# Requires fusion kernel module |
12 |
%define build_multi 0 |
13 |
%{?_without_multi: %{expand: %%global build_multi 0}} |
14 |
%{?_with_multi: %{expand: %%global build_multi 1}} |
15 |
|
16 |
Summary: Hardware graphics acceleration library |
17 |
Name: %{name} |
18 |
Version: %{version} |
19 |
Release: %{release} |
20 |
License: LGPLv2+ |
21 |
Group: System/Libraries |
22 |
Source0: http://www.directfb.org/downloads/Core/%{oname}-%{version}.tar.gz |
23 |
# from Debian |
24 |
Patch0: 03_link_static_sysfs.patch |
25 |
Patch1: DirectFB-1.2.7-link-static-ar.patch |
26 |
# Explicitly link with -lm. Was failing only on x86_64, but not on i586, |
27 |
# apparently because -O3 was generating code to bypass libm on i586. |
28 |
Patch3: DirectFB-1.2.7-sincos-x86_64.patch |
29 |
# remove common linkage of x11 system and x11 input driver |
30 |
# it makes directfb segfault |
31 |
# (this is a workaround, not a proper upstreamable fix) |
32 |
Patch4: DirectFB-1.4.2-x11-linkage.patch |
33 |
# try to reopen console devices when needed |
34 |
# (for example with splashy after init steals control of consoles) |
35 |
# reworked from Debian patch, Debian #462626 |
36 |
# might break other directfb apps, Debian #493899 |
37 |
Patch5: DirectFB-1.2.7-reopen_vt.patch |
38 |
# from Debian #401296, 93_fix_unicode_key_handling.patch |
39 |
Patch6: DirectFB-1.4.2-unicode.patch |
40 |
Patch9: DirectFB-1.4.2-wrong-ldflags.patch |
41 |
Patch10: DirectFB-1.4.3-libpng-1.4.patch |
42 |
URL: http://www.directfb.org/ |
43 |
BuildRequires: libvncserver-devel |
44 |
BuildRequires: libpng-devel >= 1.2.0 |
45 |
BuildRequires: libjpeg-devel >= 6b |
46 |
BuildRequires: freetype2-devel >= 2.0.2 |
47 |
BuildRequires: libx11-devel |
48 |
BuildRequires: libxext-devel |
49 |
BuildRequires: libsysfs2-devel |
50 |
%if %{build_multi} |
51 |
BuildRequires: fusion-devel >= 3.0 |
52 |
%endif |
53 |
# prevent linking devel subpackage with older libraries: |
54 |
# (blino) please uncomment when major is changed |
55 |
# BuildConflicts: directfb-devel |
56 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
57 |
|
58 |
%description |
59 |
DirectFB hardware graphics acceleration - libraries. |
60 |
|
61 |
%package -n %{libname} |
62 |
Summary: Shared library part of %oname |
63 |
Group: System/Libraries |
64 |
|
65 |
%description -n %{libname} |
66 |
DirectFB hardware graphics acceleration - libraries. |
67 |
|
68 |
This package contains the %oname shared library and interface modules. |
69 |
It's required for running apps based on %oname. |
70 |
|
71 |
|
72 |
%package -n %develname |
73 |
Group: Development/C |
74 |
Summary: Header files for compiling DirectFB applications |
75 |
Requires: %{libname} = %{version} |
76 |
Provides: lib%{name}-devel = %{version}-%{release} |
77 |
Provides: %{oname}-devel = %{version}-%{release} %{name}-devel = %{version}-%{release} |
78 |
Provides: libdirectfb0.9-devel = %{version}-%{release} |
79 |
Conflicts: %mklibname -d directfb 0.9_20 |
80 |
Conflicts: %mklibname -d directfb 0.9_21 |
81 |
Conflicts: %mklibname -d directfb 0.9_25 |
82 |
Conflicts: %mklibname -d directfb 1.0_0 |
83 |
# required for systems/libdirectfb_fbdev.{so,a} (find-requires does not look in subdirs) |
84 |
Requires: libsysfs-static-devel |
85 |
|
86 |
%description -n %develname |
87 |
DirectFB header files for building applications based on %oname. |
88 |
|
89 |
%package doc |
90 |
Summary: DirectFB - documentation |
91 |
Group: Books/Computer books |
92 |
|
93 |
%description doc |
94 |
DirectFB documentation and examples. |
95 |
|
96 |
%prep |
97 |
%setup -q -n %{oname}-%{version} |
98 |
%patch0 -p1 -b .sysfs |
99 |
%patch1 -p1 -b .link-static-ar |
100 |
%patch3 -p1 |
101 |
%patch4 -p1 -b .x11-linkage |
102 |
#patch5 -p1 -b .reopen |
103 |
%patch6 -p1 -b .unicode |
104 |
%patch9 -p0 -b .linkage |
105 |
#patch10 -p1 -b .libpng14 |
106 |
autoreconf -if |
107 |
|
108 |
%build |
109 |
%configure2_5x \ |
110 |
--disable-maintainer-mode \ |
111 |
--enable-shared \ |
112 |
--enable-static \ |
113 |
--disable-fast-install \ |
114 |
--disable-debug \ |
115 |
--with-gfxdrivers=ati128,cle266,cyber5k,i810,i830,mach64,neomagic,nsc,nvidia,radeon,savage,sis315,tdfx,unichrome \ |
116 |
%if %build_multi |
117 |
--enable-multi |
118 |
%else |
119 |
--disable-multi |
120 |
%endif |
121 |
|
122 |
%make |
123 |
|
124 |
%install |
125 |
rm -rf %{buildroot} |
126 |
%makeinstall_std |
127 |
|
128 |
# multiarch policy |
129 |
%multiarch_binaries %{buildroot}%{_bindir}/directfb-config |
130 |
|
131 |
%clean |
132 |
rm -rf %{buildroot} |
133 |
|
134 |
%files -n %{libname} |
135 |
%defattr(644,root,root,755) |
136 |
%doc README* AUTHORS NEWS TODO |
137 |
%attr(755,root,root) %{_libdir}/lib*%{api}.so.%{major}* |
138 |
%exclude %{_libdir}/directfb-%{api}-%major/*/*.a |
139 |
%exclude %{_libdir}/directfb-%{api}-%major/*/*/*.a |
140 |
%exclude %{_libdir}/directfb-%{api}-%major/*/*.o |
141 |
%exclude %{_libdir}/directfb-%{api}-%major/*/*/*.o |
142 |
%{_libdir}/directfb-%{api}-%major |
143 |
%{_datadir}/directfb-%{version} |
144 |
|
145 |
|
146 |
%files -n %develname |
147 |
%defattr(755,root,root,755) |
148 |
%{_bindir}/dfb* |
149 |
%{_bindir}/directfb* |
150 |
%{_bindir}/mkd* |
151 |
%multiarch %{multiarch_bindir}/directfb-config |
152 |
%defattr(644,root,root,755) |
153 |
%{_includedir}/directfb |
154 |
%{_includedir}/directfb-internal |
155 |
%{_mandir}/man1/directfb-csource.1* |
156 |
%{_mandir}/man1/dfbg.1* |
157 |
%{_mandir}/man5/directfbrc.5* |
158 |
%{_libdir}/pkgconfig/* |
159 |
%attr(644,root,root) %{_libdir}/*.la |
160 |
%{_libdir}/*.so |
161 |
%{_libdir}/*.a |
162 |
%{_libdir}/directfb-%{api}-%major/*/*.a |
163 |
%{_libdir}/directfb-%{api}-%major/*/*/*.a |
164 |
%{_libdir}/directfb-%{api}-%major/*/*.o |
165 |
%{_libdir}/directfb-%{api}-%major/*/*/*.o |
166 |
|
167 |
%files doc |
168 |
%defattr(644,root,root,755) |
169 |
%doc docs/html/* |
170 |
|
171 |
|
172 |
|
173 |
|