Last active
September 22, 2021 09:57
-
-
Save jkbjh/ad9a4938270bd1513c6cee69907680b7 to your computer and use it in GitHub Desktop.
create debian package from julia (julialang) binary
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TARGETLINK=https://julialang-s3.julialang.org/bin/linux/x64/1.6/julia-1.6.2-linux-x86_64.tar.gz | |
VERSION=1.6.2 | |
CURDIR=$(pwd) | |
set -e | |
set -x | |
ARCHIVE=julia-$VERSION.tar.gz | |
wget $TARGETLINK -O $ARCHIVE | |
UNCOMPRESSED_SIZE=$(zcat $ARCHIVE | wc -c) | |
cat <<EOF > control | |
Package: julia | |
Version: ${VERSION} | |
Section: Science | |
Priority: optional | |
Architecture: amd64 | |
Installed-Size: $UNCOMPRESSED_SIZE | |
Maintainer: `id -un` | |
Description: high-performance programming language for technical computing | |
EOF | |
echo "2.0" > debian-binary | |
tar czvf control.tar.gz control | |
TMPDIR=$(mktemp -d) | |
pushd $TMPDIR | |
tar -xzvvf $CURDIR/$ARCHIVE | |
JULIA_DIR=$(ls $TMPDIR/julia* -d) | |
pushd $JULIA_DIR | |
tar -czvvf $CURDIR/data.tar.gz bin etc include lib share | |
pushd $CURDIR | |
ar -r julia-$VERSION.deb debian-binary control.tar.gz data.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment