2012-11-14 15:07:19 +01:00
|
|
|
# Template file for 'catalyst'
|
2014-01-01 16:10:11 +01:00
|
|
|
_desc="AMD catalyst driver for Linux"
|
2014-12-09 16:06:10 +01:00
|
|
|
_distver="14.12"
|
2014-01-01 16:10:11 +01:00
|
|
|
|
2012-11-14 15:07:19 +01:00
|
|
|
pkgname=catalyst
|
2014-12-09 16:06:10 +01:00
|
|
|
version=14.501.1003
|
|
|
|
revision=1
|
2012-11-14 15:07:19 +01:00
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
license="Propietary AMD license"
|
|
|
|
homepage="http://www.amd.com"
|
|
|
|
|
2013-09-19 08:10:21 +02:00
|
|
|
only_for_archs="i686 x86_64"
|
2014-01-16 10:25:06 +01:00
|
|
|
hostmakedepends="unzip wget"
|
2014-09-13 11:44:35 +02:00
|
|
|
depends="virtual?xserver-abi-video<19_1 ${pkgname}-dkms-${version}_${revision}"
|
2014-01-01 16:10:11 +01:00
|
|
|
conflicts="nvidia>=0"
|
2014-03-07 16:36:27 +01:00
|
|
|
provides="libGL-${version}_${revision}"
|
|
|
|
replaces="libGL>=0"
|
2014-01-01 16:10:11 +01:00
|
|
|
short_desc="${_desc} - Libraries and Utilities"
|
2014-11-01 13:10:22 +01:00
|
|
|
repository="nonfree"
|
2014-01-16 10:25:06 +01:00
|
|
|
create_wrksrc=yes
|
2014-12-09 16:06:10 +01:00
|
|
|
build_wrksrc="fglrx-${version}"
|
2014-01-16 10:25:06 +01:00
|
|
|
|
2014-12-09 16:06:10 +01:00
|
|
|
XBPS_FETCH_CMD="wget --referer='http://support.amd.com/en-us/download/desktop?os=Linux+x86' "
|
|
|
|
|
|
|
|
update_pkgname="amd-catalyst-omega"
|
|
|
|
distfiles="http://www2.ati.com/drivers/linux/amd-catalyst-omega-${_distver}-linux-run-installers.zip"
|
|
|
|
checksum=68669836f20ad4351e08b13c5766c6b2ffc6b8cd2a37e9baf55779da32d3a249
|
2012-11-14 15:07:19 +01:00
|
|
|
|
2013-04-25 09:32:49 +02:00
|
|
|
if [ "$XBPS_MACHINE" = "i686" ]; then
|
2012-11-14 15:07:19 +01:00
|
|
|
_ARCHDIR="x86"
|
2013-04-25 09:32:49 +02:00
|
|
|
elif [ "$XBPS_MACHINE" = "x86_64" ]; then
|
2012-11-14 15:07:19 +01:00
|
|
|
_ARCHDIR="x86_64"
|
|
|
|
_ARCHLIB="64"
|
|
|
|
_ARCHXPIC="_64a"
|
|
|
|
fi
|
|
|
|
|
2014-12-09 16:06:10 +01:00
|
|
|
do_build() {
|
|
|
|
chmod 755 *.run
|
|
|
|
./amd-driver-*.run --extract fglrx
|
2014-12-09 16:40:21 +01:00
|
|
|
cd fglrx
|
|
|
|
patch -Np1 -i ${FILESDIR}/fglrx_3.17rc6-no_hotplug.patch
|
|
|
|
patch -Np1 -i ${FILESDIR}/lano1106_fglrx-13.8_proc.patch
|
2014-12-09 16:06:10 +01:00
|
|
|
}
|
2012-11-14 15:07:19 +01:00
|
|
|
do_install() {
|
2014-12-09 16:06:10 +01:00
|
|
|
cd fglrx
|
|
|
|
|
2012-11-14 15:07:19 +01:00
|
|
|
install -dm755 ${DESTDIR}/usr/{bin,sbin}
|
2014-01-16 10:25:06 +01:00
|
|
|
install -dm755 ${DESTDIR}/usr/lib/{dri,xorg/modules/{drivers,extensions/fglrx,linux},systemd/system}
|
2012-11-14 15:07:19 +01:00
|
|
|
install -dm755 ${DESTDIR}/usr/include/GL
|
|
|
|
install -dm755 ${DESTDIR}/etc/{ati,acpi/events,security/console.apps}
|
|
|
|
install -dm755 ${DESTDIR}/usr/share/{applications,ati/amdcccle,man/man8,pixmaps}
|
|
|
|
|
|
|
|
# binaries
|
2014-12-09 16:06:10 +01:00
|
|
|
install -m755 common/usr/sbin/* ${DESTDIR}/usr/sbin/
|
|
|
|
install -m755 common/usr/X11R6/bin/* ${DESTDIR}/usr/bin/
|
2012-11-14 15:07:19 +01:00
|
|
|
install -m755 arch/${_ARCHDIR}/usr/sbin/* ${DESTDIR}/usr/sbin/
|
|
|
|
install -m755 arch/${_ARCHDIR}/usr/X11R6/bin/* ${DESTDIR}/usr/bin/
|
|
|
|
|
|
|
|
# headers
|
2014-12-09 16:06:10 +01:00
|
|
|
install -m644 common/usr/include/GL/* ${DESTDIR}/usr/include/GL/
|
2012-11-14 15:07:19 +01:00
|
|
|
|
|
|
|
# xorg/dri/gl/... drivers
|
2014-12-09 16:06:10 +01:00
|
|
|
pushd xpic${_ARCHXPIC}/usr/X11R6/lib${_ARCHLIB}/modules
|
2012-11-14 15:07:19 +01:00
|
|
|
install -m755 *.so ${DESTDIR}/usr/lib/xorg/modules/
|
|
|
|
install -m755 drivers/*.so ${DESTDIR}/usr/lib/xorg/modules/drivers/
|
|
|
|
install -m755 linux/*.so ${DESTDIR}/usr/lib/xorg/modules/linux/
|
2014-03-07 16:36:27 +01:00
|
|
|
install -m755 extensions/fglrx/fglrx-libglx.so ${DESTDIR}/usr/lib/xorg/modules/extensions
|
|
|
|
ln -sf fglrx-libglx.so ${DESTDIR}/usr/lib/xorg/modules/extensions/libglx.so
|
|
|
|
ln -sf fglrx-libglx.so ${DESTDIR}/usr/lib/xorg/modules/extensions/libglx.so.1
|
2014-12-09 16:06:10 +01:00
|
|
|
popd
|
2012-11-14 15:07:19 +01:00
|
|
|
|
2014-12-09 16:06:10 +01:00
|
|
|
pushd arch/${_ARCHDIR}/usr/X11R6/lib${_ARCHLIB}
|
2014-01-16 10:25:06 +01:00
|
|
|
install -m755 modules/dri/fglrx_dri.so ${DESTDIR}/usr/lib/xorg/modules/drivers/
|
2014-01-16 13:26:12 +01:00
|
|
|
ln -sfr ${DESTDIR}/usr/lib/xorg/modules/drivers/fglrx_dri.so ${DESTDIR}/usr/lib/dri/fglrx_dri.so
|
2012-11-14 15:07:19 +01:00
|
|
|
install -m755 fglrx/fglrx-libGL.so.1.2 ${DESTDIR}/usr/lib/
|
2014-03-07 16:36:27 +01:00
|
|
|
ln -sf fglrx-libGL.so.1.2 ${DESTDIR}/usr/lib/libGL.so
|
|
|
|
ln -sf fglrx-libGL.so.1.2 ${DESTDIR}/usr/lib/libGL.so.1
|
2012-11-14 15:07:19 +01:00
|
|
|
install -m755 *.so* ${DESTDIR}/usr/lib/
|
|
|
|
install -m644 libAMDXvBA.cap ${DESTDIR}/usr/lib/
|
2014-12-09 16:06:10 +01:00
|
|
|
popd
|
2012-11-14 15:07:19 +01:00
|
|
|
|
2014-12-09 16:06:10 +01:00
|
|
|
pushd arch/${_ARCHDIR}/usr/lib${_ARCHLIB}
|
2012-11-14 15:07:19 +01:00
|
|
|
install -m755 *.so* ${DESTDIR}/usr/lib/
|
|
|
|
# needed symlinks
|
|
|
|
ln -s libatiuki.so.1.0 ${DESTDIR}/usr/lib/libatiuki.so.1
|
|
|
|
ln -s libAMDXvBA.so.1.0 ${DESTDIR}/usr/lib/libAMDXvBA.so.1
|
|
|
|
ln -s libXvBAW.so.1.0 ${DESTDIR}/usr/lib/libXvBAW.so
|
|
|
|
ln -s libfglrx_dm.so.1.0 ${DESTDIR}/usr/lib/libfglrx_dm.so.1
|
2014-12-09 16:06:10 +01:00
|
|
|
popd
|
|
|
|
|
2012-11-14 15:07:19 +01:00
|
|
|
# various files
|
2014-12-09 16:06:10 +01:00
|
|
|
install -m644 common/usr/share/man/man8/* ${DESTDIR}/usr/share/man/man8/
|
|
|
|
install -m644 common/usr/share/applications/* ${DESTDIR}/usr/share/applications/
|
|
|
|
install -m644 common/usr/share/icons/* ${DESTDIR}/usr/share/pixmaps/
|
|
|
|
install -m644 common/usr/share/ati/amdcccle/* ${DESTDIR}/usr/share/ati/amdcccle/
|
|
|
|
install -m644 common/etc/ati/* ${DESTDIR}/etc/ati/
|
|
|
|
install -m644 common/usr/share/applications/*.desktop ${DESTDIR}/usr/share/applications/
|
2012-11-14 15:07:19 +01:00
|
|
|
# use ACPI example files
|
2014-12-09 16:06:10 +01:00
|
|
|
install -m755 common/usr/share/doc/fglrx/examples/etc/acpi/*.sh ${DESTDIR}/etc/acpi/
|
|
|
|
install -m644 common/usr/share/doc/fglrx/examples/etc/acpi/events/* ${DESTDIR}/etc/acpi/events/
|
2012-11-14 15:07:19 +01:00
|
|
|
|
|
|
|
# provided in catalyst-opencl package
|
|
|
|
rm ${DESTDIR}/usr/lib/lib{amdocl*,OpenCL}.so*
|
|
|
|
|
|
|
|
# we remove the watermark
|
2014-12-09 16:06:10 +01:00
|
|
|
install -m644 common/etc/ati/* ${DESTDIR}/etc/ati/
|
2012-11-14 15:07:19 +01:00
|
|
|
|
|
|
|
# licenses
|
2014-12-09 16:06:10 +01:00
|
|
|
install -Dm644 common/usr/share/doc/fglrx/LICENSE.TXT \
|
2012-11-14 15:07:19 +01:00
|
|
|
${DESTDIR}/usr/share/licenses/${pkgname}/LICENSE.TXT
|
2014-12-09 16:06:10 +01:00
|
|
|
install -Dm644 common/usr/share/doc/amdcccle/ccc_copyrights.txt \
|
2012-11-14 15:07:19 +01:00
|
|
|
${DESTDIR}/usr/share/licenses/${pkgname}/amdcccle_copyrights.txt
|
|
|
|
}
|
2013-04-12 08:55:23 +02:00
|
|
|
|
|
|
|
catalyst-dkms_package() {
|
2014-01-01 16:10:11 +01:00
|
|
|
short_desc="${_desc} - DKMS kernel module"
|
2013-04-12 08:55:23 +02:00
|
|
|
triggers="dkms"
|
2014-01-16 10:25:06 +01:00
|
|
|
depends="dkms"
|
2013-04-12 08:55:23 +02:00
|
|
|
dkms_modules="fglrx ${version}_${revision}"
|
|
|
|
pkg_install() {
|
|
|
|
local _fglrx=fglrx-${version}_${revision}
|
|
|
|
|
2014-09-14 10:15:47 +02:00
|
|
|
vmkdir usr/lib/dracut/dracut.conf.d
|
2013-04-12 08:55:23 +02:00
|
|
|
vmkdir usr/lib/modprobe.d
|
|
|
|
vmkdir usr/lib/modules-load.d
|
|
|
|
vmkdir usr/src/${_fglrx}
|
|
|
|
|
2014-12-09 16:06:10 +01:00
|
|
|
cd ${wrksrc}/${build_wrksrc}/fglrx
|
|
|
|
cp -r common/lib/modules/fglrx/build_mod/* ${PKGDESTDIR}/usr/src/${_fglrx}
|
2013-04-12 08:55:23 +02:00
|
|
|
|
|
|
|
vinstall arch/${_ARCHDIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a 644 usr/src/${_fglrx}
|
|
|
|
|
|
|
|
vinstall ${FILESDIR}/dkms.conf 644 usr/src/${_fglrx}
|
|
|
|
|
|
|
|
sed -i -e "s/@VERSION@/${version}-${revision}/" ${PKGDESTDIR}/usr/src/${_fglrx}/dkms.conf
|
2014-09-14 10:15:47 +02:00
|
|
|
|
|
|
|
echo "omit_dracutmodules+=\" drm \"" > ${PKGDESTDIR}/usr/lib/dracut/dracut.conf.d/catalyst.conf
|
2013-04-12 08:55:23 +02:00
|
|
|
echo "blacklist radeon" > ${PKGDESTDIR}/usr/lib/modprobe.d/catalyst.conf
|
|
|
|
echo "fglrx" > ${PKGDESTDIR}/usr/lib/modules-load.d/catalyst.conf
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catalyst-opencl_package() {
|
2014-01-01 16:10:11 +01:00
|
|
|
short_desc="${_desc} - OpenCL implementation"
|
2014-07-23 16:02:22 +02:00
|
|
|
depends="libOpenCL"
|
2013-04-12 08:55:23 +02:00
|
|
|
pkg_install() {
|
2014-12-09 16:06:10 +01:00
|
|
|
cd ${wrksrc}/${build_wrksrc}/fglrx/arch/${_ARCHDIR}
|
2013-04-12 08:55:23 +02:00
|
|
|
|
|
|
|
vmkdir usr/lib
|
|
|
|
vmkdir etc/OpenCL/vendors
|
|
|
|
|
2014-09-13 11:44:35 +02:00
|
|
|
vbin usr/bin/clinfo
|
2013-04-12 08:55:23 +02:00
|
|
|
install -m644 etc/OpenCL/vendors/amdocl*.icd ${PKGDESTDIR}/etc/OpenCL/vendors
|
|
|
|
install -m755 usr/lib${_ARCHLIB}/libamdocl*.so ${PKGDESTDIR}/usr/lib/
|
|
|
|
}
|
|
|
|
}
|