Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Maintainer: Dylan Ferris <dylan@psilly.com>
- # The source is about 200 MiB, with an extra 11 GiB of dependencies downloaded in prepare(), and may take several hours to compile.
- pkgname='unreal-engine'
- pkgver=4.24.1
- pkgrel=1
- pkgdesc='A 3D game engine by Epic Games which can be used non-commercially for free.'
- arch=('x86_64')
- url='https://www.unrealengine.com/'
- makedepends=('mono' 'dos2unix' 'git')
- depends=('icu' 'sdl2' 'python' 'lld' 'xdg-user-dirs')
- license=('custom:UnrealEngine')
- source=('com.unrealengine.UE4Editor.desktop'
- 'use-arch-mono.patch')
- sha256sums=('fa4bd19ab53e91cc8b4ae6208452a7fe986a08047617213d6250b43e7a140bf3'
- '6b30adf71eeabaf1b2b669aa56c9deba145a4fe7bdd2e77f44b0cb7423162bc0')
- options=(strip staticlibs) # Package is 3 Gib smaller with "strip" but it takes a long time and generates many warnings
- prepare() {
- # Check access to the repository
- if ! git ls-remote git@github.com:EpicGames/UnrealEngine &>-
- then
- 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"
- exit 1
- fi
- # Download Unreal Engine source or update if the folder exists
- if [ ! -d $pkgname ]
- then
- git clone --depth=1 --branch=$pkgver-release git@github.com:EpicGames/UnrealEngine $pkgname
- cd $pkgname
- else
- cd $pkgname
- git fetch --depth=1 origin tag $pkgver-release
- git reset --hard $pkgver-release
- fi
- patch Engine/Build/BatchFiles/Linux/SetupMono.sh $srcdir/use-arch-mono.patch
- export TERM=xterm
- ./Setup.sh
- ./GenerateProjectFiles.sh -makefile
- }
- build() {
- cd $pkgname
- make -j1
- }
- package() {
- # Install dir
- dir="opt/$pkgname"
- # Desktop entry
- if [ "$dir" != "opt/$pkgname" ] # set new path if dir changed
- then
- sed -i "5c\Path=/$dir/Engine/Binaries/Linux/" com.unrealengine.UE4Editor.desktop
- fi
- install -Dm644 com.unrealengine.UE4Editor.desktop $pkgdir/usr/share/applications/com.unrealengine.UE4Editor.desktop
- cd $pkgname
- # Icon for Desktop entry
- install -Dm644 Engine/Source/Programs/UnrealVS/Resources/Preview.png $pkgdir/usr/share/pixmaps/ue4editor.png
- # License
- install -Dm644 LICENSE.md $pkgdir/usr/share/licenses/UnrealEngine/LICENSE.md
- # Fix "could not chmod +x" warning when compiling c++ project
- chmod a+x Engine/Binaries/DotNET/IOS/IPhonePackager.exe
- # Engine
- install -d "$pkgdir/$dir/Engine"
- mv Engine/Binaries "$pkgdir/$dir/Engine/Binaries"
- mv Engine/Build "$pkgdir/$dir/Engine/Build"
- mv Engine/Config "$pkgdir/$dir/Engine/Config"
- mv Engine/Content "$pkgdir/$dir/Engine/Content"
- install -d "$pkgdir/$dir/Engine/DerivedDataCache" # Editor needs this
- mv Engine/Documentation "$pkgdir/$dir/Engine/Documentation"
- mv Engine/Extras "$pkgdir/$dir/Engine/Extras"
- install -d "$pkgdir/$dir/Engine/Intermediate" # Editor needs this, but not the contents
- mv Engine/Plugins "$pkgdir/$dir/Engine/Plugins"
- mv Engine/Programs "$pkgdir/$dir/Engine/Programs"
- mv Engine/Saved "$pkgdir/$dir/Engine/Saved"
- mv Engine/Shaders "$pkgdir/$dir/Engine/Shaders"
- mv Engine/Source "$pkgdir/$dir/Engine/Source" # The source cannot be redistributed, but seems to be needed to compile C++ projects
- # Content
- mv FeaturePacks "$pkgdir/$dir/FeaturePacks"
- mv Samples "$pkgdir/$dir/Samples"
- mv Templates "$pkgdir/$dir/Templates"
- # Build scripts, used by some plugins (CLion)
- install -Dm755 GenerateProjectFiles.sh "$pkgdir/$dir/GenerateProjectFiles.sh"
- install -Dm755 Setup.sh "$pkgdir/$dir/Setup.sh"
- install -Dm644 .ue4dependencies "$pkgdir/$dir/.ue4dependencies"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement