-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 I agree with you. Plus, I don't understand why you need to test the arch : if test _arch == '32'; is not needed as you can do : scons -j $cores platform=x11 tools=no target=release bits=$_arch Le 31/01/2016 17:36, Mark Weiman a écrit :
My main concern about this PKGBUILD other than it using directories in the user's home folder is why are you putting compilation commands for other operating systems in there? This should just be for Arch Linux as a PKGBUILD is only used for use with pacman.
Mark Weiman
On Fri, 2016-01-29 at 16:53 -0500, Ryan Whited wrote:
Greetings,
I've written my first PKGBUILD that I think is acceptable to submit and while I tried to make sure I followed the guidelines, I wanted to submit it for review here. You can view it online at https://github.com/godofgrunts/arch-PKGBUILDs/blob/master/godot-expor
t
if it's easier than email.
# Maintainer: Ryan Whited <dergottdergrunten at gmail dot com> @god_of_grunts
pkgname=godot-export _rname=godot pkgver=1.1 pkgrel=1 pkgdesc="Export templates for the stable release of the Godot engine 1.1" url="http://www.godotengine.org" license=('MIT') arch=('i686' 'x86_64') makedepends=('scons' 'mingw-w64-binutils' 'mingw-w64-crt' 'mingw-w64-gcc' 'mingw-w64-headers' 'mingw-w64-headers-bootstrap' 'mingw-w64-winpthreads' 'upx') #'emscripten' depends=('glu' 'libxcursor' 'alsa-lib' 'freetype2' 'mesa') optdepends=('godot: Cannot export without it') conflicts=('godot-export-git' 'godot-git') _arch='' if test "$CARCH" == x86_64; then _arch=('64') else _arch=('32') fi
tempdir="/home/$USER/.godot/templates/"
source=( "https://github.com/godotengine/godot/archive/${pkgver}-stable.tar.gz
"
) md5sums=('87eb2fc3518ce7a27957fada1ba003e9')
build() { export MINGW64_PREFIX="x86_64-w64-mingw32-" export MINGW32_PREFIX="i686-w64-mingw32-"
cd "${srcdir}"/${_rname}-${pkgver}-stable
sed -n '/\/* Copyright/,/IN THE SOFTWARE./p' main/main.cpp | sed 's/\/\*//' | sed 's/\*\///' > LICENSE
cores=$(nproc) bindir=("${srcdir}"/${_rname}-${pkgver}-stable/bin) tooldir=("${srcdir}"/${_rname}-${pkgver}-stable/tools)
mkdir $tempdir || echo $tempdir does not need to be made
#linux if test _arch == '32'; then scons -j $cores platform=x11 tools=no target=release bits=32 #linux_x11_32_release scons -j $cores platform=x11 tools=no target=release_debug bits=32 #linux_x11_32_debug cp $bindir/godot.x11.opt.32 $tempdir/linux_x11_32_release cp $bindir/godot.x11.opt.debug.32 $tempdir/linux_x11_32_debug else scons -j $cores platform=x11 tools=no target=release bits=64 #linux_x11_64_release scons -j $cores platform=x11 tools=no target=release_debug bits=64 #linux_x11_64_debug cp $bindir/godot.x11.opt.64 $tempdir/linux_x11_64_release cp $bindir/godot.x11.opt.debug.64 $tempdir/linux_x11_64_debug fi
#linux-server if test _arch == '32'; then scons -j $cores platform=server target=release_debug tools=no bits=32 cp $bindir/godot_server.server.opt.debug.32 $tempdir/linux_server_32 else scons -j $cores platform=server target=release_debug tools=no bits=64 cp $bindir/godot_server.server.opt.debug.64 $tempdir/linux_server_64 fi
#Windows export MINGW32_PREFIX="i686-w64-mingw32-" export MINGW64_PREFIX="x86_64-w64-mingw32-"
scons -j $cores platform=windows tools=no target=release bits=32 #windows_32_release.exe scons -j $cores platform=windows tools=no target=release_debug bits=32 #windows_32_debug.exe scons -j $cores platform=windows tools=no target=release bits=64 #windows_64_release.exe scons -j $cores platform=windows tools=no target=release_debug bits=64 #windows_64_debug.exe
cp $bindir/godot.windows.opt.64.exe $tempdir/windows_64_release.exe cp $bindir/godot.windows.opt.debug.64.exe $tempdir/windows_64_debug.exe cp $bindir/godot.windows.opt.32.exe $tempdir/windows_32_release.exe cp $bindir/godot.windows.opt.debug.32.exe $tempdir/windows_32_debug.exe
x86_64-w64-mingw32-strip $tempdir/windows_64_release.exe x86_64-w64-mingw32-strip $tempdir/windows_64_debug.exe upx $tempdir/windows_32_debug.exe upx $tempdir/windows_32_release.exe
#OS X #I'll put code here when https://github.com/godotengine/godot/wiki/compiling_osx is updated
#Android #Probably should do this yourself, I'm not about to mess with your Android SDK #https://github.com/godotengine/godot/wiki/export_android
#WinRT #Can't do this on Linux sorry
#Blackberry 10 #Currently disabled by Godot
#HTML5 #Currently broken per https://github.com/godotengine/godot/issues /3510
#export EMSCRIPTEN_ROOT=/usr/lib/emscripten
#scons -j $cores platform=javascript tools=no target=release #scons -j $cores platform=javascript tools=no target=release_debug
#cp $bindir/godot.javascript.opt.html $bindir/godot.html #cp $bindir/godot.javascript.opt.js $bindir/godot.js #cp $tooldir/html_fs/filesystem.js $bindir/filesystem.js
#zip $tempdir/javascript_release.zip $bindir/godot.html $bindir/godot.js $bindir/filesystem.js
#cp $bindir/godot.javascript.opt.debug.html $bindir/godot.html #cp $bindir/godot.javascript.opt.debug.js $bindir/godot.js
#zip $tempdir/javascript_debug.zip $bindir/godot.html $bindir/godot.js $bindir/filesystem.js
}
package() {
#Linux if test _arch == '32'; then upx $tempdir/linux_x11_32_release upx $tempdir/linux_x11_32_debug else upx $tempdir/linux_x11_64_release upx $tempdir/linux_x11_64_debug fi
#Linux Server if test _arch == '32'; then upx $tempdir/linux_server_32 else upx $tempdir/linux_server_64 fi
#Windows upx $tempdir/windows_32_debug.exe upx $tempdir/windows_32_release.exe x86_64-w64-mingw32-strip $tempdir/windows_64_release.exe x86_64-w64-mingw32-strip $tempdir/windows_64_debug.exe }
- -- Félix Piédallu Président du Club Robotronik Phelma 06 51 41 32 48 Manjaro Linux. Feel the freedom. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWrrVZAAoJEMJ1NtNxTzOfnC4QALTWzMBTRN9mO8eD2An5KdiK yjp536OA5PKRknSS0MshPleJwHtCefDDI6x8AiO+eFR7he1Fp4/O8uCuC1QqIaqO ddErlSNAHorV+vvgKzc0rEInsZJZzaz5fxHA5yUwDrs0omwe2p2vLxYZF4Zlv4Gm dhL1wA3c6dGXTPCA9S8sqj5LsTkfBfCjKMUF3P7+mNz+eVEGUTf7QCThocyS6Hkb 53GBzgq1LXLr1VgLENunM4MHw6Fbhei0AF8RJlFJGcxuqbkcTfplYkQFNCIPYX6K lwyXILlngEXK1klzbO62QlzGdKTQ89YcXrcOEqEnfUY5CO9N+flpCBfdFFXtY1O2 FO2AwCIxF1IHZSoyXDOcUZS11JkkhtSftNLZA3uzdP5JVh70lgG60qJg0gq1MAZQ 6A/mqBg9F2Z84Xnf9L0CfpMADzwt0NJtanTnKOEhuTeq7ksY6BsjCSKnp74eDY53 lT3YVXYFRYWY9qjO7Zq8UMDy7OHy3ImRkXj/ALfPuKEbQLEdIncWyQGmSgMJ8XUp aV/ZKPqC/wtEvVKGe2mOsZEUSCscwryiOVOXT23z+iMXhzS73JxmLHxLPPcI3/AW 8H201XFtrtapGN0E3+OGjz5MWTPXmgccx96ficP8zTX43koUSIWVmZzlnt2ajXYM hrn+WXcjoaTJpB4NRya0 =yrMX -----END PGP SIGNATURE-----