# Maintainer: Juraj Fiala # Maintainer: Florian Walch # Maintainer: Leonard König # Maintainer: Oscar Morante # Contributor: Ace pkgname=unity-editor _version=5.3.0 _build=f4 _buildtag=20151218 pkgver=${_version}${_build}+${_buildtag} pkgrel=3 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') install="${pkgname}.install" source=("http://download.unity3d.com/download_unity/linux/unity-editor-installer-5.3.0f4+20151218.sh" 'EULA' 'unity-editor' 'monodevelop-unity' 'unity-monodevelop.png') noextract=("unity-editor-installer-${pkgver}.sh") sha256sums=('c27117d7e73d28c12eddf741bf6626007a031959c6d4a89c595692908d8cbd46' 'aca6e932a624acd98f634428af0b33a36587b6c41887969477db944975d4d8b4' 'b54b2823b2973729d04b0ca01619f489657ff60908f4367c55c5efffc20df42f' '7309ac206fbb6eb5f1a073bf22e2571e1a574410ab410138a19fb66c3eee21e3' '6769b7ad1c1a1b088f1e96934d909fffef95d6a6c757420699f0a6705ef70a51') 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" warning "or building on a small partition (like /tmp), you might want to change the" warning "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: