Difference between revisions of "How to build custom packages for fglrx"

From ThinkWiki
Jump to: navigation, search
(Creating and installing a custom RPM for a custom-compiled kernel on {{Fedora}} 5: typo)
(cleanuo)
Line 1: Line 1:
This pages provides instructions for building custom packages for the [[fglrx]] driver. This is useful, for example, if you are using a custom-compiled kernels and want to use an orderly RPM-based installation.
+
This pages provides instructions for building and installing custom packages for the [[fglrx]] driver. This is useful if you are using a custom-compiled kernels and want to use an orderly RPM-based installation.
  
==Creating and installing a custom RPM for a custom-compiled kernel on {{Fedora}} 5==
+
==={{Fedora}} 5===
  
 
First, add the [http://rpm.livna.org rpm.livna.org] RPM repository to your [[yum]] configuration. The custom packages will be based on those of rpm.livna.org.
 
First, add the [http://rpm.livna.org rpm.livna.org] RPM repository to your [[yum]] configuration. The custom packages will be based on those of rpm.livna.org.
Line 21: Line 21:
 
</pre>
 
</pre>
  
==Creating and installing a custom RPM for a custom-compiled kernel on {{Fedora}} 4==
+
==={{Fedora}} 4===
  
 
First, add the [http://rpm.livna.org rpm.livna.org] RPM repository to your [[yum]] configuration. The custom packages will be based on those of rpm.livna.org.
 
First, add the [http://rpm.livna.org rpm.livna.org] RPM repository to your [[yum]] configuration. The custom packages will be based on those of rpm.livna.org.

Revision as of 23:54, 27 June 2006

This pages provides instructions for building and installing custom packages for the fglrx driver. This is useful if you are using a custom-compiled kernels and want to use an orderly RPM-based installation.

Fedora 5

First, add the rpm.livna.org RPM repository to your yum configuration. The custom packages will be based on those of rpm.livna.org.

yum install xorg-x11-drv-fglrx
VER=8.26.18-1.2.6.17_1.2139_FC5  # copy version string of kmod-fglrx package added by the above command
wget -c http://rpm.livna.org/fedora/5/SRPMS/fglrx-kmod-$VER.src.rpm
mkdir fglrx-workdir; cd fglrx-workdir
rpm2cpio ../fglrx-kmod-$VER.src.rpm | cpio -i
perl -i -pe 'print "#disabled: " if m/BuildRequires: +kernel/' kmodtool
perl -i -pe 'print "#disabled: " if m/Requires: +\$\{kdep\}/' kmodtool
perl -i -pe 's@(^ +ksrc)=.*$@$1=/lib/modules/%{kverrel}/build@' fglrx-kmod.spec
tar czf pack.tgz --exclude pack.tgz .
rpmbuild --tb --clean --target $(uname -m) --define "ksrc /lib/modules/$(uname -r)/build" \
  --define "kversion $(uname -r)" --define 'kvariants ""' pack.tgz
cd ..; rm -fr fglrx-workdir
sudo rpm -Uvh --oldpackage --replacepkgs ~/rpm/RPMS/$(uname -m)/kmod-fglrx-${VER/.2.6.*/}.$(uname -r).$(uname -m).rpm

Fedora 4

First, add the rpm.livna.org RPM repository to your yum configuration. The custom packages will be based on those of rpm.livna.org.

yum install ati-fglrx
VER=8.20.8.1-0.lvn.1.4  # copy version string from output of above command
wget http://rpm.livna.org/fedora/4/i386/SRPMS.lvn/ati-fglrx-$VER.src.rpm
rpmbuild --rebuild --target $(uname -m) --define "ksrc /lib/modules/$(uname -r)/build" --without userland ati-fglrx-$VER.src.rpm
rpm -Uvh --replacepkgs /usr/src/redhat/RPMS/$(uname -m)/kernel-module-fglrx-$(uname -r)-$VER.$(uname -m).rpm