xorg-x11-drv-fglrx-vl.spec 13 KB

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