aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-02-04 00:32:55 +0000
committerB. Stack <bgstack15@gmail.com>2022-02-04 00:32:55 +0000
commit8c01a6533198c2d4361fde2b269c01d3230a8493 (patch)
treec4c9b34fd89d55f06241f15c2cd5154346fe02b6
parentadd rpm script (diff)
parentremove improve: line about rpm (diff)
downloadgtk3-classic-build-8c01a6533198c2d4361fde2b269c01d3230a8493.tar.gz
gtk3-classic-build-8c01a6533198c2d4361fde2b269c01d3230a8493.tar.bz2
gtk3-classic-build-8c01a6533198c2d4361fde2b269c01d3230a8493.zip
Merge branch 'build-3.24.31' into 'master'
Build 3.24.31 See merge request bgstack15/gtk3-classic-build!1
-rw-r--r--Makefile5
-rwxr-xr-xget-latest-versions.sh23
-rwxr-xr-xgtk-classic-build-deb.sh62
3 files changed, 68 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index a93c55c..9056961 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,9 @@
+# File: Makefile
+# Location: https://gitlab.com/bgstack15/gtk3-classic-build
+# Author: bgstack15
# Startdate: 2021-08-04 09:51
+# Title: Makefile for gtk3-classic-build debuild task
+# Improve:
all: gtk3
diff --git a/get-latest-versions.sh b/get-latest-versions.sh
new file mode 100755
index 0000000..ad1ba19
--- /dev/null
+++ b/get-latest-versions.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+oldx="$( printf %s\\n "$-" | grep -q -e 'x' && echo YES )"
+set +x # hide this cruft
+test -z "${WORKDIR}" && WORKDIR="$( readlink -f . )"
+export WORKDIR
+RAW_DEB="$( rmadison gtk+3.0 | awk --field-separator='|' '{gsub(" ","");print $2,$2,$3}' | awk '{gsub("-[0-9]+","",$1);print}' | sort -r --sort=version | grep -v debug | head -n1)"
+RAW="$( echo "${RAW_DEB}" | awk '{print $1}' )"
+DEB="$( echo "${RAW_DEB}" | awk '{print $2}' )"
+if ! test "$( cd "${WORKDIR}/gtk3classic" 2>/dev/null && git remote -v | grep -o 'origin https://github.com/lah7/gtk3-classic' | head -n1 )" = "origin https://github.com/lah7/gtk3-classic" ; then
+ git clone "${GTK3CLASSIC_GIT}" "${WORKDIR}/gtk3classic"
+else
+ (
+ cd "${WORKDIR}/gtk3classic"
+ git checkout master
+ git pull --all
+ ) 1>/dev/null 2>&1
+fi
+CLASSIC="$( cd "${WORKDIR}/gtk3classic" ; git tag | sort -r --sort=version | head -n 1 )"
+export DEB RAW CLASSIC
+echo "CLASSIC=${CLASSIC}"
+echo "DEB=${DEB}"
+echo "RAW=${RAW}"
+test "${oldx}" = "YES" && set -x
diff --git a/gtk-classic-build-deb.sh b/gtk-classic-build-deb.sh
index d67001c..0e8dd4e 100755
--- a/gtk-classic-build-deb.sh
+++ b/gtk-classic-build-deb.sh
@@ -25,30 +25,47 @@ export WORKDIR
GTK3CLASSIC_GIT=https://github.com/lah7/gtk3-classic
cd "${WORKDIR}"
-#### Find versions of gtk3-classic available, which involves fetching the repo
-if ! test "$( cd "${WORKDIR}/gtk3classic" 2>/dev/null && git remote -v | grep -o 'origin https://github.com/lah7/gtk3-classic' | head -n1 )" = "origin https://github.com/lah7/gtk3-classic" ; then
- git clone "${GTK3CLASSIC_GIT}" "${WORKDIR}/gtk3classic"
-else
+if test -n "${RAW}" && test -n "${CLASSIC}" && test -n "${DEB}" ;
+then
+ echo "Using env vars:" ;
(
- cd "${WORKDIR}/gtk3classic"
- git checkout master
- git pull --all
+ set -x
+ deb_version="${DEB}"
+ raw_version="${RAW}"
+ classic_version="${CLASSIC}"
)
-fi
-classic_vers="$( cd "${WORKDIR}/gtk3classic" ; git tag | sort -r --sort=version | head -n 20 )"
-echo "${classic_vers}" > "${WORKDIR}/classic_vers"
+ deb_version="${DEB}"
+ raw_version="${RAW}"
+ classic_version="${CLASSIC}"
+else
+ # original logic does all this comparison lookup, but it obviously fails when debian or gtk3-classic is behind/mismatched.
+ #### Find versions of gtk3-classic available, which involves fetching the repo
+ if ! test "$( cd "${WORKDIR}/gtk3classic" 2>/dev/null && git remote -v | grep -o 'origin https://github.com/lah7/gtk3-classic' | head -n1 )" = "origin https://github.com/lah7/gtk3-classic" ; then
+ git clone "${GTK3CLASSIC_GIT}" "${WORKDIR}/gtk3classic"
+ else
+ (
+ cd "${WORKDIR}/gtk3classic"
+ git checkout master
+ git pull --all
+ )
+ fi
+ classic_vers="$( cd "${WORKDIR}/gtk3classic" ; git tag | sort -r --sort=version | head -n 20 )"
+ echo "${classic_vers}" > "${WORKDIR}/classic_vers"
-#### Find versions of gtk+3.0 available to debian
-debian_vers="$( rmadison gtk+3.0 | awk --field-separator='|' '{gsub(" ","");print $2,$2,$3}' | awk '{gsub("-[0-9]+","",$1);print}' | sort -r --sort=version | grep -v debug )"
-echo "${debian_vers}" > "${WORKDIR}/debian_vers"
+ #### Find versions of gtk+3.0 available to debian
+ debian_vers="$( rmadison gtk+3.0 | awk --field-separator='|' '{gsub(" ","");print $2,$2,$3}' | awk '{gsub("-[0-9]+","",$1);print}' | sort -r --sort=version | grep -v debug )"
+ echo "${debian_vers}" > "${WORKDIR}/debian_vers"
-#### Find highest matching version
-# the head -n1 makes it only the highest one. But anything in this list is a match between the two files.
-highest_ver="$( awk 'NR==FNR{a[$0];next} NR!=FNR{if($1 in a){print}}' "${WORKDIR}/classic_vers" "${WORKDIR}/debian_vers" | head -n1 )"
-raw_version="$( echo "${highest_ver}" | awk '{print $1}' )"
-deb_version="$( echo "${highest_ver}" | awk '{print $2}' )"
-# and $3 is the distro name like "experimental" which is not needed.
-echo "Found highest version: ${highest_ver}"
+ #### Find highest matching version
+ # the head -n1 makes it only the highest one. But anything in this list is a match between the two files.
+ highest_ver="$( awk 'NR==FNR{a[$0];next} NR!=FNR{if($1 in a){print}}' "${WORKDIR}/classic_vers" "${WORKDIR}/debian_vers" | head -n1 )"
+ raw_version="$( echo "${highest_ver}" | awk '{print $1}' )"
+ deb_version="$( echo "${highest_ver}" | awk '{print $2}' )"
+ classic_version="${raw_version}"
+
+ # and $3 is the distro name like "experimental" which is not needed.
+ echo "Found highest version: ${highest_ver}"
+fi
#### Fetch debian sources
cd "${WORKDIR}"
@@ -60,7 +77,7 @@ done
#### Fetch gtk3-classic sources
(
cd "${WORKDIR}/gtk3classic"
- git checkout "${raw_version}"
+ git checkout "${classic_version}"
)
#### Combine
@@ -86,9 +103,10 @@ sed -r -i 's/env -u LD_PRELOAD xvfb-run -a dh_auto_test/#env -u LD_PRELOAD xvfb-
sed -r -i 's/Build-Depends: /Build-Depends: libjpeg62-turbo-dev, /' debian/control
# remove patch for all
case "${raw_version}" in
- 3.24.29)
+ 3.24.29|3.24.31)
rm debian/patches/appearance__smaller-statusbar.patch debian/patches/file-chooser__places-sidebar.patch || :
sed -r -i 's/(appearance__smaller-statusbar.patch|file-chooser__places-sidebar.patch)//g;' debian/patches/series
+ sed -i -r debian/rules -e '2aDEB_BUILD_OPTIONS := nocheck'
;;
esac
bgstack15