Skip to content

Latest commit

 

History

History
130 lines (94 loc) · 3.23 KB

README.md

File metadata and controls

130 lines (94 loc) · 3.23 KB

Zig for Debian and Ubuntu

This repository contains instructions for installing the Zig programming language and toolchain on the Ubuntu and Debian operating systems, as well as the debuild configuration for building the corresponding binary packages from the upstream tarballs.

Distributions

Currently, x86-64 (aka AMD64) binary packages are available for all recent Ubuntu and Debian releases:

Distribution Alias AMD64
Ubuntu 20.10 Groovy
Ubuntu 20.04 LTS Focal
Ubuntu 19.10 Eoan
Ubuntu 18.04 LTS Bionic
Debian 11 Bullseye
Debian 10 Buster
Debian unstable Sid

Installation

Installation from an APT repository

Once you've completed the repository configuration (see further below), installation is as easy as the familiar:

$ sudo apt install zig

Installation from a downloaded .DEB package file

Alternatively, you can just download the latest .deb file and install that directly with dpkg:

$ wget https://github.com/dryzig/zig-debian/releases/download/0.6.0-1/zig_0.6.0-1_amd64.deb

$ sudo dpkg -i zig_0.6.0-1_amd64.deb

Configuration

Configure PGP Signing Keys

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 379CE192D401AB61

Configuration on Ubuntu

Configure on Ubuntu 20.10 (Groovy)

$ echo 'deb https://dl.bintray.com/dryzig/zig-ubuntu groovy main' | sudo tee -a /etc/apt/sources.list
$ sudo apt update

Configure on Ubuntu 20.04 LTS (Focal)

$ echo 'deb https://dl.bintray.com/dryzig/zig-ubuntu focal main' | sudo tee -a /etc/apt/sources.list
$ sudo apt update

Configure on Ubuntu 19.10 (Eoan)

$ echo 'deb https://dl.bintray.com/dryzig/zig-ubuntu eoan main' | sudo tee -a /etc/apt/sources.list
$ sudo apt update

Configure on Ubuntu 18.04 LTS (Bionic)

$ echo 'deb https://dl.bintray.com/dryzig/zig-ubuntu bionic main' | sudo tee -a /etc/apt/sources.list
$ sudo apt update

Configuration on Debian

Configure on Debian 11 (Bullseye)

$ echo 'deb https://dl.bintray.com/dryzig/zig-debian bullseye main' | sudo tee -a /etc/apt/sources.list
$ sudo apt update

Configure on Debian 10 (Buster)

$ echo 'deb https://dl.bintray.com/dryzig/zig-debian buster main' | sudo tee -a /etc/apt/sources.list
$ sudo apt update

Maintenance

Building zig_0.6.0-1_amd64.deb

$ wget https://ziglang.org/download/0.6.0/zig-linux-x86_64-0.6.0.tar.xz
$ tar xvf zig-linux-x86_64-0.6.0.tar.xz
$ ln -s zig-linux-x86_64-0.6.0 zig-0.6.0
$ tar cJhf zig_0.6.0.orig.tar.xz zig-0.6.0
$ cd zig-0.6.0
$ git clone https://github.com/dryzig/zig-debian.git debian
$ debuild