# Maintainer: Juraj Fiala # Maintainer: Florian Walch # Maintainer: Leonard König # Maintainer: Oscar Morante # Contributor: Ace pkgname=unity-editor _version=5.4.1 _build=f1 _buildtag=20160913 pkgver=${_version}${_build}+${_buildtag} pkgrel=1 epoch=1 pkgdesc="The world's most popular development platform for creating 2D and 3D multiplatform games and interactive experiences." arch=('x86_64') url='https://unity3d.com/' license=('custom') depends=('desktop-file-utils' 'xdg-utils' 'gcc-multilib' 'libgl' 'glu' 'nss' 'libpng12' 'libxtst' 'libpqxx' 'monodevelop' 'npm') optdepends=('ffmpeg: for WebGL exporting' 'nodejs: for WebGL exporting' 'java-runtime: for WebGL exporting' 'gzip: for WebGL exporting' 'java-environment: for Android and Tizen exporting' 'android-sdk: for Android Remote' 'android-udev: for Android Remote') conflicts=('unity3d') replaces=('unity3d') source=("http://download.unity3d.com/download_unity/linux/unity-editor-installer-${pkgver}.sh" 'EULA' 'unity-editor' 'monodevelop-unity' 'unity-monodevelop.png') noextract=("unity-editor-installer-${pkgver}.sh") sha1sums=('dd55e85526e3b219585acee3186f4f23dc6b8f6b' '4f7146c680fd2f96a5c3ff0c1982fef69cc61938' '9172be394811c35dba79d2e9ac7d5bbd5fabccdc' '8ffbfd8f4577b146d25217720ac6689c5d929e84' 'd1ecf758c9816f964febf601d065b0354940d866') sha512sums=('44e41f949da3892c2fba1c9739ac37bb8c7c96967183670c5a4b9ac56c24948182dd1bd770b67e2384492900c3ca7ae0e959c45137565e06c1131f89d45373de' 'ec7dbf7007812cb3a261b7fb2b6a7861593276660400575d793fc16ac6c415e79ec58fa324d4d5110101149b4622b8b174b41aa4d203547b2e6267fd990a9e67' 'bf8a4ab65a2fc7dc51ff02e5f46ce3be365b660f32fa9d70d5b284575c20766ccd6abe53eef1049ae76b78d86eaeb830ce73184b63abab1237a3e735a0897709' '26946ad2c759699763c1284a1f30380072da2911659992fa2471b436df1f0535b6eef61007f11c2e010e4a002663324e42ef5ae1417aa45e0ec99f4e3f0aafb7' '44676f54d83357721bee844d1e0e997e584b2148c871dbf24385976dda840f37e4cf4a1796fa17dec90fac539bac58e0e47fa0af0abc98e4cf795f735b23c1b0') options=(!strip) PKGEXT='.pkg.tar' # Prevent compressing of the final package prepare() { if [ "$(df . -BG --output=avail | awk -F'[^0-9]*' 'FNR==2 {print $2;}')" -le "10" ]; then warning "It seems that you have less than 10GB left. If you are using an AUR-Helper or building on a small partition (like /tmp), you might want to change the build-/cache-directory as this package is rather big." fi } build() { msg2 "Extracting archive ..." yes | fakeroot sh "unity-editor-installer-${pkgver}.sh" > /dev/null rm "unity-editor-installer-${pkgver}.sh" } package() { local extraction_dir="${srcdir}/unity-editor-${_version}${_build}" mkdir -p "${pkgdir}/opt/" mv ${extraction_dir} ${pkgdir}/opt/Unity # HACK: fixes WebGL builds by adding a symlink (python -> python2) to the PATH ln -s /usr/bin/python2 ${pkgdir}/opt/Unity/Editor/python # Use the launch scripts in the .desktop files sed -i "/^Exec=/c\Exec=/usr/bin/unity-editor" "${pkgdir}/opt/Unity/unity-editor.desktop" sed -i "/^Exec=/c\Exec=/usr/bin/monodevelop-unity" "${pkgdir}/opt/Unity/unity-monodevelop.desktop" install -Dm644 -t "${pkgdir}/usr/share/applications" "${pkgdir}/opt/Unity/unity-editor.desktop" \ "${pkgdir}/opt/Unity/unity-monodevelop.desktop" install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/256x256/apps" "${pkgdir}/opt/Unity/unity-editor-icon.png" install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/48x48/apps" "${srcdir}/unity-monodevelop.png" install -Dm755 -t "${pkgdir}/usr/bin" "${srcdir}/unity-editor" install -Dm755 -t "${pkgdir}/usr/bin" "${srcdir}/monodevelop-unity" install -Dm644 "${srcdir}/EULA" "${pkgdir}/usr/share/licenses/${pkgname}/EULA" } # vim:set sw=2 sts=2 et: