2012-11-14 14:07:19 +00:00
|
|
|
# Template file for 'catalyst'
|
2014-01-01 15:10:11 +00:00
|
|
|
_desc="AMD catalyst driver for Linux"
|
|
|
|
|
2012-11-14 14:07:19 +00:00
|
|
|
pkgname=catalyst
|
2014-01-16 09:25:06 +00:00
|
|
|
version=13.12
|
2014-01-16 12:26:12 +00:00
|
|
|
revision=2
|
2012-11-14 14:07:19 +00:00
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
license="Propietary AMD license"
|
|
|
|
homepage="http://www.amd.com"
|
|
|
|
|
2013-09-19 06:10:21 +00:00
|
|
|
only_for_archs="i686 x86_64"
|
2014-01-16 09:25:06 +00:00
|
|
|
hostmakedepends="unzip wget"
|
2014-01-01 15:10:11 +00:00
|
|
|
depends="xserver-abi-video<15 ${pkgname}-dkms-${version}_${revision}"
|
|
|
|
conflicts="nvidia>=0"
|
|
|
|
short_desc="${_desc} - Libraries and Utilities"
|
2014-01-16 09:25:06 +00:00
|
|
|
nonfree=yes
|
|
|
|
create_wrksrc=yes
|
|
|
|
|
|
|
|
XBPS_FETCH_CMD="wget --referer='http://support.amd.com/en-us/download/desktop?os=Linux+x86' "
|
|
|
|
|
|
|
|
distfiles="http://www2.ati.com/drivers/linux/amd-catalyst-${version}-linux-x86.x86_64.zip"
|
|
|
|
checksum=024033f4847d1c2a182fc44e0b3df29b2d133e24aeaba390f4504a8f3361a0ca
|
2012-11-14 14:07:19 +00:00
|
|
|
|
|
|
|
|
2013-04-25 07:32:49 +00:00
|
|
|
if [ "$XBPS_MACHINE" = "i686" ]; then
|
2012-11-14 14:07:19 +00:00
|
|
|
_ARCHDIR="x86"
|
2013-04-25 07:32:49 +00:00
|
|
|
elif [ "$XBPS_MACHINE" = "x86_64" ]; then
|
2012-11-14 14:07:19 +00:00
|
|
|
_ARCHDIR="x86_64"
|
|
|
|
_ARCHLIB="64"
|
|
|
|
_ARCHXPIC="_64a"
|
|
|
|
fi
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
chmod 755 *.run
|
2013-04-25 07:35:03 +00:00
|
|
|
./amd-catalyst-*.run --extract fglrx
|
2012-11-14 14:07:19 +00:00
|
|
|
}
|
|
|
|
|
2014-01-16 09:25:06 +00:00
|
|
|
pre_install() {
|
|
|
|
cd ${wrksrc}/fglrx
|
|
|
|
|
|
|
|
for f in ${FILESDIR}/*.patch; do
|
|
|
|
patch -Np1 -i $f
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2012-11-14 14:07:19 +00:00
|
|
|
do_install() {
|
|
|
|
cd ${wrksrc}/fglrx
|
|
|
|
|
|
|
|
install -dm755 ${DESTDIR}/usr/{bin,sbin}
|
2014-01-16 09:25:06 +00:00
|
|
|
install -dm755 ${DESTDIR}/usr/lib/{dri,xorg/modules/{drivers,extensions/fglrx,linux},systemd/system}
|
2012-11-14 14:07:19 +00: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
|
|
|
|
install -m755 common/usr/sbin/* ${DESTDIR}/usr/sbin/
|
|
|
|
install -m755 common/usr/X11R6/bin/* ${DESTDIR}/usr/bin/
|
|
|
|
install -m755 arch/${_ARCHDIR}/usr/sbin/* ${DESTDIR}/usr/sbin/
|
|
|
|
install -m755 arch/${_ARCHDIR}/usr/X11R6/bin/* ${DESTDIR}/usr/bin/
|
|
|
|
|
|
|
|
# headers
|
|
|
|
install -m644 common/usr/include/GL/* ${DESTDIR}/usr/include/GL/
|
|
|
|
|
|
|
|
# xorg/dri/gl/... drivers
|
|
|
|
cd xpic${_ARCHXPIC}/usr/X11R6/lib${_ARCHLIB}/modules
|
|
|
|
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/
|
|
|
|
install -m755 extensions/fglrx/fglrx-libglx.so ${DESTDIR}/usr/lib/xorg/modules/extensions/fglrx/
|
|
|
|
|
|
|
|
cd ${wrksrc}/fglrx/arch/${_ARCHDIR}/usr/X11R6/lib${_ARCHLIB}
|
|
|
|
|
2014-01-16 09:25:06 +00:00
|
|
|
install -m755 modules/dri/fglrx_dri.so ${DESTDIR}/usr/lib/xorg/modules/drivers/
|
2014-01-16 12:26:12 +00:00
|
|
|
ln -sfr ${DESTDIR}/usr/lib/xorg/modules/drivers/fglrx_dri.so ${DESTDIR}/usr/lib/dri/fglrx_dri.so
|
2012-11-14 14:07:19 +00:00
|
|
|
install -m755 fglrx/fglrx-libGL.so.1.2 ${DESTDIR}/usr/lib/
|
|
|
|
install -m755 *.so* ${DESTDIR}/usr/lib/
|
|
|
|
install -m644 libAMDXvBA.cap ${DESTDIR}/usr/lib/
|
|
|
|
|
|
|
|
cd ${wrksrc}/fglrx/arch/${_ARCHDIR}/usr/lib${_ARCHLIB}
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
# various files
|
|
|
|
cd ${wrksrc}/fglrx/common
|
|
|
|
|
|
|
|
install -m644 usr/share/man/man8/* ${DESTDIR}/usr/share/man/man8/
|
|
|
|
install -m644 usr/share/applications/* ${DESTDIR}/usr/share/applications/
|
|
|
|
install -m644 usr/share/icons/* ${DESTDIR}/usr/share/pixmaps/
|
|
|
|
install -m644 usr/share/ati/amdcccle/* ${DESTDIR}/usr/share/ati/amdcccle/
|
|
|
|
install -m644 etc/ati/* ${DESTDIR}/etc/ati/
|
|
|
|
install -m755 ${wrksrc}/fglrx/packages/Ubuntu/dists/source/replacements/authatieventsd.sh ${DESTDIR}/etc/ati/
|
|
|
|
install -m644 etc/security/console.apps/amdcccle-su ${DESTDIR}/etc/security/console.apps/
|
|
|
|
install -m644 usr/share/applications/*.desktop ${DESTDIR}/usr/share/applications/
|
|
|
|
# use ACPI example files
|
|
|
|
install -m755 usr/share/doc/fglrx/examples/etc/acpi/*.sh ${DESTDIR}/etc/acpi/
|
|
|
|
install -m644 usr/share/doc/fglrx/examples/etc/acpi/events/* ${DESTDIR}/etc/acpi/events/
|
|
|
|
# systemd scripts
|
|
|
|
install -m644 ${FILESDIR}/atieventsd.service ${DESTDIR}/usr/lib/systemd/system/
|
|
|
|
|
|
|
|
# provided in catalyst-opencl package
|
|
|
|
rm ${DESTDIR}/usr/lib/lib{amdocl*,OpenCL}.so*
|
|
|
|
|
|
|
|
# we remove the watermark
|
|
|
|
install -m644 ${FILESDIR}/signature.from.12.9 ${DESTDIR}/etc/ati/signature
|
|
|
|
|
|
|
|
# licenses
|
|
|
|
install -Dm644 ${wrksrc}/fglrx/common/usr/share/doc/fglrx/LICENSE.TXT \
|
|
|
|
${DESTDIR}/usr/share/licenses/${pkgname}/LICENSE.TXT
|
|
|
|
install -Dm644 ${wrksrc}/fglrx/common/usr/share/doc/amdcccle/ccc_copyrights.txt \
|
|
|
|
${DESTDIR}/usr/share/licenses/${pkgname}/amdcccle_copyrights.txt
|
|
|
|
}
|
2013-04-12 06:55:23 +00:00
|
|
|
|
|
|
|
catalyst-dkms_package() {
|
2014-01-01 15:10:11 +00:00
|
|
|
short_desc="${_desc} - DKMS kernel module"
|
2013-04-12 06:55:23 +00:00
|
|
|
triggers="dkms"
|
2014-01-16 09:25:06 +00:00
|
|
|
depends="dkms"
|
2013-04-12 06:55:23 +00:00
|
|
|
dkms_modules="fglrx ${version}_${revision}"
|
2013-06-27 15:06:29 +00:00
|
|
|
nonfree=yes
|
2013-04-12 06:55:23 +00:00
|
|
|
pkg_install() {
|
|
|
|
local _fglrx=fglrx-${version}_${revision}
|
|
|
|
|
|
|
|
vmkdir usr/lib/modprobe.d
|
|
|
|
vmkdir usr/lib/modules-load.d
|
|
|
|
vmkdir usr/src/${_fglrx}
|
|
|
|
|
|
|
|
cd ${wrksrc}/fglrx
|
|
|
|
cp -r common/lib/modules/fglrx/build_mod/* ${PKGDESTDIR}/usr/src/${_fglrx}
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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 15:10:11 +00:00
|
|
|
short_desc="${_desc} - OpenCL implementation"
|
2014-01-16 09:25:06 +00:00
|
|
|
provides="libOpenCL-${version}_${revision}"
|
2013-04-12 06:55:23 +00:00
|
|
|
replaces="libOpenCL>=0"
|
2013-06-27 15:06:29 +00:00
|
|
|
nonfree=yes
|
2013-04-18 15:11:05 +00:00
|
|
|
noverifyrdeps=yes
|
2013-04-12 06:55:23 +00:00
|
|
|
pkg_install() {
|
|
|
|
cd ${wrksrc}/fglrx/arch/${_ARCHDIR}
|
|
|
|
|
|
|
|
vinstall usr/bin/clinfo 755 usr/bin
|
|
|
|
|
|
|
|
vmkdir usr/lib
|
|
|
|
vmkdir etc/OpenCL/vendors
|
|
|
|
|
|
|
|
install -m644 etc/OpenCL/vendors/amdocl*.icd ${PKGDESTDIR}/etc/OpenCL/vendors
|
|
|
|
|
|
|
|
install -m755 usr/lib${_ARCHLIB}/libamdocl*.so ${PKGDESTDIR}/usr/lib/
|
|
|
|
install -m755 usr/lib${_ARCHLIB}/libOpenCL.so.1 ${PKGDESTDIR}/usr/lib/
|
|
|
|
ln -s libOpenCL.so.1 ${PKGDESTDIR}/usr/lib/libOpenCL.so
|
|
|
|
}
|
|
|
|
}
|