1 | %define desktop_vendor vine |
---|
2 | |
---|
3 | %define drivername fglrx |
---|
4 | %define xorg_version pic |
---|
5 | %ifarch %ix86 |
---|
6 | %define xverdir x%{xorg_version} |
---|
7 | %define archdir arch/x86 |
---|
8 | %endif |
---|
9 | %ifarch x86_64 |
---|
10 | %define xverdir x%{xorg_version}_64a |
---|
11 | %define archdir arch/x86_64 |
---|
12 | %endif |
---|
13 | %define xorg_libdir %{_libdir}/xorg |
---|
14 | %define xorg_dridir %{_libdir}/dri |
---|
15 | %define xorg_dridir32 %{_prefix}/lib/dri |
---|
16 | %define ld_so_conf_file ati.conf |
---|
17 | %define ati_extdir %{xorg_libdir}/modules/extensions/%{drivername} |
---|
18 | |
---|
19 | %define bundle_qt 0 |
---|
20 | %define debug_package %{nil} |
---|
21 | |
---|
22 | Summary: X Window display driver for the ATI graphics accelerators |
---|
23 | Summary(ja): プロプライエタリな ATI グラフィックス・アクセラレーターのためのディスプレイ・ドライバ |
---|
24 | Name: xorg-x11-drv-fglrx |
---|
25 | Version: 8.85 |
---|
26 | Release: 1%{?_dist_release} |
---|
27 | License: Other License(s), see package |
---|
28 | Group: User Interface/X Hardware Support |
---|
29 | URL: http://ati.amd.com/support/driver.html |
---|
30 | Vendor: Project Vine |
---|
31 | Distribution: Vine Linux |
---|
32 | Packager: kenta |
---|
33 | ExclusiveArch: i686 x86_64 |
---|
34 | |
---|
35 | Source0: http://www2.ati.com/drivers/linux/ati-driver-installer-11-5-x86.x86_64.run |
---|
36 | Source1: atieventsd.init |
---|
37 | |
---|
38 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
39 | # Required for proper dkms operation |
---|
40 | Requires: gcc, make |
---|
41 | Requires(post): dkms, /sbin/ldconfig |
---|
42 | Requires(preun): dkms |
---|
43 | |
---|
44 | %description |
---|
45 | The display drivers for the ATI Radeon, Mobility Radeon, Radeon Xpress IGP, and |
---|
46 | FireGL series of graphics graphics accelerators. This driver works only with post |
---|
47 | R200 (Radeon 9200) graphics cards. This package provides 2D display drivers, |
---|
48 | precompiled kernel modules, kernel module build environment, control |
---|
49 | panel source code and hardware accelerated OpenGL. |
---|
50 | |
---|
51 | INSTALLING THIS PACKAGE WILL TAINT YOUR KERNEL, SO PLEASE DO NOT REPORT *ANY* |
---|
52 | BUGS BEFORE YOU UNINSTALL THE PACKAGE AND REBOOT THE SYSTEM. |
---|
53 | |
---|
54 | %description -l ja |
---|
55 | このパッケージには、ATI 製のグラフィックスカードで2D/3Dのハードウエアアクセ |
---|
56 | ラレーションを得るためのプロプライエタリなグラフィックスドライバが収録されてい |
---|
57 | ます。このドライバには以下のモジュールが含まれています。 |
---|
58 | - OpenGLライブラリ |
---|
59 | - Xorg ドライバモジュール |
---|
60 | - DRM カーネルモジュール |
---|
61 | |
---|
62 | 注意: このパッケージをインストールすると利用しているカーネルを汚染します。 |
---|
63 | Kernelに関するどんなバグレポートを行う場合は、必ずこのパッケージを |
---|
64 | アンインストールしシステムをリブートしてから行って下さい。 |
---|
65 | |
---|
66 | %prep |
---|
67 | %setup -q -T -c |
---|
68 | # Extract the proper "sources" for the current architecture |
---|
69 | # We need to extract to a "not yet existing" directory first, so no "." |
---|
70 | sh %{SOURCE0} --extract . |
---|
71 | mkdir fglrx_tools |
---|
72 | # tar -xzf common/usr/src/ati/fglrx_sample_source.tgz -C fglrx_tools |
---|
73 | |
---|
74 | %build |
---|
75 | # Nope. |
---|
76 | |
---|
77 | %install |
---|
78 | %{__rm} -rf %{buildroot} |
---|
79 | |
---|
80 | # dkms |
---|
81 | install -d -m755 %{buildroot}%{_usrsrc}/%{drivername}-%{version}-%{release} |
---|
82 | cp -a common/lib/modules/fglrx/build_mod/* %{buildroot}%{_usrsrc}/%{drivername}-%{version}-%{release} |
---|
83 | cp -a %{archdir}/lib/modules/fglrx/build_mod/* %{buildroot}%{_usrsrc}/%{drivername}-%{version}-%{release} |
---|
84 | |
---|
85 | %define dkms_name fglrx |
---|
86 | %define dkms_vers %{version}-%{release} |
---|
87 | %define quiet -q |
---|
88 | |
---|
89 | # Copy dkms conf file |
---|
90 | %{__mkdir_p} %{buildroot}%{_usrsrc}/%{dkms_name}-%{dkms_vers}/ |
---|
91 | %{__cat} > %{buildroot}%{_usrsrc}/%{dkms_name}-%{dkms_vers}/dkms.conf << 'EOF' |
---|
92 | PACKAGE_NAME=%{dkms_name} |
---|
93 | PACKAGE_VERSION=%{dkms_vers} |
---|
94 | BUILT_MODULE_NAME[0]=fglrx |
---|
95 | DEST_MODULE_LOCATION[0]=/kernel/drivers/char/drm |
---|
96 | MAKE[0]="KERNEL_PATH=\${kernel_source_dir} sh make.sh --uname_r=\${kernelver} --uname_a=none" |
---|
97 | CLEAN="rm -rf 2.6.x/.tmp_versions; make -C2.6.x clean" |
---|
98 | AUTOINSTALL=YES |
---|
99 | EOF |
---|
100 | |
---|
101 | # headers |
---|
102 | install -d -m755 %{buildroot}%{_includedir} |
---|
103 | cp -a common/usr/include/* %{buildroot}%{_includedir} |
---|
104 | chmod 0644 %{buildroot}%{_includedir}/*/*.h |
---|
105 | |
---|
106 | # install binaries |
---|
107 | install -d -m755 %{buildroot}%{_sbindir} |
---|
108 | install -m755 %{archdir}/usr/sbin/* %{buildroot}%{_sbindir} |
---|
109 | install -m755 common/usr/sbin/* %{buildroot}%{_sbindir} |
---|
110 | install -d -m755 %{buildroot}%{_bindir} |
---|
111 | install -m755 %{archdir}/usr/X11R6/bin/* %{buildroot}%{_bindir} |
---|
112 | install -m755 common/usr/X11R6/bin/* %{buildroot}%{_bindir} |
---|
113 | |
---|
114 | # atieventsd initscript |
---|
115 | install -d -m755 %{buildroot}%{_initrddir} |
---|
116 | install -m755 %{SOURCE1} %{buildroot}%{_initrddir}/atieventsd |
---|
117 | |
---|
118 | # amdcccle data files |
---|
119 | install -d -m755 %{buildroot}%{_datadir}/ati/amdcccle |
---|
120 | rm -f amdcccle.langs |
---|
121 | for fullname in common/usr/share/ati/amdcccle/*.qm; do |
---|
122 | file=$(basename $fullname) |
---|
123 | lang=${file#*_} |
---|
124 | lang=${lang%%.qm} |
---|
125 | %if !%{bundle_qt} |
---|
126 | # qt localization not necessary with non-bundled qt |
---|
127 | [ "$file" = "${file#qt}" ] || continue |
---|
128 | %endif |
---|
129 | install -m644 $fullname %{buildroot}%{_datadir}/ati/amdcccle |
---|
130 | echo "%%lang($lang) %{_datadir}/ati/amdcccle/$file" >> amdcccle.langs |
---|
131 | done |
---|
132 | |
---|
133 | # amdcccle super-user mode |
---|
134 | install -d -m755 %{buildroot}%{_sysconfdir}/security/console.apps |
---|
135 | install -d -m755 %{buildroot}%{_sysconfdir}/pam.d |
---|
136 | install -m644 common/etc/security/console.apps/* %{buildroot}%{_sysconfdir}/security/console.apps |
---|
137 | ln -s su %{buildroot}%{_sysconfdir}/pam.d/amdcccle-su |
---|
138 | |
---|
139 | # man pages |
---|
140 | install -d -m755 %{buildroot}%{_mandir}/man1 %{buildroot}%{_mandir}/man8 |
---|
141 | install -m644 common/usr/share/man/man8/* %{buildroot}%{_mandir}/man8 |
---|
142 | |
---|
143 | # menu entry |
---|
144 | install -d -m755 %{buildroot}%{_datadir}/applications |
---|
145 | install -m644 common/usr/share/applications/* %{buildroot}%{_datadir}/applications |
---|
146 | sed -i 's,^Icon=.*$,Icon=%{drivername}-amdcccle,' %{buildroot}%{_datadir}/applications/*.desktop |
---|
147 | # control center doesn't really use GNOME/KDE libraries: |
---|
148 | sed -i 's,GNOME;KDE;,,' %{buildroot}%{_datadir}/applications/*.desktop |
---|
149 | |
---|
150 | |
---|
151 | # icons |
---|
152 | install -d -m755 %{buildroot}%{_miconsdir} %{buildroot}%{_iconsdir} %{buildroot}%{_liconsdir} |
---|
153 | convert common/usr/share/icons/ccc_large.xpm -resize 16x16 %{buildroot}%{_miconsdir}/%{drivername}-amdcccle.png |
---|
154 | convert common/usr/share/icons/ccc_large.xpm -resize 32x32 %{buildroot}%{_iconsdir}/%{drivername}-amdcccle.png |
---|
155 | convert common/usr/share/icons/ccc_large.xpm -resize 48x48 %{buildroot}%{_liconsdir}/%{drivername}-amdcccle.png |
---|
156 | |
---|
157 | # install libraries |
---|
158 | install -d -m755 %{buildroot}%{_libdir}/%{drivername} |
---|
159 | install -m755 %{archdir}/usr/X11R6/%{_lib}/fglrx/* %{buildroot}%{_libdir}/%{drivername} |
---|
160 | install -m755 %{archdir}/usr/X11R6/%{_lib}/*.* %{buildroot}%{_libdir}/%{drivername} |
---|
161 | install -m755 %{archdir}/usr/%{_lib}/*.* %{buildroot}%{_libdir}/%{drivername} |
---|
162 | mv %{buildroot}%{_libdir}/%{drivername}/{fglrx-,}libGL.so.1.2 |
---|
163 | chmod 0644 %{buildroot}%{_libdir}/%{drivername}/*.a |
---|
164 | # create devel symlinks |
---|
165 | for file in %{buildroot}%{_libdir}/%{drivername}/*.so.*.*; do |
---|
166 | ln -s $(basename $file) ${file%%.so*}.so; |
---|
167 | done |
---|
168 | |
---|
169 | %ifarch x86_64 |
---|
170 | install -d -m755 %{buildroot}%{_prefix}/lib/%{drivername} |
---|
171 | install -m755 arch/x86/usr/X11R6/lib/fglrx/* %{buildroot}%{_prefix}/lib/%{drivername} |
---|
172 | install -m755 arch/x86/usr/X11R6/lib/*.* %{buildroot}%{_prefix}/lib/%{drivername} |
---|
173 | install -m755 arch/x86/usr/lib/*.* %{buildroot}%{_prefix}/lib/%{drivername} |
---|
174 | mv %{buildroot}%{_prefix}/lib/%{drivername}/{fglrx-,}libGL.so.1.2 |
---|
175 | chmod 0644 %{buildroot}%{_prefix}/lib/%{drivername}/*.a |
---|
176 | # create devel symlinks |
---|
177 | for file in %{buildroot}%{_prefix}/lib/%{drivername}/*.so.*.*; do |
---|
178 | ln -s $(basename $file) ${file%%.so*}.so; |
---|
179 | done |
---|
180 | %endif |
---|
181 | |
---|
182 | |
---|
183 | # install X.org files |
---|
184 | install -d -m755 %{buildroot}%{xorg_libdir}/modules/drivers |
---|
185 | install -m755 %{xverdir}/usr/X11R6/%{_lib}/modules/drivers/*.so* %{buildroot}%{xorg_libdir}/modules/drivers |
---|
186 | install -d -m755 %{buildroot}%{xorg_libdir}/modules/linux |
---|
187 | install -m755 %{xverdir}/usr/X11R6/%{_lib}/modules/linux/*.so* %{buildroot}%{xorg_libdir}/modules/linux |
---|
188 | install -m644 %{xverdir}/usr/X11R6/%{_lib}/modules/*.*o %{buildroot}%{xorg_libdir}/modules |
---|
189 | install -d -m755 %{buildroot}%{ati_extdir} |
---|
190 | install -m755 %{xverdir}/usr/X11R6/%{_lib}/modules/extensions/fglrx/*.so* %{buildroot}%{ati_extdir} |
---|
191 | mv %{buildroot}%{ati_extdir}/{fglrx-,}libglx.so |
---|
192 | |
---|
193 | # etc files |
---|
194 | install -d -m755 %{buildroot}%{_sysconfdir}/ati |
---|
195 | install -m644 common/etc/ati/* %{buildroot}%{_sysconfdir}/ati |
---|
196 | chmod 0755 %{buildroot}%{_sysconfdir}/ati/*.sh |
---|
197 | |
---|
198 | # dri libraries |
---|
199 | install -d -m755 %{buildroot}%{xorg_dridir} |
---|
200 | install -m755 %{archdir}/usr/X11R6/%{_lib}/modules/dri/* %{buildroot}%{xorg_dridir} |
---|
201 | %ifarch x86_64 |
---|
202 | install -d -m755 %{buildroot}%{xorg_dridir32} |
---|
203 | install -m755 arch/x86/usr/X11R6/lib/modules/dri/* %{buildroot}%{xorg_dridir32} |
---|
204 | %endif |
---|
205 | |
---|
206 | # ld.so.conf |
---|
207 | install -d -m755 %{buildroot}%{_sysconfdir}/ld.so.conf.d |
---|
208 | echo "%{_libdir}/%{drivername}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{ld_so_conf_file} |
---|
209 | %ifarch x86_64 |
---|
210 | echo "%{_prefix}/lib/%{drivername}" >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{ld_so_conf_file} |
---|
211 | %endif |
---|
212 | |
---|
213 | |
---|
214 | ## # Install modprobe.d file |
---|
215 | ## %{__install} -D -p -m 0644 %{SOURCE5} \ |
---|
216 | ## %{buildroot}%{_sysconfdir}/modprobe.d/nvidia.conf |
---|
217 | |
---|
218 | ## # Install blacklist-nouveau.conf |
---|
219 | ## %{__install} -D -p -m 0644 %{SOURCE7} \ |
---|
220 | ## %{buildroot}%{_sysconfdir}/modprobe.d/blacklist-nouveau.conf |
---|
221 | |
---|
222 | ## # Install ld.so.conf.d file |
---|
223 | ## %{__mkdir_p} %{buildroot}%{_sysconfdir}/ld.so.conf.d/ |
---|
224 | ## echo %{nvidialibdir} > %{buildroot}%{_sysconfdir}/ld.so.conf.d/nvidia.conf |
---|
225 | ## %ifarch x86_64 |
---|
226 | ## echo %{nvidialib32dir} >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/nvidia.conf |
---|
227 | ## %endif |
---|
228 | |
---|
229 | ## # Install profile.d files |
---|
230 | ## %{__install} -D -p -m 0644 %{SOURCE2} \ |
---|
231 | ## %{buildroot}%{_sysconfdir}/profile.d/nvidia.sh |
---|
232 | ## %{__install} -D -p -m 0644 %{SOURCE3} \ |
---|
233 | ## %{buildroot}%{_sysconfdir}/profile.d/nvidia.csh |
---|
234 | |
---|
235 | ## # Install X configuration script |
---|
236 | ## %{__install} -D -p -m 0755 %{SOURCE4} \ |
---|
237 | ## %{buildroot}%{_sbindir}/nvidia-config-display |
---|
238 | |
---|
239 | ## # Install udev "configuration" file |
---|
240 | ## %{__install} -D -p -m 0644 %{SOURCE6} \ |
---|
241 | ## %{buildroot}%{_sysconfdir}/udev/makedev.d/60-nvidia.nodes |
---|
242 | |
---|
243 | ## # Install udev rules |
---|
244 | ## %{__install} -D -p -m 0644 %{SOURCE8} \ |
---|
245 | ## %{buildroot}%{_sysconfdir}/udev/rules.d/50-nvidia.rules |
---|
246 | |
---|
247 | |
---|
248 | %clean |
---|
249 | %{__rm} -rf %{buildroot} |
---|
250 | |
---|
251 | |
---|
252 | %post |
---|
253 | /sbin/ldconfig |
---|
254 | |
---|
255 | # Add to DKMS registry |
---|
256 | dkms add -m %{dkms_name} -v %{dkms_vers} %{?quiet} || : |
---|
257 | # Rebuild and make available for the currenty running kernel |
---|
258 | dkms build -m %{dkms_name} -v %{dkms_vers} %{?quiet} || : |
---|
259 | dkms install -m %{dkms_name} -v %{dkms_vers} %{?quiet} --force || : |
---|
260 | |
---|
261 | %preun |
---|
262 | # Remove all versions from DKMS registry |
---|
263 | dkms remove -m %{dkms_name} -v %{dkms_vers} %{?quiet} --all || : |
---|
264 | |
---|
265 | # rmmod any old driver if present and not in use (e.g. by X) |
---|
266 | rmmod fglrx > /dev/null 2>&1 || true |
---|
267 | |
---|
268 | %postun -p /sbin/ldconfig |
---|
269 | |
---|
270 | |
---|
271 | %files |
---|
272 | %defattr(-,root,root,-) |
---|
273 | %dir %{_sysconfdir}/ati |
---|
274 | %dir %{_libdir}/fglrx |
---|
275 | %config(noreplace) %{_sysconfdir}/ati/control |
---|
276 | %config %{_sysconfdir}/ati/logo.xbm.example |
---|
277 | %config %{_sysconfdir}/ati/atiogl.xml |
---|
278 | %config %{_sysconfdir}/ati/amdpcsdb.default |
---|
279 | %config %{_sysconfdir}/ati/logo_mask.xbm.example |
---|
280 | %config %{_sysconfdir}/ld.so.conf.d/ati.conf |
---|
281 | # %config %{_sysconfdir}/acpi/events/*aticonfig.conf |
---|
282 | # %{_sysconfdir}/acpi/actions/ati-powermode.sh |
---|
283 | %{_sysconfdir}/ati/authatieventsd.sh |
---|
284 | %{_sysconfdir}/ati/signature |
---|
285 | %{_initrddir}/atieventsd |
---|
286 | %{_sbindir}/atieventsd |
---|
287 | %{_sbindir}/amdnotifyui |
---|
288 | %{_sbindir}/atigetsysteminfo.sh |
---|
289 | %{_bindir}/amdupdaterandrconfig |
---|
290 | %{_bindir}/amdxdg-su |
---|
291 | %{_bindir}/aticonfig |
---|
292 | %{_bindir}/atiodcli |
---|
293 | %{_bindir}/atiode |
---|
294 | %{_bindir}/fgl_glxgears |
---|
295 | %{_bindir}/fglrxinfo |
---|
296 | #%{_bindir}/fglrx_xgamma |
---|
297 | %dir %{ati_extdir} |
---|
298 | %{ati_extdir}/libglx.so |
---|
299 | %{xorg_dridir}/fglrx_dri.so |
---|
300 | %ifarch x86_64 |
---|
301 | %dir %{xorg_dridir32} |
---|
302 | %{xorg_dridir32}/fglrx_dri.so |
---|
303 | %endif |
---|
304 | %{xorg_libdir}/modules/drivers/*fglrx*.* |
---|
305 | %{xorg_libdir}/modules/linux/*fglrx*.* |
---|
306 | %{xorg_libdir}/modules/glesx.so |
---|
307 | %{xorg_libdir}/modules/amdxmm.so |
---|
308 | %{_libdir}/%{drivername}/libati*.so |
---|
309 | %{_libdir}/%{drivername}/libAMDXvBA.so |
---|
310 | %{_libdir}/%{drivername}/libXvBAW.so |
---|
311 | %{_libdir}/%{drivername}/libfglrx_dm.so |
---|
312 | %{_libdir}/%{drivername}/*.cap |
---|
313 | %{_libdir}/%{drivername}/*.so.* |
---|
314 | %ifarch x86_64 |
---|
315 | %{_prefix}/lib/%{drivername}/libati*.so |
---|
316 | %{_prefix}/lib/%{drivername}/libAMDXvBA.so |
---|
317 | %{_prefix}/lib/%{drivername}/libXvBAW.so |
---|
318 | %{_prefix}/lib/%{drivername}/libfglrx_dm.so |
---|
319 | %{_prefix}/lib/%{drivername}/*.cap |
---|
320 | %{_prefix}/lib/%{drivername}/*.so.* |
---|
321 | %endif |
---|
322 | %{_mandir}/man[1-9]/atieventsd.* |
---|
323 | |
---|
324 | # control-center |
---|
325 | %doc common/usr/share/doc/fglrx/ATI_LICENSE.TXT |
---|
326 | %doc common/usr/share/doc/amdcccle/* |
---|
327 | %{_sysconfdir}/security/console.apps/amdcccle-su |
---|
328 | %{_sysconfdir}/pam.d/amdcccle-su |
---|
329 | %{_bindir}/amdcccle |
---|
330 | %{_miconsdir}/%{drivername}-amdcccle.png |
---|
331 | %{_iconsdir}/%{drivername}-amdcccle.png |
---|
332 | %{_liconsdir}/%{drivername}-amdcccle.png |
---|
333 | %{_datadir}/ati/amdcccle/amdcccle_*.qm |
---|
334 | %{_datadir}/applications/amdcccle.desktop |
---|
335 | %{_datadir}/applications/amdccclesu.desktop |
---|
336 | |
---|
337 | # devel |
---|
338 | %dir %{_includedir}/GL |
---|
339 | %{_includedir}/GL/*ATI.h |
---|
340 | %dir %{_includedir}/ATI |
---|
341 | %dir %{_includedir}/ATI/GL |
---|
342 | %{_includedir}/ATI/GL/*.h |
---|
343 | %{_libdir}/%{drivername}/libGL.so |
---|
344 | %{_libdir}/%{drivername}/*.a |
---|
345 | %ifarch x86_64 |
---|
346 | %{_prefix}/lib/%{drivername}/libGL.so |
---|
347 | %{_prefix}/lib/%{drivername}/*.a |
---|
348 | %endif |
---|
349 | |
---|
350 | # kernel-module - dkms |
---|
351 | %{_usrsrc}/%{drivername}-%{version}-%{release} |
---|
352 | |
---|
353 | %changelog |
---|
354 | * Sun May 29 2011 NAKAMURA Kenta <kenta@vinelinux.org> 8.85-1 |
---|
355 | - initial release for Vine Linux |
---|