Skip to content

Commit

Permalink
refactor(*): deprecate all lsb_release usage (#5933)
Browse files Browse the repository at this point in the history
Co-authored-by: ook37 <[email protected]>
  • Loading branch information
oklopfer and ook37 authored May 3, 2024
1 parent 5195e4a commit 874a9ed
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 49 deletions.
14 changes: 5 additions & 9 deletions packages/bpytop-git/bpytop-git.pacscript
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,14 @@ pkgver="1.0.68"
makedepends=("make" "python3" "python3-pip" "python3-distutils")
depends=("python3" "python3-pip" "python3-distutils")
pkgdesc="Linux/OSX/FreeBSD resource monitor."
release="$(lsb_release -cs)"
modern=("devel" "sid" "lunar" "bookworm" "mantic" "noble" "trixie" "testing" "unstable")

# shellcheck disable=SC2076
if [[ " ${modern[*]} " =~ " ${release} " ]]; then
pyhack=("--break-system-packages")
else
pyhack=()
fi
external_connection="true"

prepare() {
cd "${_archive}"
modern=("devel" "sid" "lunar" "bookworm" "mantic" "noble" "trixie" "testing" "unstable")
for mod in "${modern[@]}"; do
[[ ${mod} == "${DISTRO#*:}" ]] && pyhack=("--break-system-packages")
done
pip3 install --upgrade psutil "${pyhack[@]}"
}

Expand Down
3 changes: 1 addition & 2 deletions packages/cmake-data-deb/cmake-data-deb.pacscript
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ pkgname="cmake-data-deb"
gives="cmake-data"
pkgver="3.25.1"
pkgdesc="CMake data files (modules, templates and documentation)"
codename="$(lsb_release -cs)"
case "${codename}" in
case "${DISTRO#*:}" in
"bullseye")
source=("http://ftp.debian.org/debian/pool/main/c/cmake/cmake-data_${pkgver}-1~bpo11+1_all.deb")
sha256sums=("6c7c8d91c045ccf44c9cc7dc1f05d8431707df4651bf18b4a3ee34847bc205f3")
Expand Down
3 changes: 1 addition & 2 deletions packages/cmake-deb/cmake-deb.pacscript
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ gives="cmake"
pkgver="3.25.1"
pkgdesc="CMake data files (modules, templates and documentation)"
pacdeps=("cmake-data-deb")
codename="$(lsb_release -cs)"
case "${codename}" in
case "${DISTRO#*:}" in
"bullseye")
source=("http://ftp.debian.org/debian/pool/main/c/cmake/cmake_${pkgver}-1~bpo11+1_amd64.deb")
sha256sums=("5561f20944ef4d9d3ea496bc92dff5b1d5adea3cfee1fa302a7298bedeb03f9e")
Expand Down
3 changes: 1 addition & 2 deletions packages/fsearch-deb/fsearch-deb.pacscript
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ pkgname="fsearch-deb"
gives="fsearch"
repology=("project: fsearch")
pkgver="0.2.3"
codename="$(lsb_release -cs)"
case "${codename}" in
case "${DISTRO#*:}" in
bullseye)
source=("https://download.opensuse.org/repositories/home:/cboxdoerfer/Debian_11/amd64/fsearch_${pkgver}-1+3.1_amd64.deb")
sha256sums=("1ecaacb7e1f2b3eab3c15c7307bab0cbea9c0a8aa32ffc195e0d354a86d3a0f6")
Expand Down
3 changes: 1 addition & 2 deletions packages/hypnotix-deb/hypnotix-deb.pacscript
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
pkgname="hypnotix-deb"
gives="hypnotix"
repology=("project: ${gives}")
codename="$(lsb_release -cs)"
pacdeps=("gir1.2-xapp-1.0-deb" "circle-flags-svg-deb")
case "${codename}" in
case "${DISTRO#*:}" in
bullseye | bookworm | trixie)
pacdeps=("gir1.2-xapp-1.0-deb" "circle-flags-svg-deb" "python3-imdbpy-deb")
;;
Expand Down
2 changes: 1 addition & 1 deletion packages/libcamera-git/libcamera-git.pacscript
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pkgname="libcamera-git"
gives="libcamera"
pkgver="0.1.0"
source=("https://git.libcamera.org/libcamera/libcamera.git")
if [[ "$(lsb_release -cs)" == "focal" ]]; then
if [[ "${DISTRO#*:}" == "focal" ]]; then
pacdeps=("meson-focal-deb")
else
MESON="meson"
Expand Down
14 changes: 5 additions & 9 deletions packages/qtile-extras-git/qtile-extras-git.pacscript
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@ pkgdesc="A list of mods developed by elParaguayo for Qtile"
pacdeps=("qtile-git")
maintainer=("Ruturajn <[email protected]>")
makedepends=("python3-venv" "python3-pip")

release="$(lsb_release -cs)"
modern=("devel" "sid" "lunar" "bookworm" "mantic" "noble" "trixie" "testing" "unstable")
# shellcheck disable=SC2076
if [[ " ${modern[*]} " =~ " ${release} " ]]; then
pyhack=("--break-system-packages")
else
pyhack=()
fi
external_connection="true"

build() {
cd "${_archive}"
modern=("devel" "sid" "lunar" "bookworm" "mantic" "noble" "trixie" "testing" "unstable")
for mod in "${modern[@]}"; do
[[ ${mod} == "${DISTRO#*:}" ]] && pyhack=("--break-system-packages")
done
pip3 install build --user "${pyhack[@]}"
python3 -m build
mv dist/*.whl .
Expand Down
14 changes: 5 additions & 9 deletions packages/qtile-git/qtile-git.pacscript
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@ license="MIT"
depends=("python3-cffi" "xserver-xorg" "python3-xcffib" "python3-cairocffi" "libpangocairo-1.0-0" "python3-pip" "python3-dbus" "libpulse-dev" "pavucontrol" "python3-testresources")
pkgdesc="A full-featured, hackable tiling window manager written and configured in Python"
maintainer=("Ruturajn <[email protected]>")

release="$(lsb_release -cs)"
modern=("devel" "sid" "lunar" "bookworm" "mantic" "noble" "trixie" "testing" "unstable")
# shellcheck disable=SC2076
if [[ " ${modern[*]} " =~ " ${release} " ]]; then
pyhack=("--break-system-packages")
else
pyhack=()
fi
external_connection="true"

package() {
cd "${_archive}"
modern=("devel" "sid" "lunar" "bookworm" "mantic" "noble" "trixie" "testing" "unstable")
for mod in "${modern[@]}"; do
[[ ${mod} == "${DISTRO#*:}" ]] && pyhack=("--break-system-packages")
done
pip3 install --upgrade --no-cache --force-reinstall cairocffi cffi xcffib "${pyhack[@]}"
pip3 install dbus-next setuptools-scm setuptools "${pyhack[@]}"
mkdir -p "${pkgdir}"/usr/share/xsessions
Expand Down
3 changes: 1 addition & 2 deletions packages/tenacity-git/tenacity-git.pacscript
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ source=("https://codeberg.org/tenacityteam/tenacity.git")
pkgver="1.3.1"
makedepends=("python3-pip" "build-essential" "ninja-build" "libavcodec-dev" "libavformat-dev" "libavutil-dev" "libavdevice-dev" "libavfilter-dev" "libpostproc-dev" "libportsmf-dev" "libflac++-dev" "libglib2.0-dev" "libgtk-3-dev" "libid3tag0-dev" "libjack-jackd2-dev" "liblilv-dev" "libmad0-dev" "libmp3lame-dev" "libogg-dev" "libpng-dev" "portaudio19-dev" "libportmidi-dev" "libserd-dev" "libsndfile1-dev" "libsord-dev" "libsoundtouch-dev" "libsoxr-dev" "libsuil-dev" "libtwolame-dev" "vamp-plugin-sdk" "libvorbis-dev" "lv2-dev" "zlib1g-dev" "cmake" "ninja-build" "libjpeg-dev" "libtiff-dev" "liblzma-dev" "libsqlite3-dev" "libwxgtk3.2-dev" "libjsoncpp-dev" "libzip-dev" "zipcmp" "zipmerge" "ziptool" "libzip4" "gettext")
depends=("libc6" "libexpat1" "libgcc-s1" "libgdk-pixbuf-2.0-0" "libglib2.0-0" "libgtk-3-0" "libid3tag0" "liblilv-0-0" "libmad0" "libogg0" "libportaudio2" "libsndfile1" "libsoundtouch1" "libsoxr0" "libstdc++6" "libsuil-0-0" "libtwolame0" "libvamp-hostsdk3v5" "libvorbis0a" "libvorbisenc2" "libvorbisfile3")
codename="$(lsb_release -cs)"
case "${codename}" in
case "${DISTRO#*:}" in
bookworm)
depends+=("libavcodec59" "libavformat59" "libavutil57" "libflac++10" "libflac12" "libportsmf0" "libwxbase3.2-1" "libwxgtk3.2-1")
;;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,14 @@ depends=("gettext" "python3-pip" "dh-python" "python3-all" "python3-pyqt5" "pyth
pkgdesc="Securely and easily download, verify, install, and launch Tor Browser in Linux"
optdepends=("apparmor: support for apparmor profiles")
maintainer=("Oren Klopfer <[email protected]>")

release="$(lsb_release -cs)"
modern=("devel" "sid" "lunar" "bookworm" "mantic" "noble" "trixie" "testing" "unstable")
# shellcheck disable=SC2076
if [[ " ${modern[*]} " =~ " ${release} " ]]; then
pyhack=("--break-system-packages")
else
pyhack=()
fi
external_connection="true"

prepare() {
cd "${_archive}"
modern=("devel" "sid" "lunar" "bookworm" "mantic" "noble" "trixie" "testing" "unstable")
for mod in "${modern[@]}"; do
[[ ${mod} == "${DISTRO#*:}" ]] && pyhack=("--break-system-packages")
done
pip3 install distro "${pyhack[@]}"
}

Expand Down
3 changes: 1 addition & 2 deletions packages/veracrypt-deb/veracrypt-deb.pacscript
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ repology=("project: veracrypt")
gives="veracrypt"
breaks=("${gives}" "${gives}-console" "${gives}-git")
pkgver="1.26.7"
codename=$(lsb_release -cs)
case "${codename}" in
case "${DISTRO#*:}" in
"jammy")
distro="Ubuntu-22.04"
sha256sums=("f0dca101cf5b5eccfadaad3f53aea037fd5a01cd9afeb7248ddcca28b821a0ef")
Expand Down

0 comments on commit 874a9ed

Please sign in to comment.