aboutsummaryrefslogtreecommitdiff
path: root/gtk-classic-build-deb.sh
diff options
context:
space:
mode:
Diffstat (limited to 'gtk-classic-build-deb.sh')
-rwxr-xr-xgtk-classic-build-deb.sh62
1 files changed, 40 insertions, 22 deletions
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