Add compatibility to openSUSE and derivatives and trim dependencies installation

This commit is contained in:
Tiago Conceição
2022-11-10 18:45:29 +00:00
parent 4ff984cffb
commit 2d1e83e668
3 changed files with 22 additions and 5 deletions
+2 -1
View File
@@ -24,9 +24,10 @@
## To auto install on Linux:
```bash
[ "$(command -v apt-get)" -a -z "$(command -v curl)" ] && sudo apt-get install -y curl
[ "$(command -v apt)" -a -z "$(command -v curl)" ] && sudo apt-get install -y curl
[ "$(command -v pacman)" -a -z "$(command -v curl)" ] && sudo pacman -S curl
[ "$(command -v dnf)" -a -z "$(command -v curl)" ] && sudo dnf install -y curl
[ "$(command -v zypper)" -a -z "$(command -v curl)" ] && sudo zypper install -y curl
bash -c "$(curl -fsSL https://raw.githubusercontent.com/sn4k3/UVtools/master/Scripts/install-uvtools.sh)"
```
+8 -3
View File
@@ -36,23 +36,28 @@ elif testcmd apt; then
#apt install -y libdc1394-22 libopenexr24
#apt install -y libdc1394-25 libopenexr25
#apt install -y libjpeg-dev libpng-dev libgeotiff-dev libgeotiff5 libavcodec-dev libavformat-dev libswscale-dev libtbb-dev libgl1-mesa-dev libgdiplus
apt install -y libjpeg-dev libpng-dev libgeotiff-dev libgeotiff5 libtbb-dev libgdiplus
apt install -y libgeotiff5 libgdiplus
# mini only requires: libgdiplus libgeotiff-dev libgeotiff5
elif testcmd pacman; then
osVariant="arch"
pacman -Syu
#pacman -S openjpeg2 libjpeg-turbo libpng libgeotiff libdc1394 ffmpeg openexr tbb libgdiplus
pacman -S libpng openjpeg2 libjpeg-turbo libgeotiff tbb libgdiplus
pacman -S libgeotiff libgdiplus
elif testcmd dnf; then
osVariant="rhel"
dnf update -y
#dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
#dnf install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
#dnf install -y libjpeg-devel libjpeg-turbo-devel libpng-devel libgeotiff-devel libdc1394-devel ffmpeg-devel tbb-devel mesa-libGL libgdiplus
dnf install -y libjpeg-devel libjpeg-turbo-devel libpng-devel libgeotiff-devel tbb-devel libgdiplus
dnf install -y libgeotiff libgdiplus
elif testcmd zypper; then
osVariant="suse"
zypper refresh
zypper install -y libgeotiff5 libgdiplus0
else
echo "Error: Base operative system / package manager not identified, nothing was installed"
exit -1
fi
echo "- Detected: $osVariant $arch"
echo "Completed: You can now run UVtools"
+12 -1
View File
@@ -183,6 +183,9 @@ elif testcmd pacman; then
elif testcmd dnf; then
osVariant="rhel"
[ -z "$(command -v curl)" ] && sudo dnf install -y curl
elif testcmd zypper; then
osVariant="suse"
[ -z "$(command -v curl)" ] && sudo zypper install -y curl
fi
if [ -z "$osVariant" ]; then
@@ -211,8 +214,16 @@ if [ $(version $lddversion) -lt $(version $requiredlddversion) ]; then
exit -1
fi
LDCONFIG=''
if testcmd ldconfig; then
if [ -z "$(ldconfig -p | grep libpng)" -o -z "$(ldconfig -p | grep libgdiplus)" -o -z "$(ldconfig -p | grep libgeotiff)" ]; then
LDCONFIG='ldconfig'
else
LDCONFIG="$(whereis ldconfig | awk '{ print $2 }')"
fi
if [ -n "$LDCONFIG" ]; then
if [ -z "$($LDCONFIG -p | grep libgeotiff)" -o -z "$($LDCONFIG -p | grep libgdiplus)" ]; then
echo "- Missing dependencies found, installing..."
sudo bash -c "$(curl -fsSL $dependencies_url)"
fi