unreal-engine
maintainer alexbelm48
· 75 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The source is a toolchain SDK from Epic Games' official cdn.unrealengine.com domain, which is a legitimate and expected source for Unreal Engine components; downloading build tools from the vendor's CDN is normal for AUR packages and poses no inherent risk.
Triggered rules
LOW
AI review downgraded a static finding
llm_review
The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-07-25) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The source is a toolchain SDK from Epic Games' official cdn.unrealengine.com domain, which is a legitimate and expected source for Unreal Engine components; downloading build tools from the vendor's CDN is normal for AUR packages and poses no inherent risk.
1 higher static finding superseded - not the current verdict (shown for transparency)
MEDIUM
source=() URL on a non-standard host
source_untrusted_domain
One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).
-
PKGBUILD:33
source=("${UE_SDK_VERSION}.tar.gz::https://cdn.unrealengine.com/Toolchain_Linux/${UE_SDK_VERSION}.tar.gz"
PKGBUILD
1 offending line(s) highlighted
1
# Old Maintainer: Dylan Ferris <dylan@psilly.com>
2
# Old Maintainer: Michael Lojkovic <mikelojkovic@gmail.com>
3
# Old Maintainer: Shatur95 <genaloner@gmail.com>
4
# Old Maintainer: slx
5
# Old Co-Maintainer: Neko-san <nekoNexus at protonmail dot ch>
6
# Maintainer: Alexis Belmonte <alexbelm48@gmail.com>
7
8
# The source is about 200 MiB, with an extra ~11 GiB of dependencies downloaded in Setup.sh, and may take several hours to compile.
9
# If you want additional options, there are switches below.
10
pkgname=unreal-engine
11
pkgver=5.6.1
12
pkgrel=1
13
## Check unreal-engine/Engine/Config/Linux/Linux_SDK.json (MainVersion value) for what the below should be set to
14
UE_SDK_VERSION="native-linux-v26_clang-20.1.8-rockylinux8"
15
pkgdesc='A 3D game engine by Epic Games which can be used non-commercially for free.'
16
arch=('x86_64' 'x86_64_v2' 'x86_64_v3' 'x86_64_v4' 'aarch64')
17
url=https://www.unrealengine.com/
18
makedepends=('git' 'openssh' 'sed' 'grep' 'glibc' 'wget' 'rsync')
19
depends=('sdl3' 'python' 'dotnet-runtime' 'dotnet-sdk' 'vulkan-icd-loader' 'lld' 'xdg-user-dirs' 'dos2unix' 'openssl' 'steam' 'coreutils' 'findutils')
20
optdepends=('polly: for potentially increased performance'
21
'qt5-base: qmake build system for projects'
22
'cmake: build system for projects'
23
'qtcreator: IDE for projects'
24
'codelite: IDE for projects'
25
'kdevelop: IDE for projects'
26
'clion: IDE for projects'
27
'rider: IDE for projects'
28
'code: IDE for projects'
29
'pacman-contrib: for the paccache cleaning hook'
30
'fake-ms-fonts: Font support for "demo/free/sample/example/tutorial" projects'
31
'ttf-ms-fonts: Font support for "demo/free/sample/example/tutorial" projects')
32
license=('custom:UnrealEngine' 'GPL3')
33
source=("${UE_SDK_VERSION}.tar.gz::https://cdn.unrealengine.com/Toolchain_Linux/${UE_SDK_VERSION}.tar.gz"
34
'unreal-engine.sh'
35
'com.unrealengine.UE5Editor.desktop'
36
'0001-override-shared-target-build.patch'
37
'0002-suppress-scriptbuild-warnings-for-5-6.patch'
38
'unreal-engine-5-pacman-cache.hook'
39
'ue5editor.svg')
40
sha256sums=('6eef42679b744cdcb50276f2d7cff0a51f7ddd632960e06bfbc3f6b9508ef615'
41
'55a8ad79c2e502bc5919249b9d1804ad405795b36630ab2f23aeb99dd218e5f4'
42
'aa09746f9db93713f470ef19390a89b279fd5a335835ad95eab6cdaafa1b9e99'
43
'cd512e3fc08aaaa783e8df4a6dcb567a35502c32a6cedf8d4d71ebfa75272735'
44
'e01efe8559076f977c44ab656432a3c8e793e4c7f2b42855f736a08b6f551cf1'
45
'9386160a91594abeeaf4fe02fea562e7a4ead4c6f9a258c2a37b2e5f10e7deca'
46
'b00c398b63f15084c46f3963f62a45284ecd8dae9ba6f38a2c4af370bbfdab8d')
47
# Not sure if compiling Unreal with LTO is legal? Lot's of different proprietary software goes into Unreal
48
options=('!strip' 'staticlibs') # Package is smaller with "strip" but it takes a long time and generates many warnings
49
50
# Default engine installation directory. Can be useful if you do not have a lot of space on the default storage drive
51
# DON'T put a "/" at the start of the path
52
## Set this as an environment variable in /etc/makepkg.conf if you want predefined behavior
53
if [[ "${UE_INSTALL_DIR}" == "" ]]; then
54
export UE_INSTALL_DIR="opt/${pkgname}"
55
fi
56
57
# Change this to true if you have a modern system and don't mind the extra packaging time (and size) to avoid compiling shaders on UE startup later; set to false by default for those with less robust systems
58
## Set this as an environment variable in /etc/makepkg.conf if you want predefined behavior
59
if [[ "${UE_WITH_DDC}" != "true" && "${UE_WITH_DDC}" != "false" ]]; then
60
export UE_WITH_DDC=true
61
fi
62
63
# Enable Win64 toolchain/components in BuildGraph for cross-compilation targets
64
## Set this as an environment variable in /etc/makepkg.conf if you want predefined behavior
65
if [[ "${UE_WITH_WIN64}" != "true" && "${UE_WITH_WIN64}" != "false" ]]; then
66
export UE_WITH_WIN64=true
67
fi
68
69
# Keep full debug info in produced binaries
70
## Set this as an environment variable in /etc/makepkg.conf if you want predefined behavior
71
if [[ "${UE_WITH_FULL_DEBUG_INFO}" != "true" && "${UE_WITH_FULL_DEBUG_INFO}" != "false" ]]; then
72
export UE_WITH_FULL_DEBUG_INFO=false
73
fi
74
75
# BuildGraph platform toggles
76
## Set these as environment variables in /etc/makepkg.conf if you want predefined behavior
77
if [[ "${UE_WITH_LINUX}" != "true" && "${UE_WITH_LINUX}" != "false" ]]; then
78
export UE_WITH_LINUX=true
79
fi
80
81
if [[ "${UE_WITH_MAC}" != "true" && "${UE_WITH_MAC}" != "false" ]]; then
82
export UE_WITH_MAC=false
83
fi
84
85
if [[ "${UE_WITH_ANDROID}" != "true" && "${UE_WITH_ANDROID}" != "false" ]]; then
86
export UE_WITH_ANDROID=false
87
fi
88
89
if [[ "${UE_WITH_IOS}" != "true" && "${UE_WITH_IOS}" != "false" ]]; then
90
export UE_WITH_IOS=false
91
fi
92
93
if [[ "${UE_WITH_TVOS}" != "true" && "${UE_WITH_TVOS}" != "false" ]]; then
94
export UE_WITH_TVOS=false
95
fi
96
97
# BuildGraph game configurations string (semicolon-separated)
98
## Set this as an environment variable in /etc/makepkg.conf if you want predefined behavior
99
if [[ -z "${UE_GAME_CONFIGURATIONS}" ]]; then
100
export UE_GAME_CONFIGURATIONS="Development;Shipping"
101
fi
102
103
# Optional BuildGraph architecture override: x64 or arm64
104
## Leave unset to auto-detect from host architecture
105
if [[ -n "${UE_BUILD_ARCH_OVERRIDE}" && "${UE_BUILD_ARCH_OVERRIDE}" != "x64" && "${UE_BUILD_ARCH_OVERRIDE}" != "arm64" ]]; then
106
msg "Invalid UE_BUILD_ARCH_OVERRIDE='${UE_BUILD_ARCH_OVERRIDE}'. Expected 'x64' or 'arm64'. Ignoring override."
107
unset UE_BUILD_ARCH_OVERRIDE
108
fi
109
110
# Change this if you want an alternative non-default logo for UE5's desktop icon; the default logo is enabled by default
111
## Set this as an environment variable in /etc/makepkg.conf if you want predefined behavior
112
if [[ "${UE_USE_DEFAULT_LOGO_AT_INSTALL}" != "1" && "${UE_USE_DEFAULT_LOGO_AT_INSTALL}" != "0" ]]; then
113
export UE_USE_DEFAULT_LOGO_AT_INSTALL=1
114
fi
115
116
117
## This is for detecting your CPU architecture automatically; set to false if you want to enforce your own makepkg.conf file
118
## Disabled by default as a compromise for those bothered by having it force-enabled
119
120
## Note: the resulting package will still be named containing "x86_64" unless the build was done with an "official" Arch distro for that architecture (like Arch ARM - [don't exactly advise using Arch ARM though])
121
## or if you manage to trick your Arch installation to accept other architecture extensions by fiddling with the $CARCH variable and /etc/pacman.conf - this method has flaws, namely due to a bug:
122
## it doesn't work with "makechrootpkg" - though, this PKGBUILD doesn't work in with this method anyway because of Github SSH Agent nonsense -- if this changes in the future, let us know
123
124
# Valid values are false / disabled / default, auto, and native
125
126
# UE_ARCH_AUTO=""
127
128
if [[ -n "$(command -v tr)" ]]; then
129
# shellcheck disable=SC2006
130
UE_ARCH_AUTO="$(echo "${UE_ARCH_AUTO}" | tr '[:upper:]' '[:lower:]')"
131
fi
132
133
case "${UE_ARCH_AUTO}" in
134
"auto"|"true"|"enable"|"enabled"|"1"|"native"|"false"|"disable"|"disabled"|"2")
135
:
136
;;
137
138
*)
139
UE_ARCH_AUTO=false
140
;;
141
esac
142
143
if [[ ${CFLAGS} =~ -O([0-9]+) ]]; then
144
_ue_opt_level="-O${BASH_REMATCH[1]}"
145
else
146
_ue_opt_level="-O3"
147
fi
148
149
_ue_polly_path="$(find /usr/lib /usr/lib64 -name 'LLVMPolly.so' -print -quit 2>/dev/null)"
150
151
if [[ -n "${_ue_polly_path}" ]]; then
152
export CFLAGS="${CFLAGS} -fplugin=LLVMPolly.so -mllvm=-polly -mllvm=-polly-ast-use-context -mllvm=-polly-vectorizer=stripmine -mllvm=-polly-invariant-load-hoisting -mllvm=-polly-run-inliner -mllvm=-polly-run-dce"
153
fi
154
155
_ue_arch="$(uname -m)"
156
157
_ue_common_cflags="${_ue_opt_level} -pipe -fno-plt -fstack-clash-protection -fstack-protector-strong -fcf-protection -Wl,-z,relro,-z,now -Wformat -Werror=format-security -fPIC -fPIE -Wp,-D_FORTIFY_SOURCE=2"
158
_ue_common_ldflags="-pie -Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now"
159
160
_ue_is_arch_auto_enabled() {
161
case "$1" in
162
auto|true|enable|enabled|1) return 0 ;;
163
*) return 1 ;;
164
esac
165
}
166
167
_ue_set_arch_flags() {
168
local _ue_march="$1"
169
local _ue_tune="$2"
170
171
export CFLAGS="${CFLAGS} -march=${_ue_march} ${_ue_tune} ${_ue_common_cflags}"
172
export CXXFLAGS="${CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS"
173
export LDFLAGS="${_ue_common_ldflags}"
174
}
175
176
_ue_detect_x86_64_march() {
177
local _ue_ldso="/lib/ld-linux-x86-64.so.2"
178
local _ue_ld_help
179
180
_ue_ld_help="$("${_ue_ldso}" --help 2>/dev/null || true)"
181
182
if grep -qw "x86-64-v4 (supported" <<< "${_ue_ld_help}"; then
183
echo "x86-64-v4"
184
elif grep -qw "x86-64-v3 (supported" <<< "${_ue_ld_help}"; then
185
echo "x86-64-v3"
186
elif grep -qw "x86-64-v2 (supported" <<< "${_ue_ld_help}"; then
187
echo "x86-64-v2"
188
elif grep -Ewq "x86_64.*supported" <<< "${_ue_ld_help}"; then
189
echo "x86-64"
190
else
191
echo ""
192
fi
193
}
194
195
_ue_map_build_arch() {
196
local _ue_source_arch="$1"
197
198
case "${_ue_source_arch}" in
199
x86_64) echo "x64" ;;
200
aarch64) echo "arm64" ;;
201
*) echo "" ;;
202
esac
203
}
204
205
if [[ -n "${UE_BUILD_ARCH_OVERRIDE}" ]]; then
206
_ue_build_arch="${UE_BUILD_ARCH_OVERRIDE}"
207
else
208
_ue_build_arch="$(_ue_map_build_arch "${_ue_arch}")"
209
fi
210
211
if _ue_is_arch_auto_enabled "${UE_ARCH_AUTO}"; then
212
213
if [[ "${_ue_arch}" == "x86_64" ]]; then
214
_ue_detected_march="$(_ue_detect_x86_64_march)"
215
216
if [[ -n "${_ue_detected_march}" ]]; then
217
_ue_set_arch_flags "${_ue_detected_march}" ""
218
else
219
msg "Could not detect a supported x86_64 micro-architecture level. Exiting."
220
return 1
221
fi
222
elif [[ "${_ue_arch}" == "aarch64" ]]; then
223
_ue_set_arch_flags "aarch64" ""
224
else
225
msg "Architecture '${_ue_arch}' is not supported! Exiting."
226
return 1
227
fi
228
elif [[ "${UE_ARCH_AUTO}" == "native" ]]; then
229
_ue_set_arch_flags "native" "-mtune=native"
230
fi
231
232
case "${UE_ARCH_AUTO}" in
233
"auto"|"true"|"enable"|"enabled"|"native"|"1")
234
:
235
;;
236
237
*)
238
if [[ -n "${_ue_polly_path}" ]]; then
239
## Make sure that if polly is installed and the auto-flags above are not used, to add the polly flags to CXXFLAGS for consistency with having them set as CFLAGS
240
CXXFLAGS="${CXXFLAGS} -fplugin=LLVMPolly.so -mllvm=-polly -mllvm=-polly-ast-use-context -mllvm=-polly-vectorizer=stripmine -mllvm=-polly-invariant-load-hoisting -mllvm=-polly-run-inliner -mllvm=-polly-run-dce"
241
fi
242
;;
243
esac
244
245
# Causes a SEGV during derived data cache build if not set
246
export DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0
247
248
prepare() {
249
# Check access to the repository
250
if ! git ls-remote git@github.com:EpicGames/UnrealEngine &>/dev/null; then
251
error 'You must register at unrealengine.com and link your github account to access this private repo. See the wiki for more info: https://wiki.archlinux.org/index.php/Unreal_Engine_4'
252
exit 1
253
fi
254
255
local _ue_commit="not-cloned"
256
local _ue_install_path="/${UE_INSTALL_DIR#/}"
257
local _ue_arch_label="${_ue_build_arch:-unknown}"
258
local _ue_arch_detail=""
259
local _ue_ddc_text="no"
260
local _ue_debug_text="no"
261
local _ue_default_logo_text="yes"
262
local _ue_target_platforms=()
263
local _ue_platforms_csv="none"
264
265
if [[ -d "${pkgname}/.git" ]]; then
266
_ue_commit="$(git -C "${pkgname}" rev-parse --short HEAD 2>/dev/null || echo unknown)"
267
fi
268
269
if [[ "${_ue_arch_label}" == "x64" ]]; then
270
if [[ -n "${_ue_detected_march}" ]]; then
271
_ue_arch_detail=" (${_ue_detected_march})"
272
elif [[ ${CFLAGS} =~ -march=([^[:space:]]+) ]]; then
273
_ue_arch_detail=" (${BASH_REMATCH[1]})"
274
else
275
_ue_arch_detail=" (x86_64)"
276
fi
277
elif [[ "${_ue_arch_label}" == "arm64" ]]; then
278
if [[ ${CFLAGS} =~ -march=([^[:space:]]+) ]]; then
279
_ue_arch_detail=" (${BASH_REMATCH[1]})"
280
else
281
_ue_arch_detail=" (aarch64)"
282
fi
283
fi
284
285
[[ "${UE_WITH_DDC}" == "true" ]] && _ue_ddc_text="yes"
286
[[ "${UE_WITH_FULL_DEBUG_INFO}" == "true" ]] && _ue_debug_text="yes"
287
[[ "${UE_USE_DEFAULT_LOGO_AT_INSTALL}" == "0" ]] && _ue_default_logo_text="no"
288
289
[[ "${UE_WITH_WIN64}" == "true" ]] && _ue_target_platforms+=("Windows")
290
[[ "${UE_WITH_LINUX}" == "true" ]] && _ue_target_platforms+=("Linux")
291
[[ "${UE_WITH_MAC}" == "true" ]] && _ue_target_platforms+=("macOS")
292
[[ "${UE_WITH_TVOS}" == "true" ]] && _ue_target_platforms+=("tvOS")
293
[[ "${UE_WITH_ANDROID}" == "true" ]] && _ue_target_platforms+=("Android")
294
[[ "${UE_WITH_IOS}" == "true" ]] && _ue_target_platforms+=("iOS")
295
296
if (( ${#_ue_target_platforms[@]} > 0 )); then
297
local IFS=", "
298
_ue_platforms_csv="${_ue_target_platforms[*]}"
299
fi
300
301
msg ''
302
msg "Unreal Engine ${pkgver} (commit ${_ue_commit}) build options summary:"
303
msg ''
304
msg "- End package installation path: ${_ue_install_path}"
305
msg "- Target architecture build: ${_ue_arch_label}${_ue_arch_detail}"
306
msg "- Integrate prebuilt shader cache: ${_ue_ddc_text}"
307
msg "- Target platforms supported for export: ${_ue_platforms_csv}"
308
msg "- Game configurations: ${UE_GAME_CONFIGURATIONS}"
309
msg "- Include full debug info: ${_ue_debug_text}"
310
msg "- Use default logo at install: ${_ue_default_logo_text}"
311
msg ''
312
313
# Download Unreal Engine source or update if the folder exists
314
if [[ ! -d "${pkgname}" ]]
315
then
316
git clone --depth=1 --branch=${pkgver}-release git@github.com:EpicGames/UnrealEngine "${pkgname}"
317
cd "${pkgname}" || return
318
else
319
cd "${pkgname}" || return
320
CURRENT_CLONED_VERSION="$(git describe --tags)"
321
if [[ "${CURRENT_CLONED_VERSION}" != "${pkgver}-release" ]]; then
322
cd ..
323
rm -rf "${pkgname}"
324
git clone --depth=1 --branch=${pkgver}-release git@github.com:EpicGames/UnrealEngine "${pkgname}"
325
cd "${pkgname}" || return
326
else
327
rm -f .git/index.lock
328
git fetch --depth=1 origin tag ${pkgver}-release
329
git reset --hard ${pkgver}-release
330
fi
331
fi
332
333
for patch_file in ../*.patch; do
334
msg "Applying ${patch_file}"
335
336
if ! patch -p1 -i "${patch_file}"; then
337
msg "Some or all of the patch at ${patch_file} failed to apply. Will still try to build."
338
fi
339
done
340
341
# Qt Creator source code access
342
if [[ ! -d Engine/Plugins/Developer/QtCreatorSourceCodeAccess ]]
343
then
344
# https://github.com/fire-archive/QtCreatorSourceCodeAccess - See for usage
345
git -C Engine/Plugins/Developer clone --depth=1 https://github.com/fire-archive/QtCreatorSourceCodeAccess
346
fi
347
348
# For some reason, despite this file explicitly asking not to be removed, it was removed from the UE5 source; it has to be re-added or the build will fail
349
if [[ ! -f ${pkgname}/Engine/Source/ThirdParty/Linux/HaveLinuxDependencies ]]
350
then
351
mkdir -p "${srcdir}/${pkgname}/Engine/Source/ThirdParty/Linux/"
352
touch "${srcdir}/${pkgname}/Engine/Source/ThirdParty/Linux/HaveLinuxDependencies"
353
sed -i "1c\This file must have no extension so that GitDeps considers it a binary dependency - it will only be pulled by the Setup script if Linux is enabled. Please do not remove this file." "${srcdir}/${pkgname}/Engine/Source/ThirdParty/Linux/HaveLinuxDependencies"
354
fi
355
356
# Ensure UVS registration is non-interactive during package builds.
357
if [[ -f Setup.sh ]]; then
358
sed -i 's#UnrealVersionSelector-Linux-Shipping -register > /dev/null &#UnrealVersionSelector-Linux-Shipping -register -unattended > /dev/null \&#' Setup.sh
359
fi
360
361
./Setup.sh
362
cd "${srcdir}/${pkgname}/Engine/Build/BatchFiles/Linux/" || return
363
364
## This should just be working, but somehow isn't: https://aur.archlinux.org/packages/unreal-engine#comment-986166
365
#./Engine/Build/BatchFiles/Linux/SetupToolchain.sh
366
## So, we're doing this instead:
367
mkdir -p "${srcdir}/${pkgname}/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/"
368
tar -xvf "${srcdir}/${UE_SDK_VERSION}.tar.gz" -C "${srcdir}/${pkgname}/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/"
369
370
"${srcdir}"/"${pkgname}"/Engine/Build/BatchFiles/Linux/BuildThirdParty.sh
371
"${srcdir}"/"${pkgname}"/Engine/Build/BatchFiles/Linux/SetupDotnet.sh
372
"${srcdir}"/"${pkgname}"/Engine/Build/BatchFiles/Linux/FixDependencyFiles.sh
373
}
374
375
build() {
376
cd "${pkgname}" || return
377
378
# Rebuild UBT from patched source so the pre-built dll is replaced before BuildGraph runs.
379
# RunUBT.sh skips the rebuild when InstalledBuild.txt exists, so we must do it explicitly here.
380
dotnet build "Engine/Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj" \
381
-c Development \
382
-o "Engine/Binaries/DotNET/UnrealBuildTool" \
383
--no-self-contained \
384
-p:GenerateDocumentationFile=false
385
386
if [[ $? -ne 0 ]]; then
387
msg 'Error: Failed to rebuild UnrealBuildTool.'
388
exit $?
389
fi
390
391
local _ue_buildgraph_arch_arg=()
392
393
if [[ -n "${_ue_build_arch}" ]]; then
394
_ue_buildgraph_arch_arg=(-set:BuildArchitecture="${_ue_build_arch}")
395
fi
396
397
"Engine/Build/BatchFiles/RunUAT.sh" BuildGraph \
398
-target="Make Installed Build Linux" \
399
-script=Engine/Build/InstalledEngineBuild.xml \
400
-nosign \
401
"${_ue_buildgraph_arch_arg[@]}" \
402
-set:WithDDC="${UE_WITH_DDC}" \
403
-set:WithLinux="${UE_WITH_LINUX}" \
404
-set:WithWin64="${UE_WITH_WIN64}" \
405
-set:WithMac="${UE_WITH_MAC}" \
406
-set:WithAndroid="${UE_WITH_ANDROID}" \
407
-set:WithIOS="${UE_WITH_IOS}" \
408
-set:WithTVOS="${UE_WITH_TVOS}" \
409
-set:GameConfigurations="${UE_GAME_CONFIGURATIONS}" \
410
-set:WithFullDebugInfo="${UE_WITH_FULL_DEBUG_INFO}"
411
412
if [[ $? -ne 0 ]]; then
413
msg "Error: Build failed; try searching the output for suspicious messages." >&2
414
return;
415
fi
416
}
417
418
package() {
419
# Desktop entry
420
if [[ ! -f com.unrealengine.UE5Editor.desktop && -f com.unrealengine.UE4Editor.desktop ]]; then
421
cp com.unrealengine.UE4Editor.desktop com.unrealengine.UE5Editor.desktop
422
fi
423
424
sed -i "7c\Exec=/usr/bin/unreal-engine %U" com.unrealengine.UE5Editor.desktop
425
sed -i "14c\Path=/usr/bin/" com.unrealengine.UE5Editor.desktop
426
install -Dm644 com.unrealengine.UE5Editor.desktop "${pkgdir}/usr/share/applications/com.unrealengine.UE5Editor.desktop"
427
chmod +x "${pkgdir}/usr/share/applications/com.unrealengine.UE5Editor.desktop"
428
429
## Install a pacman hook to keep old builds from compounding cache by tens of GBs - 2 builds alone can reach at least 30 GBs in pacman's cache; having one only takes up about 15 GBs
430
install -Dm775 unreal-engine-5-pacman-cache.hook "${pkgdir}/etc/pacman.d/hooks/unreal-engine-5-pacman-cache.hook"
431
432
install -dm755 "${pkgdir}/usr/bin"
433
install -dm755 "${pkgdir}/usr/share/pixmaps/"
434
install -dm755 "${pkgdir}/usr/share/applications/"
435
436
# Icon for Desktop entry
437
if [[ "${UE_USE_DEFAULT_LOGO_AT_INSTALL}" == "1" ]]; then
438
install -Dm644 ue5editor.svg "${pkgdir}/usr/share/pixmaps/ue5editor.svg"
439
else
440
mv ue5editor.svg ue5editor.svg.bak
441
wget --output-document "ue5editor.svg" "https://raw.githubusercontent.com/EliverLara/candy-icons/master/apps/scalable/ue4editor.svg"
442
install -Dm644 ue5editor.svg "${pkgdir}/usr/share/pixmaps/ue5editor.svg"
443
wget --output-document "LICENSE" "https://raw.githubusercontent.com/EliverLara/candy-icons/master/LICENSE"
444
mkdir -p "${pkgdir}/usr/share/UnrealEngine/EliverLara-candy-icons/"
445
install -Dm644 LICENSE "${pkgdir}/usr/share/UnrealEngine/EliverLara-candy-icons/"
446
rm ue5editor.svg
447
rm LICENSE
448
mv ue5editor.svg.bak ue5editor.svg
449
fi
450
451
# License
452
install -Dm644 "${srcdir}/${pkgname}/LICENSE.md" "${pkgdir}/usr/share/licenses/UnrealEngine/LICENSE.md"
453
454
# Engine
455
## Set to all permissions to prevent the engine from breaking itself; more elegant solutions might exist - suggest them if they can be automated here
456
## Also, correct me if I package this improperly; I added Win64 support for the build in hopes of supporting cross-compilation
457
install -dm777 "${pkgdir}/${UE_INSTALL_DIR}/Engine"
458
459
# Copy LocalBuilds to pkg...
460
rsync -a "${srcdir}/${pkgname}/LocalBuilds/Engine/Linux/" "${pkgdir}/${UE_INSTALL_DIR}/"
461
if [[ -f "${srcdir}/${pkgname}/LocalBuilds/Engine/Linux/Engine/Binaries/Linux/UnrealEditor" ]]; then
462
# Can never be too careful with recursive rm...
463
rm -r "${srcdir}/${pkgname}/LocalBuilds"
464
fi
465
466
# Ensure InstalledBuild.txt is present so UBT treats this as an installed engine,
467
# preventing the "unique build environment" error when building projects.
468
printf '%s' "${pkgver}" | install -Dm644 /dev/stdin "${pkgdir}/${UE_INSTALL_DIR}/Engine/Build/InstalledBuild.txt"
469
470
# Copy the rest of it to pkg... Should we be overwriting LocalBuilds?
471
rsync -a --exclude='Intermediate/' "${srcdir}/${pkgname}/" "${pkgdir}/${UE_INSTALL_DIR}/"
472
473
# The BuildGraph staging copies the unpatched UBT DLL from CsTools into LocalBuilds,
474
# which then overwrites our patched build. Re-stamp both locations with the patched DLL.
475
local _ubtsrcdir="${srcdir}/${pkgname}/Engine/Source/Programs/UnrealBuildTool"
476
local _ubtpkgdir="${pkgdir}/${pkgname}/${UE_INSTALL_DIR}/Engine/Binaries/DotNET/UnrealBuildTool"
477
478
if [[ -x "$(find "${pkgdir}/${UE_INSTALL_DIR}" -type f -iname 'xbuild')" ]]; then
479
find "${pkgdir}/${UE_INSTALL_DIR}" -type f -iname 'xbuild' -exec chmod +x "{}" \;
480
fi
481
482
if [[ -x "$(find "${pkgdir}/${UE_INSTALL_DIR}" -type f -iname 'mcs')" ]]; then
483
find "${pkgdir}/${UE_INSTALL_DIR}" -type f -iname 'mcs' -exec chmod +x "{}" \;
484
fi
485
486
## Do this, in case the path doesn't exist for some reason
487
mkdir -p "${pkgdir}/${UE_INSTALL_DIR}/Engine/Binaries/Android/"
488
489
# Launch script to initialize missing user folders for Unreal Engine
490
install -Dm755 ../unreal-engine.sh "${pkgdir}/usr/bin/unreal-engine"
491
chmod +x "${pkgdir}/usr/bin/unreal-engine"
492
ln -s "${pkgdir}/usr/bin/unreal-engine" "${pkgdir}/usr/bin/ue5"
493
ln -s "${pkgdir}/usr/bin/unreal-engine" "${pkgdir}/usr/bin/UE5"
494
ln -s "${pkgdir}/usr/bin/unreal-engine" "${pkgdir}/usr/bin/unreal-engine-5"
495
chmod 755 "${pkgdir}/usr/bin/ue5" "${pkgdir}/usr/bin/UE5" "${pkgdir}/usr/bin/unreal-engine-5"
496
497
# Configuring the launch script to detect when it has been run for the first time
498
# Note: Requires that there isn't already a UE5 desktop entry in "${HOME}/local/share/applications/" - delete yours if you have one there before installing this
499
DesktopFileChecksum=$(sha256sum "${pkgdir}/usr/share/applications/com.unrealengine.UE5Editor.desktop" | cut -f 1 -d ' ')
500
sed -i "s|ChecksumPlaceholder|${DesktopFileChecksum}|" "${pkgdir}/usr/bin/unreal-engine"
501
sed -i "s|InstalledLocationPlaceholder|/${UE_INSTALL_DIR}/Engine/Binaries|" "${pkgdir}/usr/bin/unreal-engine"
502
}
503
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-03 00:08:14 | LOW | 2 |
| 2026-08-02 00:16:08 | LOW | 2 |
| 2026-08-01 00:11:18 | LOW | 2 |
| 2026-07-31 00:14:10 | LOW | 2 |
| 2026-07-30 00:17:23 | LOW | 2 |
| 2026-07-29 00:25:53 | LOW | 2 |
| 2026-07-28 00:07:28 | LOW | 2 |
| 2026-07-27 00:24:32 | LOW | 2 |
| 2026-07-26 00:07:32 | LOW | 2 |
| 2026-07-25 00:13:44 | LOW | 2 |
| 2026-07-24 00:02:28 | LOW | 2 |
| 2026-07-23 00:14:47 | LOW | 2 |
| 2026-07-22 00:29:32 | LOW | 2 |
| 2026-07-21 00:24:15 | LOW | 2 |
| 2026-07-20 00:19:49 | LOW | 2 |
| 2026-07-19 00:17:08 | LOW | 2 |
| 2026-07-18 00:14:48 | LOW | 2 |
| 2026-07-17 00:06:16 | LOW | 2 |
| 2026-07-16 00:05:41 | LOW | 2 |
| 2026-07-15 00:09:25 | LOW | 2 |