Skip to content

Commit

Permalink
Correct Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Lord-Grey committed Oct 1, 2024
1 parent 46744d3 commit 29b9389
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ TARGET := debian/tmp
REQUIRED_DEPS := libusb libasound libmbedtls libturbojpeg libcec

# get qt version and set qt deps depending on version
T64 = $(shell { dpkg-query -s libqt5widgets5t64 || dpkg-query -s libqt6widgets6t64; } &>/dev/null && echo t64 )
QT6_PACKAGE_VERSION = $(shell dpkg-query -W -f '$${Version}' libqt6widgets6$(T64) 2>/dev/null || echo 0)
QT6_PACKAGE_VERSION := $(shell dpkg-query -W -f '$${Version}' libqt6widgets6* 2>/dev/null || echo 0)
ifeq (ok,$(shell dpkg --compare-versions "$(QT6_PACKAGE_VERSION)" "ge" "6.0" && echo ok))
QT_DEPS = qt6-qpa-plugins,libqt6network6$(T64),libqt6widgets6$(T64),libqt6sql6$(T64),libqt6serialport6,libqt6sql6-sqlite$(T64),
QT_DEPS := qt6-qpa-plugins libqt6network6 libqt6widgets6 libqt6sql6 libqt6serialport6 libqt6sql6-sqlite
else
QT_DEPS = libqt5network5$(T64),libqt5widgets5$(T64),libqt5x11extras5,libqt5sql5$(T64),libqt5serialport5,libqt5sql5-sqlite,
QT_DEPS := libqt5network5 libqt5widgets5 libqt5x11extras5 libqt5sql5 libqt5serialport5 libqt5sql5-sqlite
endif

FIND_DEPENDS = $(shell \
Expand All @@ -32,6 +31,9 @@ FIND_DEPENDS = $(shell \
fi; \
done; \
done; \
for QT_DEP in $(QT_DEPS); do \
RESULT+=("$$(dpkg -S $$(basename "$$QT_DEP") 2>/dev/null | cut -d : -f 1 | sed '/-dev/d' | head -1)"); \
done; \
printf '%s,' "$${RESULT[@]}" \
)

Expand All @@ -56,7 +58,7 @@ binary:
[ -d $(TARGET)/DEBIAN ] || mkdir -p $(TARGET)/DEBIAN
cp -rf cmake/package-scripts/* $(TARGET)/DEBIAN/
chmod 0775 $(TARGET)/DEBIAN/*
dpkg-gencontrol -phyperion "-Vdist:Depends=$(QT_DEPS)$(DETERMINED_DEPS)"
dpkg-gencontrol -phyperion "-Vdist:Depends=$(DETERMINED_DEPS)"
dpkg-deb --build $(TARGET) ..

clean:
Expand Down

0 comments on commit 29b9389

Please sign in to comment.