source: projects/specs/trunk/nonfree/xorg-x11-drv-fglrx/xorg-x11-drv-fglrx-vl.spec @ 3989

Revision 3989, 13.4 KB checked in by kenta, 11 years ago (diff)

import xorg-x11-drv-fglrx

AMD Catalyst Proprietary Display Driver

Line 
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
22Summary: X Window display driver for the ATI graphics accelerators
23Summary(ja): プロプライエタリな ATI グラフィックス・アクセラレーターのためのディスプレイ・ドライバ
24Name: xorg-x11-drv-fglrx
25Version: 8.85
26Release: 1%{?_dist_release}
27License: Other License(s), see package
28Group: User Interface/X Hardware Support
29URL: http://ati.amd.com/support/driver.html
30Vendor: Project Vine
31Distribution: Vine Linux
32Packager: kenta
33ExclusiveArch: i686 x86_64
34
35Source0: http://www2.ati.com/drivers/linux/ati-driver-installer-11-5-x86.x86_64.run
36Source1: atieventsd.init
37
38BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
39# Required for proper dkms operation
40Requires: gcc, make
41Requires(post): dkms, /sbin/ldconfig
42Requires(preun): dkms
43
44%description
45The display drivers for the ATI Radeon, Mobility Radeon, Radeon Xpress IGP, and
46FireGL series of graphics graphics accelerators. This driver works only with post
47R200 (Radeon 9200) graphics cards. This package provides 2D display drivers,
48precompiled kernel modules, kernel module build environment, control
49panel source code and hardware accelerated OpenGL.
50
51INSTALLING THIS PACKAGE WILL TAINT YOUR KERNEL, SO PLEASE DO NOT REPORT *ANY*
52BUGS 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 "."
70sh %{SOURCE0} --extract .
71mkdir 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
81install -d -m755 %{buildroot}%{_usrsrc}/%{drivername}-%{version}-%{release}
82cp -a common/lib/modules/fglrx/build_mod/* %{buildroot}%{_usrsrc}/%{drivername}-%{version}-%{release}
83cp -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'
92PACKAGE_NAME=%{dkms_name}
93PACKAGE_VERSION=%{dkms_vers}
94BUILT_MODULE_NAME[0]=fglrx
95DEST_MODULE_LOCATION[0]=/kernel/drivers/char/drm
96MAKE[0]="KERNEL_PATH=\${kernel_source_dir} sh make.sh --uname_r=\${kernelver} --uname_a=none"
97CLEAN="rm -rf 2.6.x/.tmp_versions; make -C2.6.x clean"
98AUTOINSTALL=YES
99EOF
100
101# headers
102install -d -m755                %{buildroot}%{_includedir}
103cp -a common/usr/include/*      %{buildroot}%{_includedir}
104chmod 0644 %{buildroot}%{_includedir}/*/*.h
105
106# install binaries
107install -d -m755                                        %{buildroot}%{_sbindir}
108install -m755 %{archdir}/usr/sbin/*                     %{buildroot}%{_sbindir}
109install -m755 common/usr/sbin/*                         %{buildroot}%{_sbindir}
110install -d -m755                                        %{buildroot}%{_bindir}
111install -m755 %{archdir}/usr/X11R6/bin/*                %{buildroot}%{_bindir}
112install -m755 common/usr/X11R6/bin/*                    %{buildroot}%{_bindir}
113
114# atieventsd initscript
115install -d -m755 %{buildroot}%{_initrddir}
116install -m755 %{SOURCE1} %{buildroot}%{_initrddir}/atieventsd
117
118# amdcccle data files
119install -d -m755 %{buildroot}%{_datadir}/ati/amdcccle
120rm -f amdcccle.langs
121for 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
131done
132
133# amdcccle super-user mode
134install -d -m755 %{buildroot}%{_sysconfdir}/security/console.apps
135install -d -m755 %{buildroot}%{_sysconfdir}/pam.d
136install -m644 common/etc/security/console.apps/* %{buildroot}%{_sysconfdir}/security/console.apps
137ln -s su %{buildroot}%{_sysconfdir}/pam.d/amdcccle-su
138
139# man pages
140install -d -m755 %{buildroot}%{_mandir}/man1 %{buildroot}%{_mandir}/man8
141install -m644 common/usr/share/man/man8/* %{buildroot}%{_mandir}/man8
142
143# menu entry
144install -d -m755 %{buildroot}%{_datadir}/applications
145install -m644 common/usr/share/applications/* %{buildroot}%{_datadir}/applications
146sed -i 's,^Icon=.*$,Icon=%{drivername}-amdcccle,' %{buildroot}%{_datadir}/applications/*.desktop
147# control center doesn't really use GNOME/KDE libraries:
148sed -i 's,GNOME;KDE;,,' %{buildroot}%{_datadir}/applications/*.desktop
149
150
151# icons
152install -d -m755 %{buildroot}%{_miconsdir} %{buildroot}%{_iconsdir} %{buildroot}%{_liconsdir}
153convert common/usr/share/icons/ccc_large.xpm -resize 16x16 %{buildroot}%{_miconsdir}/%{drivername}-amdcccle.png
154convert common/usr/share/icons/ccc_large.xpm -resize 32x32 %{buildroot}%{_iconsdir}/%{drivername}-amdcccle.png
155convert common/usr/share/icons/ccc_large.xpm -resize 48x48 %{buildroot}%{_liconsdir}/%{drivername}-amdcccle.png
156
157# install libraries
158install -d -m755                                        %{buildroot}%{_libdir}/%{drivername}
159install -m755 %{archdir}/usr/X11R6/%{_lib}/fglrx/*      %{buildroot}%{_libdir}/%{drivername}
160install -m755 %{archdir}/usr/X11R6/%{_lib}/*.*          %{buildroot}%{_libdir}/%{drivername}
161install -m755 %{archdir}/usr/%{_lib}/*.*                %{buildroot}%{_libdir}/%{drivername}
162mv %{buildroot}%{_libdir}/%{drivername}/{fglrx-,}libGL.so.1.2
163chmod 0644                                              %{buildroot}%{_libdir}/%{drivername}/*.a
164# create devel symlinks
165for file in %{buildroot}%{_libdir}/%{drivername}/*.so.*.*; do
166        ln -s $(basename $file) ${file%%.so*}.so;
167done
168
169%ifarch x86_64
170install -d -m755                                        %{buildroot}%{_prefix}/lib/%{drivername}
171install -m755 arch/x86/usr/X11R6/lib/fglrx/*            %{buildroot}%{_prefix}/lib/%{drivername}
172install -m755 arch/x86/usr/X11R6/lib/*.*                %{buildroot}%{_prefix}/lib/%{drivername}
173install -m755 arch/x86/usr/lib/*.*                      %{buildroot}%{_prefix}/lib/%{drivername}
174mv %{buildroot}%{_prefix}/lib/%{drivername}/{fglrx-,}libGL.so.1.2
175chmod 0644                                              %{buildroot}%{_prefix}/lib/%{drivername}/*.a
176# create devel symlinks
177for file in %{buildroot}%{_prefix}/lib/%{drivername}/*.so.*.*; do
178        ln -s $(basename $file) ${file%%.so*}.so;
179done
180%endif
181
182
183# install X.org files
184install -d -m755                                                %{buildroot}%{xorg_libdir}/modules/drivers
185install -m755 %{xverdir}/usr/X11R6/%{_lib}/modules/drivers/*.so* %{buildroot}%{xorg_libdir}/modules/drivers
186install -d -m755                                                %{buildroot}%{xorg_libdir}/modules/linux
187install -m755 %{xverdir}/usr/X11R6/%{_lib}/modules/linux/*.so*  %{buildroot}%{xorg_libdir}/modules/linux
188install -m644 %{xverdir}/usr/X11R6/%{_lib}/modules/*.*o         %{buildroot}%{xorg_libdir}/modules
189install -d -m755                                                %{buildroot}%{ati_extdir}
190install -m755 %{xverdir}/usr/X11R6/%{_lib}/modules/extensions/fglrx/*.so* %{buildroot}%{ati_extdir}
191mv %{buildroot}%{ati_extdir}/{fglrx-,}libglx.so
192
193# etc files
194install -d -m755                %{buildroot}%{_sysconfdir}/ati
195install -m644 common/etc/ati/*  %{buildroot}%{_sysconfdir}/ati
196chmod 0755                      %{buildroot}%{_sysconfdir}/ati/*.sh
197
198# dri libraries
199install -d -m755                                                %{buildroot}%{xorg_dridir}
200install -m755 %{archdir}/usr/X11R6/%{_lib}/modules/dri/*        %{buildroot}%{xorg_dridir}
201%ifarch x86_64
202install -d -m755                                                %{buildroot}%{xorg_dridir32}
203install -m755 arch/x86/usr/X11R6/lib/modules/dri/*              %{buildroot}%{xorg_dridir32}
204%endif
205
206# ld.so.conf
207install -d -m755                        %{buildroot}%{_sysconfdir}/ld.so.conf.d
208echo "%{_libdir}/%{drivername}" >       %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{ld_so_conf_file}
209%ifarch x86_64
210echo "%{_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
256dkms add -m %{dkms_name} -v %{dkms_vers} %{?quiet} || :
257# Rebuild and make available for the currenty running kernel
258dkms build -m %{dkms_name} -v %{dkms_vers} %{?quiet} || :
259dkms install -m %{dkms_name} -v %{dkms_vers} %{?quiet} --force || :
260
261%preun
262# Remove all versions from DKMS registry
263dkms 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)
266rmmod 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
Note: See TracBrowser for help on using the repository browser.