Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.deb package for the terminal #591

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,7 @@ TestResults
/Sources/Tests/DotnetBenchmark/Properties/launchSettings.json
**/.ionide/**
Sources/msbuild.binlog

**/native-out/**
**/deb-output/**
*.deb
6 changes: 6 additions & 0 deletions Sources/Terminal/AngouriMath.Terminal/ship/build-linux-x64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cd ..
dotnet publish \
-r linux-x64 \
-c release \
-o ./native-out \
-p:SelfContained=true
31 changes: 31 additions & 0 deletions Sources/Terminal/AngouriMath.Terminal/ship/pack-deb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

echo 'Packing for deb'

version='0.1-alpha'
name='angourimath-cli'
folder="${name}_${version}_amd64"

rm -r deb-output
mkdir deb-output
cd deb-output
mkdir "$folder"
cd "$folder"

mkdir DEBIAN
cd DEBIAN
printf "Package: $name\n" > control
printf "Version: $version\n" >> control
printf 'Architecture: amd64\n' >> control
printf 'Maintainer: WhiteBlackGoose <wbg@angouri.org>\n' >> control
printf 'Description: terminal for AngouriMath.CLI\n' >> control

cd ..
mkdir -p usr/local/bin
cp ../../start-cli.sh ./usr/local/bin/angourimath-cli
chmod +x ./usr/local/bin/angourimath-cli

cp -r ../../../native-out ./usr/local/bin/amcli-data

cd ..
dpkg-deb --build --root-owner-group "$folder"
2 changes: 2 additions & 0 deletions Sources/Terminal/AngouriMath.Terminal/ship/start-cli.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
/usr/local/bin/amcli-data/AngouriMath.Terminal