Skip to content

Commit

Permalink
force qt5 RPM to depend on 2.15 libqt5pas, my Qt6 rpm, rev ver
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbannon committed Dec 14, 2023
1 parent 92597fe commit 5e2c05e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 16 deletions.
30 changes: 22 additions & 8 deletions package/mk_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
# 2021/05/15
# don't add gnome-shell-extension-appindicator to dependencies,
# it pulls in half of Gnome desktop, non gnome users would hate me.
# 2023-12-13
# Force a Minium libqt5pas of 1.2.15, this will need constant attention.
# Add a qt5 amd64 rpm
# ====================================================

PROD=tomboy-ng
Expand All @@ -30,11 +33,14 @@ function DoAlien () {
ARCH="$1"
rm -Rf "$RDIR"
# Note, debs have a dash after initial version number, RPM an underscore
if [ "$1" = amd64Qt ]; then
if [ "$1" = amd64Qt5 ]; then
# FILENAME="tomboy-ngQt_0.24b-0_amd64.deb"
ARCH=x86_64
fi
if [ "$1" = amd64 ]; then
if [ "$1" = amd64Qt6 ]; then
ARCH=x86_64
fi
if [ "$1" = amd64 ]; then # the gtk2 version
ARCH=x86_64
fi
if [ "$1" = i386 ]; then
Expand All @@ -43,7 +49,7 @@ function DoAlien () {

echo "--- RDIR=$RDIR and building for $1 using $FILENAME ---------"
alien -r -g -v -k "$FILENAME"
# Alien inserts requests the package create / and /usr/bin and
# Alien requests the package create / and /usr/bin and
# the os does not apprieciate that, not surprisingly.
# This removes the %dir /
sed -i "s/^Release:.*/Release: $PACKVER/" "$RDIR"/"$RDIR"-"$PACKVER".spec
Expand All @@ -59,11 +65,15 @@ function DoAlien () {

sed -i '10i Packager: David Bannon <tomboy-ng@bannons.id.au>' "$RDIR"/"$RDIR"-"$PACKVER".spec
sed -i '11i URL: https://githup.com/tomboy/tomboy-ng' "$RDIR"/"$RDIR"-"$PACKVER".spec

echo "------------ Setting Minium libqt5pas to 1.2.15 ---------------------------
sed -i '12i Requires: libqt5pas >= 1.2.15' "$RDIR"/"$RDIR"-"$PACKVER".spec
gunzip "$RDIR"/usr/share/man/man1/tomboy-ng.1.gz
bzip2 "$RDIR"/usr/share/man/man1/tomboy-ng.1
sed -i "s/tomboy-ng.1.gz/tomboy-ng.1.bz2/" "$RDIR"/"$RDIR"-"$PACKVER".spec
cp "$RDIR"/"$RDIR"-"$PACKVER".spec "$1".spec
echo "%changelog" >> "$RDIR"/"$RDIR"-"$PACKVER".spec
CHDATE=`date +"%a %b %d %Y"`
CHDATE="* $CHDATE David Bannon <tomboy-ng@bannons.id.au> $VERS"-"$PACKVER"
Expand All @@ -83,15 +93,19 @@ function DoAlien () {
cp "$RDIR"-"$PACKVER".spec ../../"$RDIR"-"$PACKVER".spec-"$1"
rpmbuild --target "$ARCH" --buildroot "$PWD" -bb "$RDIR"-"$PACKVER".spec
cd ..
# if its a Qt one, rename it so it does not get overwritten subsquently
if [ "$1" = amd64Qt ]; then
mv "$RDIR"-"$PACKVER"."$ARCH".rpm "$PROD"Qt-"$VERS"-"$PACKVER"."$ARCH".rpm
# if its a Qt5 one, rename it so it does not get overwritten subsquently
if [ "$1" = amd64Qt5 ]; then
mv "$RDIR"-"$PACKVER"."$ARCH".rpm "$PROD"Qt5-"$VERS"-"$PACKVER"."$ARCH".rpm
fi
if [ "$1" = amd64Qt6 ]; then
mv "$RDIR"-"$PACKVER"."$ARCH".rpm "$PROD"Qt6-"$VERS"-"$PACKVER"."$ARCH".rpm
fi
}
rm -f tom*.rpm
# Must do the "non std" ones first, else have overwrite problems
DoAlien "amd64Qt"
DoAlien "amd64Qt5"
DoAlien "amd64Qt6"
DoAlien "i386"
DoAlien "amd64"
chown "$SUDO_USER" *.rpm
Expand Down
14 changes: 7 additions & 7 deletions package/package.bash
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function ModeParamArch () { # expects to be called like ARCH=$(ModeParamArch R
echo "i386"
;;
ReleaseQT5)
echo "amd64Qt"
echo "amd64Qt5"
;;
ReleaseRasPi)
echo "armhf"
Expand All @@ -90,11 +90,11 @@ function ModeParamArch () { # expects to be called like ARCH=$(ModeParamArch R
echo "arm64"
;;
ReleaseQT6)
echo "amd64Qt6"
;;
ReleaseLin32Qt5)
echo "i386Qt5"
;;
echo "amd64Qt6"
;;
ReleaseLin32Qt5)
echo "i386Qt5"
;;
esac
}

Expand Down Expand Up @@ -233,7 +233,7 @@ function DebianPackage () {
"ReleaseQT6")
# echo "++++++++++ Setting QT6 +++++++++"
CTRL_ARCH="amd64"
CTRL_DEPENDS="libqt6pas6, libc6 (>= 2.34), wmctrl, libnotify-bin, libqt6pas6 (>= 6.2.7)"
CTRL_DEPENDS="libc6 (>= 2.34), wmctrl, libnotify-bin, libqt6pas6 (>= 6.2.7)"
CTRL_RELEASE="Qt6 release."
# we must force qt6 app to use qt6ct because of a bug in qt6.tsavedialog, no, not using Laz300
# note ugly syntax, qt6 strips it off (and anything after it) before app sees it.
Expand Down
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.36h
0.36i

0 comments on commit 5e2c05e

Please sign in to comment.