-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathPKGBUILD
202 lines (180 loc) · 11.1 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
# 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=24.20
major_short=24.20
minor=2044449
ubuntu_ver=22.04
repo_folder_ver=6.2.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.35-${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
30c16bc4f83cbe376b853c1c130c0ba033008a87aaed8b53133043801cb838f0
376b7443426b899dcc62994ac7937c10b7f91cb1d9659dedbc926d9f267b607d
36cfdcddad0356411c9300407d7b4a3e380ee3d5fbdc7f2f7ba6741dfa696908
2a2cb6c0fde2ce5b200e90a2bf98fbfdbdb0ecb2751f5d398c7a0e4f5b43004c
6b778c8065a6e1f9a4dfa6b421ddaef57f1e2265b6fb026a300e11dc3321c4f9
5984902e6a929e7234810b3ec915d75410996b3087740a1afe4a43d438a3c229
6bf88a51db2841a7b769d56271ed31b503b80f9b7527b021ed4490275f3c925e
8ab7143665002c41fea63dead67f2d80630f77265caa1e2af949e10e8ade0974
030a6b176f988c04a410925105f537860af8782086252a6b7f73a52666e60868
a93dfd26663bb136c3ac2c817d13cbb37de05b36de0361cce7c68dfaf575e895
2539d83d5fea6210d42a07928b30254238838d7eeb91c37af9ac7904d20672b6
6be9ef76942a2ba89c34382d0b4bf69d279ef5e80e0c10e5d25ff722f0859d66
9b6ecc425a8884086afadb6f8c62b23621fa9e593f342fa331bc005ff07410fc
e3eb0bbb8459a6668a940458090ccf05d0db4ef50936fa17dae307dfd28f9ff0
f4a1c905417de7261f56610307b2d3e5cb4c97719b0e16f2c39b8c9af30b3293
fcf34f8a92773d8fe0ef0f2198d1a6d289a1393cbe585c788768728a8ac498ad)
# 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")
extract_deb "${srcdir}"/amf-amdgpu-pro_1.4.35-${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
}