-
Notifications
You must be signed in to change notification settings - Fork 25
/
PKGBUILD
204 lines (182 loc) · 11.2 KB
/
PKGBUILD
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
# Author: Janusz Lewandowski <[email protected]>
# Contributor: David McFarland <[email protected]>
# 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=24.10
major_short=24.10
minor=1787253
ubuntu_ver=22.04
repo_folder_ver=6.1.3
pkgbase=amdgpu-pro-installer
pkgname=(
amf-amdgpu-pro
amdgpu-pro-oglp
lib32-amdgpu-pro-oglp
vulkan-amdgpu-pro
lib32-vulkan-amdgpu-pro
)
pkgver=${major}_${minor}
pkgrel=1
arch=('x86_64')
url=https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-22-40
license=('custom: multiple')
groups=('Radeon_Software_for_Linux')
source=(progl::https://raw.githubusercontent.com/Ashark/archlinux-amdgpu-pro/master/progl
progl.bash-completion::https://raw.githubusercontent.com/Ashark/archlinux-amdgpu-pro/master/progl.bash-completion
https://repo.radeon.com/amdgpu/${repo_folder_ver}/ubuntu/pool/proprietary/a/amf-amdgpu-pro/amf-amdgpu-pro_1.4.34-${minor}.${ubuntu_ver}_amd64.deb
https://repo.radeon.com/amdgpu/${repo_folder_ver}/ubuntu/pool/proprietary/liba/libamdenc-amdgpu-pro/libamdenc-amdgpu-pro_1.0-${minor}.${ubuntu_ver}_amd64.deb
https://repo.radeon.com/amdgpu/${repo_folder_ver}/ubuntu/pool/proprietary/o/oglp-amdgpu-pro/libegl1-amdgpu-pro-oglp_${major_short}-${minor}.${ubuntu_ver}_i386.deb
https://repo.radeon.com/amdgpu/${repo_folder_ver}/ubuntu/pool/proprietary/o/oglp-amdgpu-pro/libegl1-amdgpu-pro-oglp_${major_short}-${minor}.${ubuntu_ver}_amd64.deb
https://repo.radeon.com/amdgpu/${repo_folder_ver}/ubuntu/pool/proprietary/o/oglp-amdgpu-pro/libgl1-amdgpu-pro-oglp-dri_${major_short}-${minor}.${ubuntu_ver}_i386.deb
https://repo.radeon.com/amdgpu/${repo_folder_ver}/ubuntu/pool/proprietary/o/oglp-amdgpu-pro/libgl1-amdgpu-pro-oglp-dri_${major_short}-${minor}.${ubuntu_ver}_amd64.deb
https://repo.radeon.com/amdgpu/${repo_folder_ver}/ubuntu/pool/proprietary/o/oglp-amdgpu-pro/libgl1-amdgpu-pro-oglp-ext_${major_short}-${minor}.${ubuntu_ver}_amd64.deb
https://repo.radeon.com/amdgpu/${repo_folder_ver}/ubuntu/pool/proprietary/o/oglp-amdgpu-pro/libgl1-amdgpu-pro-oglp-gbm_${major_short}-${minor}.${ubuntu_ver}_amd64.deb
https://repo.radeon.com/amdgpu/${repo_folder_ver}/ubuntu/pool/proprietary/o/oglp-amdgpu-pro/libgl1-amdgpu-pro-oglp-glx_${major_short}-${minor}.${ubuntu_ver}_i386.deb
https://repo.radeon.com/amdgpu/${repo_folder_ver}/ubuntu/pool/proprietary/o/oglp-amdgpu-pro/libgl1-amdgpu-pro-oglp-glx_${major_short}-${minor}.${ubuntu_ver}_amd64.deb
https://repo.radeon.com/amdgpu/${repo_folder_ver}/ubuntu/pool/proprietary/o/oglp-amdgpu-pro/libgles1-amdgpu-pro-oglp_${major_short}-${minor}.${ubuntu_ver}_i386.deb
https://repo.radeon.com/amdgpu/${repo_folder_ver}/ubuntu/pool/proprietary/o/oglp-amdgpu-pro/libgles1-amdgpu-pro-oglp_${major_short}-${minor}.${ubuntu_ver}_amd64.deb
https://repo.radeon.com/amdgpu/${repo_folder_ver}/ubuntu/pool/proprietary/o/oglp-amdgpu-pro/libgles2-amdgpu-pro-oglp_${major_short}-${minor}.${ubuntu_ver}_i386.deb
https://repo.radeon.com/amdgpu/${repo_folder_ver}/ubuntu/pool/proprietary/o/oglp-amdgpu-pro/libgles2-amdgpu-pro-oglp_${major_short}-${minor}.${ubuntu_ver}_amd64.deb
https://repo.radeon.com/amdgpu/${repo_folder_ver}/ubuntu/pool/proprietary/v/vulkan-amdgpu-pro/vulkan-amdgpu-pro_${major_short}-${minor}.${ubuntu_ver}_i386.deb
https://repo.radeon.com/amdgpu/${repo_folder_ver}/ubuntu/pool/proprietary/v/vulkan-amdgpu-pro/vulkan-amdgpu-pro_${major_short}-${minor}.${ubuntu_ver}_amd64.deb)
sha256sums=(feb74796c3152cbafaba89d96e68a152f209bd3058c7eb0413cbe1ab0764e96f
e32801c38b475cd8df17a407726b86db3de26410f563d688325b4d4314fc5354
e6c308d24b6a4034eee7138a3fd4fdbe3692207422cc5d701e1a897159d8e347
45291643783efae295ae4e49f51f1603aa8bd1ff81db3f3f9a57e543f71065c8
151da11e9aaf7811ff6a0137153564edea0b89851a41b724e50c4068dbba4172
7e3619650a25acc50b8d767769e41ee01c6bd95d443a9d3c425494e43e8159fb
1cc76d62422ba91eccb07208639835a86a2a8a208e24148c5a00ab8dadbe03f5
96f4cab0a1f41ce48494c241fd3f5f688a2dd7ac1fe73a0314a2bc69b80b50bb
89307f78bf12f562274026790c0be8aff87116cce92f1130820345f46fd687ed
7863304a9a1238275e8fd3e39ff44c836e072898b583e6c56fda6310453ff174
8c58d20c416ab44d5fdaa37e5195deb2a964e0c8130ab22764bf2ab3518f2548
32f29d6f08101edcbb1d5552c7917bc30e4265dba5a1af7f972306fab735b613
419f33e582fe36a09b8af210ed653f60de6a0546dc4e0f1c83cd27e83ddd6861
0fb8081d1d223d9e6395662f4477ce0a9c4c87f9bb585ea8dddc18fa78197a07
4c4a97b519cad2ee6eed4589a04da2a4bcbb66601685327735728a8bde3cc6cc
c069add0f178944376468ae6fa15e26bb39d0b56d192b8686e3dd9d8c00c7475
11d2da8381c21bf48977d27298751a44ba22dbd581c7afe1376747a38b44b140
c5a619537aebfebad77bfc55a1ba2fc451c56de8407e54f937250d5639256e5a)
# 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 () {
pkgdesc="AMDGPU Pro Advanced Multimedia Framework"
license=('custom: AMDGPU-PRO EULA')
depends=("libdrm" "vulkan-icd-loader")
optdepends=("rocm-opencl-runtime: Warning unspecified optdep description"
"vulkan-radeon: Warning unspecified optdep description"
"amdgpu-dkms-firmware: Warning unspecified optdep description"
"amdgpu-dkms: Warning unspecified optdep description")
extract_deb "${srcdir}"/amf-amdgpu-pro_1.4.34-${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-oglp () {
pkgdesc="AMDGPU Pro OpenGL driver"
license=('custom: AMDGPU-PRO EULA')
provides=('libgl')
depends=("libglvnd" "libx11")
extract_deb "${srcdir}"/libegl1-amdgpu-pro-oglp_${major_short}-${minor}.${ubuntu_ver}_amd64.deb
extract_deb "${srcdir}"/libgl1-amdgpu-pro-oglp-dri_${major_short}-${minor}.${ubuntu_ver}_amd64.deb
extract_deb "${srcdir}"/libgl1-amdgpu-pro-oglp-ext_${major_short}-${minor}.${ubuntu_ver}_amd64.deb
extract_deb "${srcdir}"/libgl1-amdgpu-pro-oglp-gbm_${major_short}-${minor}.${ubuntu_ver}_amd64.deb
extract_deb "${srcdir}"/libgl1-amdgpu-pro-oglp-glx_${major_short}-${minor}.${ubuntu_ver}_amd64.deb
extract_deb "${srcdir}"/libgles1-amdgpu-pro-oglp_${major_short}-${minor}.${ubuntu_ver}_amd64.deb
extract_deb "${srcdir}"/libgles2-amdgpu-pro-oglp_${major_short}-${minor}.${ubuntu_ver}_amd64.deb
move_libdir "opt/amdgpu-pro/lib/x86_64-linux-gnu" "usr/lib"
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"
install -Dm755 "${srcdir}"/progl "${pkgdir}"/usr/bin/progl
install -Dm644 "${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
# For some reason, libs no more moved to the pro folder. Do it manually.
mv -v -t "${pkgdir}/usr/lib/amdgpu-pro" "${pkgdir}/usr/lib/lib"*
}
package_lib32-amdgpu-pro-oglp () {
pkgdesc="AMDGPU Pro OpenGL driver (32-bit)"
license=('custom: AMDGPU-PRO EULA')
provides=('lib32-libgl')
depends=("lib32-libx11")
extract_deb "${srcdir}"/libegl1-amdgpu-pro-oglp_${major_short}-${minor}.${ubuntu_ver}_i386.deb
extract_deb "${srcdir}"/libgl1-amdgpu-pro-oglp-dri_${major_short}-${minor}.${ubuntu_ver}_i386.deb
extract_deb "${srcdir}"/libgl1-amdgpu-pro-oglp-glx_${major_short}-${minor}.${ubuntu_ver}_i386.deb
extract_deb "${srcdir}"/libgles1-amdgpu-pro-oglp_${major_short}-${minor}.${ubuntu_ver}_i386.deb
extract_deb "${srcdir}"/libgles2-amdgpu-pro-oglp_${major_short}-${minor}.${ubuntu_ver}_i386.deb
move_libdir "opt/amdgpu-pro/lib/i386-linux-gnu" "usr/lib32"
move_copyright
# extra_commands:
rm "${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"
# For some reason, libs no more moved to the pro folder. Do it manually.
mkdir "${pkgdir}/usr/lib32/amdgpu-pro"
mv -v -t "${pkgdir}/usr/lib32/amdgpu-pro" "${pkgdir}/usr/lib32/lib"*
}
package_vulkan-amdgpu-pro () {
pkgdesc="AMDGPU Pro Vulkan driver"
license=('custom: AMDGPU-PRO EULA')
provides=('vulkan-driver')
depends=("vulkan-icd-loader" "wayland" "zlib")
optdepends=("openssl-1.1: Warning unspecified optdep description")
extract_deb "${srcdir}"/vulkan-amdgpu-pro_${major_short}-${minor}.${ubuntu_ver}_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 () {
pkgdesc="AMDGPU Pro Vulkan driver (32-bit)"
license=('custom: AMDGPU-PRO EULA')
provides=('lib32-vulkan-driver')
depends=("lib32-vulkan-icd-loader" "lib32-wayland" "lib32-zlib")
optdepends=("lib32-openssl-1.1: Warning unspecified optdep description")
extract_deb "${srcdir}"/vulkan-amdgpu-pro_${major_short}-${minor}.${ubuntu_ver}_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
}