diff --git a/Makefile b/Makefile index ae5b648d1..029cdc163 100644 --- a/Makefile +++ b/Makefile @@ -134,13 +134,14 @@ $(PACKAGE_PATH)/resources/schemastore/NOTICE: && wget https://raw.githubusercontent.com/SchemaStore/schemastore/a1689388470d1997f2e5ebd8b430e99587b8d354/NOTICE \ && cd $(REPO_PATH) -# Supports OL8+, Fedora 34+, Ubuntu 20.04+, and macOS. +# Supports OL8+, Fedora 34+, Ubuntu 22.04+ and 24.04+, and macOS. OS := "$(shell uname)" ifeq ($(OS), "Darwin") OS_DISTRO := "Darwin" else ifeq ($(OS), "Linux") OS_DISTRO := "$(shell grep '^NAME=' /etc/os-release | sed 's/^NAME=//' | sed 's/"//g')" + OS_MAJOR_VERSION := "$(shell grep '^VERSION=' /etc/os-release | sed -r 's/^[^0-9]+([0-9]+)\..*/\1/')" endif endif # If Souffle cannot be installed, we advise the user to install it manually @@ -155,13 +156,15 @@ souffle: "Fedora Linux") \ sudo dnf -y install https://github.com/souffle-lang/souffle/releases/download/2.5/x86_64-fedora-41-souffle-2.5-Linux.rpm;; \ "Ubuntu") \ - sudo wget https://souffle-lang.github.io/ppa/souffle-key.public -O /usr/share/keyrings/souffle-archive-keyring.gpg; \ - echo "deb [signed-by=/usr/share/keyrings/souffle-archive-keyring.gpg] https://souffle-lang.github.io/ppa/ubuntu/ stable main" | sudo tee /etc/apt/sources.list.d/souffle.list; \ - sudo apt update; \ - sudo wget https://github.com/souffle-lang/souffle/releases/download/2.5/x86_64-ubuntu-2404-souffle-2.5-Linux.deb; \ - sudo apt install ./x86_64-ubuntu-2404-souffle-2.5-Linux.deb; \ - rm x86_64-ubuntu-2404-souffle-2.5-Linux.deb; \ - sudo apt install souffle;; \ + if [ $(OS_MAJOR_VERSION) == "24" ]; then \ + wget https://github.com/souffle-lang/souffle/releases/download/2.5/x86_64-ubuntu-2404-souffle-2.5-Linux.deb -O ./souffle.deb; \ + elif [ $(OS_MAJOR_VERSION) == "22" ]; then \ + wget https://github.com/souffle-lang/souffle/releases/download/2.5/x86_64-ubuntu-2204-souffle-2.5-Linux.deb -O ./souffle.deb; \ + else \ + echo "Unsupported Ubuntu major version: $(OS_MAJOR_VERSION)"; exit 0; \ + fi; \ + sudo apt install ./souffle.deb; \ + rm ./souffle.deb;; \ "Darwin") \ if command -v brew; then \ brew install --HEAD souffle-lang/souffle/souffle; \