From 7b70f5cf4e39de89fbced6095ba1919e33157922 Mon Sep 17 00:00:00 2001 From: Alexandros Theodotou Date: Fri, 29 Apr 2022 14:25:02 +0100 Subject: [PATCH] use plain distro names for meson options --- gnu-linux/installer.sh.in | 23 ++++++++++++---------- gnu-linux/make_installer_zip.sh.in | 2 +- meson.build | 2 +- meson_options.txt | 5 +++-- scripts/get_pkg_filename_from_distro.sh.in | 4 ++-- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/gnu-linux/installer.sh.in b/gnu-linux/installer.sh.in index 210aac9..48ee36a 100755 --- a/gnu-linux/installer.sh.in +++ b/gnu-linux/installer.sh.in @@ -49,7 +49,7 @@ command -v zenity && have_zenity=1 || true if [[ "$ID" = *"debian"* ]]; then if [[ "$VERSION_ID" = *"10"* ]]; then echo "found $debian_10_str" - distro_identifier="debian10" + #distro_identifier="debian10" elif [[ "$VERSION_ID" = *"11"* ]]; then echo "found $debian_11_str" distro_identifier="debian11" @@ -65,13 +65,13 @@ fi if [[ "$ID" = *"ubuntu"* ]]; then if [[ "$VERSION_ID" = *"18.04"* ]] || [[ "$UBUNTU_CODENAME" = "bionic" ]]; then echo "found $ubuntu_18_04_str" - distro_identifier="ubuntu1804" + #distro_identifier="ubuntu1804" elif [[ "$VERSION_ID" = *"20.04"* ]] || [[ "$UBUNTU_CODENAME" = "focal" ]]; then echo "found $ubuntu_20_04_str" distro_identifier="ubuntu2004" elif [[ "$VERSION_ID" = *"21.10"* ]] || [[ "$UBUNTU_CODENAME" = "impish" ]]; then echo "found $ubuntu_21_10_str" - distro_identifier="ubuntu2110" + #distro_identifier="ubuntu2110" elif [[ "$VERSION_ID" = *"22.04"* ]] || [[ "$UBUNTU_CODENAME" = "jammy" ]]; then echo "found $ubuntu_22_04_str" distro_identifier="ubuntu2204" @@ -79,16 +79,16 @@ if [[ "$ID" = *"ubuntu"* ]]; then elif [[ "$ID_LIKE" = *"ubuntu"* ]]; then if [[ "$UBUNTU_CODENAME" = *"bionic"* ]]; then echo "found $ubuntu_18_04_str" - distro_identifier="ubuntu1804" + #distro_identifier="ubuntu1804" elif [[ "$UBUNTU_CODENAME" = *"focal"* ]]; then echo "found $ubuntu_20_04_str" distro_identifier="ubuntu2004" elif [[ "$UBUNTU_CODENAME" = *"hirsute"* ]]; then echo "found $ubuntu_21_10_str" - distro_identifier="ubuntu2110" + #distro_identifier="ubuntu2110" elif [[ "$UBUNTU_CODENAME" = *"impish"* ]]; then echo "found $ubuntu_21_10_str" - distro_identifier="ubuntu2110" + #distro_identifier="ubuntu2110" elif [[ "$UBUNTU_CODENAME" = *"jammy"* ]]; then echo "found $ubuntu_22_04_str" distro_identifier="ubuntu2204" @@ -96,7 +96,7 @@ elif [[ "$ID_LIKE" = *"ubuntu"* ]]; then elif [[ "$ID" = *"trisquel"* ]]; then if [[ "$VERSION_ID" = *"9.0"* ]]; then echo "found $ubuntu_18_04_str" - distro_identifier="ubuntu1804" + #distro_identifier="ubuntu1804" fi fi @@ -116,16 +116,19 @@ if [[ "$ID" = "fedora" ]] || [[ "$ID_LIKE" = "fedora" ]]; then architecture="x86_64" if [[ "$VERSION_ID" = *"32"* ]]; then echo "found Fedora 32" - distro_identifier="fedora32" + #distro_identifier="fedora32" elif [[ "$VERSION_ID" = *"33"* ]]; then echo "found Fedora 33" - distro_identifier="fedora33" + #distro_identifier="fedora33" elif [[ "$VERSION_ID" = *"34"* ]]; then echo "found Fedora 34" - distro_identifier="fedora34" + #distro_identifier="fedora34" elif [[ "$VERSION_ID" = *"35"* ]]; then echo "found Fedora 35" distro_identifier="fedora35" + elif [[ "$VERSION_ID" = *"36"* ]]; then + echo "found Fedora 36" + distro_identifier="fedora36" fi fi diff --git a/gnu-linux/make_installer_zip.sh.in b/gnu-linux/make_installer_zip.sh.in index aa2431c..7ffdcc3 100755 --- a/gnu-linux/make_installer_zip.sh.in +++ b/gnu-linux/make_installer_zip.sh.in @@ -26,7 +26,7 @@ readme=$4 # dir holding each package packages_dir="@PACKAGES_DIR@" -distros="archlinux debian11 debian12 ubuntu2004 ubuntu2204 fedora34 fedora35" +distros="archlinux debian11 debian12 ubuntu2004 ubuntu2204 fedora35 fedora36" get_pkg_filename_from_distro_sh="@MESON_BUILD_ROOT@/scripts/get_pkg_filename_from_distro.sh" zip_filename=`basename $out_file` zip_inner_dir_name="${zip_filename%.*}" diff --git a/meson.build b/meson.build index d6689d3..ab1d7b1 100644 --- a/meson.build +++ b/meson.build @@ -65,7 +65,7 @@ is_arch = distro.contains ('arch') is_debian = distro.contains ('debian') or distro.contains ('ubuntu') is_nixos = distro.contains ('nixos') is_rpm = distro.contains ('fedora') -is_windows_msys = distro.contains ('windows10-msys') +is_windows_msys = distro.contains ('windows-msys') is_osx_brew = distro.contains ('osx-brew') is_gnu_linux = distro.contains ('gnu-linux') is_appimage = distro.contains ('appimage') diff --git a/meson_options.txt b/meson_options.txt index ef6e737..ab69ffa 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -74,8 +74,9 @@ option ( description: 'Locales for the manual') option ( - 'distro', type: 'string', - value: 'debian10', + 'distro', type: 'combo', + choices: ['archlinux', 'debian11', 'debian12', 'fedora35', 'fedora36', 'windows-msys', 'flatpak', 'gnu-linux', 'osx-brew', 'appimage', 'ubuntu2004', 'ubuntu2204' ], + value: 'arch', description: 'Distro to build') option ( diff --git a/scripts/get_pkg_filename_from_distro.sh.in b/scripts/get_pkg_filename_from_distro.sh.in index 11ba830..300f0b9 100755 --- a/scripts/get_pkg_filename_from_distro.sh.in +++ b/scripts/get_pkg_filename_from_distro.sh.in @@ -38,10 +38,10 @@ distro_to_pkg_type () { "fedora"*) echo "FEDORA" ;; - "windows10") + "windows") echo "WINDOWS" ;; - "windows10-msys") + "windows-msys") echo "WINDOWS_MSYS" ;; "osx" | "macos"*)