makedeb
Commandline Compiler for the ReCT Programming language
Viewing /PKGBUILD
.
Click here to go back to the Git tree for rctc.
# Maintainer: RedCubeDev <someredcubedev@gmail.com>
pkgname='rctc'
pkgver=2.3.1.2
pkgrel=7
pkgdesc="Commandline Compiler for the ReCT Programming language"
arch=('x86_64')
url="http://rect.ml/"
license=('GPL3')
depends=('dotnet-runtime-3.1')
makedepends=('git' 'dotnet-sdk-3.1')
source=("rctc::git://github.com/RedCubeDev-ByteSpace/ReCT.git")
md5sums=('SKIP')
pkgver() {
cd "$pkgname"
thever=$(git describe --tags)
cutver=${thever%%-*}
echo "$cutver"
}
package() {
# getting the source of the lastest release
cd "$pkgname"
git checkout ${pkgver}
# building the lastest release of rctc
cd "rctc"
export DOTNET_CLI_HOME="/tmp"
dotnet build -c Release
# install compiled binary
cd "bin/Release/netcoreapp3.1/"
mkdir -p "$pkgdir/usr/bin/rect"
mkdir -p "$pkgdir/usr/bin/rect/Packages"
mkdir -p "$pkgdir/usr/bin/rect/System Dotnet Assemblies"
install -Dm755 ./rctc ./rctc.dll ./rctc.runtimeconfig.json ./ReCT.dll "$pkgdir/usr/bin/rect"
install -Dm755 ./Json.Net.dll ./Mono.Cecil.dll ./Mono.Options.dll ./Mono.Cecil.Rocks.dll "$pkgdir/usr/bin/rect"
# building all system packages
cd ../../../..
cd "System Libs"
syspacks=( "sys" "math" "io" "net" "web" "audio" )
for i in "${syspacks[@]}"
do
cd "${i}lib"
printf "\033[0;32m======> BUILDING '$i'\033[0m\n"
dotnet build -c Release
cd "./bin/Release/netcoreapp3.1/"
mv "./${i}lib.dll" "./ReCT.${i}.pack"
install -Dm755 "./ReCT.${i}.pack" "$pkgdir/usr/bin/rect/Packages"
cd ../../../..
done
cd ..
cd "./System Dotnet Assemblies"
install -Dm755 ./System.Console.dll ./System.IO.FileSystem.dll ./System.Net.Sockets.dll ./System.Runtime.Extensions.dll ./System.Runtime.dll ./System.Threading.Thread.dll ./System.Threading.dll "$pkgdir/usr/bin/rect/System Dotnet Assemblies"
ln -sf "/usr/bin/rect/rctc" "$pkgdir/usr/bin/rctc"
}