blob: 0fb162e6f5d834785d854bb2fba527b7addf3dc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
|
# Maintainer: kerriganx
# Based on aur/amdgpu-pro-installer, patched version to enable AMF on RX 6000 series cards
# Workaround is to keep vulkan-pro files from 21.40.2 and use the amf and libamdenc from latest version
# https://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/334
# Author: Janusz Lewandowski <lew21@xtreeme.org>
# Contributor: David McFarland <corngood@gmail.com>
# Maintainer: Andrew Shark <ashark @at@ linuxcomp.ru>
# Autogenerated from AMD's Packages file
# with https://github.com/Ashark/archlinux-amdgpu-pro/blob/master/gen-PKGBUILD.py
major=22.20.3
major_=22.20
major1=21.40.2
minor=1462318
minor1=1350683
ubuntu_ver=22.04
pkgbase=amdgpu-pro-installer-fix
pkgname=(
amf-amdgpu-pro-fix
amdgpu-pro-libgl-fix
lib32-amdgpu-pro-libgl-fix
vulkan-amdgpu-pro-fix
lib32-vulkan-amdgpu-pro-fix
)
pkgver=${major}_${minor}
pkgrel=1
arch=('x86_64')
url=https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-22-20
license=('custom: multiple')
groups=('Radeon_Software_for_Linux')
makedepends=('wget')
DLAGENTS='https::/usr/bin/wget --referer https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-22-20 -N %u'
source=(progl
progl.bash-completion
http://repo.radeon.com/amdgpu/${major}/ubuntu/pool/proprietary/a/amf-amdgpu-pro/amf-amdgpu-pro_1.4.26-${minor}~${ubuntu_ver}_amd64.deb
http://repo.radeon.com/amdgpu/${major}/ubuntu/pool/proprietary/liba/libamdenc-amdgpu-pro/libamdenc-amdgpu-pro_1.0-${minor}~${ubuntu_ver}_amd64.deb
http://repo.radeon.com/amdgpu/${major}/ubuntu/pool/proprietary/o/opengl-amdgpu-pro/libegl1-amdgpu-pro_${major_}-${minor}~${ubuntu_ver}_i386.deb
http://repo.radeon.com/amdgpu/${major}/ubuntu/pool/proprietary/o/opengl-amdgpu-pro/libegl1-amdgpu-pro_${major_}-${minor}~${ubuntu_ver}_amd64.deb
http://repo.radeon.com/amdgpu/${major}/ubuntu/pool/proprietary/a/appprofiles-amdgpu-pro/libgl1-amdgpu-pro-appprofiles_${major_}-${minor}~${ubuntu_ver}_all.deb
http://repo.radeon.com/amdgpu/${major}/ubuntu/pool/proprietary/o/opengl-amdgpu-pro/libgl1-amdgpu-pro-dri_${major_}-${minor}~${ubuntu_ver}_i386.deb
http://repo.radeon.com/amdgpu/${major}/ubuntu/pool/proprietary/o/opengl-amdgpu-pro/libgl1-amdgpu-pro-dri_${major_}-${minor}~${ubuntu_ver}_amd64.deb
http://repo.radeon.com/amdgpu/${major}/ubuntu/pool/proprietary/o/opengl-amdgpu-pro/libgl1-amdgpu-pro-ext_${major_}-${minor}~${ubuntu_ver}_i386.deb
http://repo.radeon.com/amdgpu/${major}/ubuntu/pool/proprietary/o/opengl-amdgpu-pro/libgl1-amdgpu-pro-ext_${major_}-${minor}~${ubuntu_ver}_amd64.deb
http://repo.radeon.com/amdgpu/${major}/ubuntu/pool/proprietary/o/opengl-amdgpu-pro/libgl1-amdgpu-pro-glx_${major_}-${minor}~${ubuntu_ver}_i386.deb
http://repo.radeon.com/amdgpu/${major}/ubuntu/pool/proprietary/o/opengl-amdgpu-pro/libgl1-amdgpu-pro-glx_${major_}-${minor}~${ubuntu_ver}_amd64.deb
http://repo.radeon.com/amdgpu/${major}/ubuntu/pool/proprietary/o/opengl-amdgpu-pro/libglapi1-amdgpu-pro_${major_}-${minor}~${ubuntu_ver}_i386.deb
http://repo.radeon.com/amdgpu/${major}/ubuntu/pool/proprietary/o/opengl-amdgpu-pro/libglapi1-amdgpu-pro_${major_}-${minor}~${ubuntu_ver}_amd64.deb
http://repo.radeon.com/amdgpu/${major}/ubuntu/pool/proprietary/o/opengl-amdgpu-pro/libgles2-amdgpu-pro_${major_}-${minor}~${ubuntu_ver}_i386.deb
http://repo.radeon.com/amdgpu/${major}/ubuntu/pool/proprietary/o/opengl-amdgpu-pro/libgles2-amdgpu-pro_${major_}-${minor}~${ubuntu_ver}_amd64.deb
https://repo.radeon.com/amdgpu/${major1}/ubuntu/pool/proprietary/v/vulkan-amdgpu-pro/vulkan-amdgpu-pro_${major1}-${minor1}_i386.deb
https://repo.radeon.com/amdgpu/${major1}/ubuntu/pool/proprietary/v/vulkan-amdgpu-pro/vulkan-amdgpu-pro_${major1}-${minor1}_amd64.deb)
sha256sums=(feb74796c3152cbafaba89d96e68a152f209bd3058c7eb0413cbe1ab0764e96f
e32801c38b475cd8df17a407726b86db3de26410f563d688325b4d4314fc5354
c9109b2e2e7a164587e45fd872c51822bd849622c1ec9521bd850c35a8496d3c
59c33ced1b92fb8a5502d668be82e99d66f091b98cd278d8180cf79f24feca77
856444235f72d50beb3abd1833fec42f1f62269b9f275a2b78d2f3c04d6bfc81
6f7d4418ffa1d8eb910375efb7001c2eb431f49645cc03eb31de6ae41c4f7305
beabd9f8d667cedc7016373825af8c7c08aae9c68f89490bc92d3ad97add1410
906222a4ce3bc9cf37e8afda12e88b30530c94a850a754c73e0c8ec82937d560
4cff49c754da82e15af16f18cda9ab79df20695bf62b1d9a9faccb219c2e33b9
8028ae91ce406b74a6daffd44214da24eb5d7a3e77e6b415ea358ca8bc8a5b65
b6b183ed43112d2bf3ae21c4c3c9c9d26992e85c7d8cffcee08bcd68ada50675
594607da689fc267a4e1b6f33790aec262752d5029ea3c591b8375e4f0d2b011
68b5bc54f7697ebaee5dff304f9689afd7e7975b740792a170e22f4ece16ffac
921c3bb7fad2c3406f639ba3947838a90b46d6520ce3ba4a193597cdf5029420
e30bb681e2c5412db26a3a811b712c3b2064c90c733d5643c27d4a062362f26e
b4594905ab0d2e7173535f3f7d8c3527911d8c5904fb75c1cdb3c3c9c941b523
f650fcdbf5f15de5c23026602deab305d126fc55a94ede60085d2fb38f2612c8
8213fc0829262c2d0299cf4f6d1412d092d0eeda5ef4714f0022a447d79e88f5
5e8e8387da1272f34f7bf9357609f473db2aad4c8d8ce19e3d803795abdc8133)
# extracts a debian package
# $1: deb file to extract
extract_deb() {
local tmpdir="$(basename "${1%.deb}")"
rm -Rf "$tmpdir"
mkdir "$tmpdir"
cd "$tmpdir"
ar x "$1"
tar -C "${pkgdir}" -xf data.tar.xz
}
# move ubuntu specific /usr/lib/x86_64-linux-gnu to /usr/lib
# $1: debian package library dir (goes from opt/amdgpu or opt/amdgpu-pro and from x86_64 or i386)
# $2: arch package library dir (goes to usr/lib or usr/lib32)
move_libdir() {
local deb_libdir="$1"
local arch_libdir="$2"
if [ -d "${pkgdir}/${deb_libdir}" ]; then
if [ ! -d "${pkgdir}/${arch_libdir}" ]; then
mkdir -p "${pkgdir}/${arch_libdir}"
fi
mv -t "${pkgdir}/${arch_libdir}/" "${pkgdir}/${deb_libdir}"/*
find ${pkgdir} -type d -empty -delete
fi
}
# move copyright file to proper place and remove debian changelog
move_copyright() {
find ${pkgdir}/usr/share/doc -name "changelog.Debian.gz" -delete
mkdir -p ${pkgdir}/usr/share/licenses/${pkgname}
find ${pkgdir}/usr/share/doc -name "copyright" -exec mv {} ${pkgdir}/usr/share/licenses/${pkgname} \;
find ${pkgdir}/usr/share/doc -type d -empty -delete
}
package_amf-amdgpu-pro-fix () {
pkgdesc="AMDGPU Pro Advanced Multimedia Framework, patched version to enable AMF on RX 6000 series cards"
license=('custom: AMDGPU-PRO EULA')
depends=("libdrm" "vulkan-amdgpu-pro-fix=${major}_${minor}-${pkgrel}")
conflicts=('amf-amdgpu-pro')
optdepends=("rocm-opencl-runtime: Warning unspecified optdep description")
extract_deb "${srcdir}"/amf-amdgpu-pro_1.4.26-${minor}~${ubuntu_ver}_amd64.deb
extract_deb "${srcdir}"/libamdenc-amdgpu-pro_1.0-${minor}~${ubuntu_ver}_amd64.deb
move_libdir "opt/amdgpu-pro/lib/x86_64-linux-gnu" "usr/lib"
move_copyright
}
package_amdgpu-pro-libgl-fix () {
pkgdesc="AMDGPU Pro OpenGL driver, patched version to enable AMF on RX 6000 series cards"
license=('custom: AMDGPU-PRO EULA')
provides=('libgl')
conflicts=('amdgpu-pro-libgl')
depends=("libdrm" "libx11" "libxcb" "libxdamage" "libxext" "libxfixes" "libxxf86vm")
backup=(etc/amd/amdapfxx.blb)
extract_deb "${srcdir}"/libegl1-amdgpu-pro_${major_}-${minor}~${ubuntu_ver}_amd64.deb
extract_deb "${srcdir}"/libgl1-amdgpu-pro-appprofiles_${major_}-${minor}~${ubuntu_ver}_all.deb
extract_deb "${srcdir}"/libgl1-amdgpu-pro-dri_${major_}-${minor}~${ubuntu_ver}_amd64.deb
extract_deb "${srcdir}"/libgl1-amdgpu-pro-ext_${major_}-${minor}~${ubuntu_ver}_amd64.deb
extract_deb "${srcdir}"/libgl1-amdgpu-pro-glx_${major_}-${minor}~${ubuntu_ver}_amd64.deb
extract_deb "${srcdir}"/libglapi1-amdgpu-pro_${major_}-${minor}~${ubuntu_ver}_amd64.deb
extract_deb "${srcdir}"/libgles2-amdgpu-pro_${major_}-${minor}~${ubuntu_ver}_amd64.deb
move_copyright
# extra_commands:
move_libdir "usr/lib/x86_64-linux-gnu" "usr/lib"
move_libdir "opt/amdgpu-pro/lib/x86_64-linux-gnu" "usr/lib/amdgpu-pro"
move_libdir "opt/amdgpu-pro/lib/xorg" "usr/lib/amdgpu-pro/xorg"
move_libdir "opt/amdgpu/share/drirc.d" "usr/share/drirc.d"
sed -i "s|/opt/amdgpu-pro/lib/x86_64-linux-gnu|#/usr/lib/amdgpu-pro # commented to prevent problems of booting with amdgpu-pro, use progl script|" "${pkgdir}"/etc/ld.so.conf.d/10-amdgpu-pro-x86_64.conf
install -Dm755 "${srcdir}"/progl "${pkgdir}"/usr/bin/progl
install -Dm755 "${srcdir}"/progl.bash-completion "${pkgdir}"/usr/share/bash-completion/completions/progl
# For some reason, applications started with normal OpenGL (i.e. without ag pro) crashes at launch if this conf file is presented, so hide it for now, until I find out the reason of that.
mv "${pkgdir}"/usr/share/drirc.d/10-amdgpu-pro.conf "${pkgdir}"/usr/share/drirc.d/10-amdgpu-pro.conf.hide
}
package_lib32-amdgpu-pro-libgl-fix () {
pkgdesc="AMDGPU Pro OpenGL driver (32-bit), patched version to enable AMF on RX 6000 series cards"
license=('custom: AMDGPU-PRO EULA')
provides=('lib32-libgl')
conflicts=('lib32-amdgpu-pro-libgl')
depends=("amdgpu-pro-libgl-fix=${major}_${minor}-${pkgrel}" "lib32-libdrm" "lib32-libx11" "lib32-libxcb" "lib32-libxdamage" "lib32-libxext" "lib32-libxfixes" "lib32-libxxf86vm")
backup=(etc/amd/amdrc etc/ld.so.conf.d/10-amdgpu-pro-i386.conf)
extract_deb "${srcdir}"/libegl1-amdgpu-pro_${major_}-${minor}~${ubuntu_ver}_i386.deb
extract_deb "${srcdir}"/libgl1-amdgpu-pro-dri_${major_}-${minor}~${ubuntu_ver}_i386.deb
extract_deb "${srcdir}"/libgl1-amdgpu-pro-ext_${major_}-${minor}~${ubuntu_ver}_i386.deb
extract_deb "${srcdir}"/libgl1-amdgpu-pro-glx_${major_}-${minor}~${ubuntu_ver}_i386.deb
extract_deb "${srcdir}"/libglapi1-amdgpu-pro_${major_}-${minor}~${ubuntu_ver}_i386.deb
extract_deb "${srcdir}"/libgles2-amdgpu-pro_${major_}-${minor}~${ubuntu_ver}_i386.deb
move_copyright
# extra_commands:
rm "${pkgdir}"/etc/amd/amdrc "${pkgdir}"/opt/amdgpu-pro/lib/xorg/modules/extensions/libglx.so "${pkgdir}"/opt/amdgpu/share/drirc.d/10-amdgpu-pro.conf
move_libdir "usr/lib/i386-linux-gnu" "usr/lib32"
move_libdir "opt/amdgpu-pro/lib/i386-linux-gnu" "usr/lib32/amdgpu-pro"
sed -i "s|/opt/amdgpu-pro/lib/i386-linux-gnu|#/usr/lib32/amdgpu-pro # commented to prevent problems of booting with amdgpu-pro, use progl32 script|" "${pkgdir}"/etc/ld.so.conf.d/10-amdgpu-pro-i386.conf
}
package_vulkan-amdgpu-pro-fix () {
pkgdesc="AMDGPU Pro Vulkan driver, patched version to enable AMF on RX 6000 series cards"
license=('custom: AMDGPU-PRO EULA')
provides=('vulkan-driver')
conflicts=('vulkan-amdgpu-pro')
depends=("vulkan-icd-loader")
optdepends=("openssl: Warning unspecified optdep description")
extract_deb "${srcdir}"/vulkan-amdgpu-pro_${major1}-${minor1}_amd64.deb
move_libdir "opt/amdgpu-pro/lib/x86_64-linux-gnu" "usr/lib"
move_copyright
# extra_commands:
mkdir -p "${pkgdir}"/usr/share/vulkan/icd.d/
mv "${pkgdir}"/opt/amdgpu-pro/etc/vulkan/icd.d/amd_icd64.json "${pkgdir}"/usr/share/vulkan/icd.d/amd_pro_icd64.json
mv "${pkgdir}"/usr/lib/amdvlk64.so "${pkgdir}"/usr/lib/amdvlkpro64.so
sed -i "s#/opt/amdgpu-pro/lib/x86_64-linux-gnu/amdvlk64.so#/usr/lib/amdvlkpro64.so#" "${pkgdir}"/usr/share/vulkan/icd.d/amd_pro_icd64.json
find ${pkgdir} -type d -empty -delete
}
package_lib32-vulkan-amdgpu-pro-fix () {
pkgdesc="AMDGPU Pro Vulkan driver (32-bit), patched version to enable AMF on RX 6000 series cards"
license=('custom: AMDGPU-PRO EULA')
provides=('lib32-vulkan-driver')
conflicts=('lib32-vulkan-amdgpu-pro')
depends=("lib32-vulkan-icd-loader")
optdepends=("lib32-openssl: Warning unspecified optdep description")
extract_deb "${srcdir}"/vulkan-amdgpu-pro_${major1}-${minor1}_i386.deb
move_libdir "opt/amdgpu-pro/lib/i386-linux-gnu" "usr/lib32"
move_copyright
# extra_commands:
mkdir -p "${pkgdir}"/usr/share/vulkan/icd.d/
mv "${pkgdir}"/opt/amdgpu-pro/etc/vulkan/icd.d/amd_icd32.json "${pkgdir}"/usr/share/vulkan/icd.d/amd_pro_icd32.json
mv "${pkgdir}"/usr/lib32/amdvlk32.so "${pkgdir}"/usr/lib32/amdvlkpro32.so
sed -i "s#/opt/amdgpu-pro/lib/i386-linux-gnu/amdvlk32.so#/usr/lib32/amdvlkpro32.so#" "${pkgdir}"/usr/share/vulkan/icd.d/amd_pro_icd32.json
find ${pkgdir} -type d -empty -delete
}
|