aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore6
-rw-r--r--Makefile10
-rw-r--r--README.md44
-rwxr-xr-xgtk-classic-build-deb.sh104
4 files changed, 164 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f93f80d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+gtk*z
+*dsc
+*.build*
+*.changes*
+gtk3classic/
+.*.swp
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..a93c55c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,10 @@
+# Startdate: 2021-08-04 09:51
+
+all: gtk3
+
+gtk3:
+ ./gtk-classic-build-deb.sh
+
+clean:
+ rm -rf ./debian_vers ./classic_vers ./gtk+-3.24*/
+ rm -rf gtk+3.0_*z gtk+3.0_*.build* gtk+3.0_*.changes* gtk+3.0_*.dsc ./libgtk-3*deb ./libgail-3*deb ./gtk3classic/
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..5817526
--- /dev/null
+++ b/README.md
@@ -0,0 +1,44 @@
+# Readme for gtk3-classic-build-deb
+Gtk3-classic-build-deb is [bgstack15](https://bgstack15.wordpress.com)'s builds of [gtk3-classic](https://github.com/lah7/gtk3-classic) for Devuan Ceres. Check out the final assets at my [OBS sub-project](https://build.opensuse.org/project/show/home:bgstack15:gtk3-classic).
+
+## Overview
+Notable improvements over stock gtk3 include
+* Regular type-to-navigate-to-filename in the file dialog instead of the "typeahead" behavior
+* CSDs are removed, which actually could deprecate [gtk3-nocsd](https://packages.debian.org/sid/gtk3-nocsd) (official upstream Debian package)
+
+Notable weaknesses include:
+* Always-on mnemonics is still not implemented. Keep using [gtk3-automnemonics](https://pkginfo.devuan.org/cgi-bin/package-query.html?c=package&q=gtk3-automnemonics) for that.
+
+## Using
+The `gtk3-classic-build-deb.sh` script and Makefile can be used to generate the build assets that can be used to build the binary dpkgs of gtk3 with the gtk3-classic patches.
+
+The shell script finds the available gtk3 versions in debian, and gtk3-classic releases, and then finds the highest version that matches between the two. This highest version then gets downloaded, given the patches in `debian/patches/series`, and then the .dsc and .debian.tar.xz file are generated!
+
+## Upstreams
+### Build script
+The build script is loosely inspired by [luigifab/deb.sh](https://gist.github.com/luigifab/0fce786cdb93b5687069a82f490ea95e) (gist.github.com), but is maintained separately.
+
+### gtk3-classic
+The [gtk3-classic](https://github.com/lah7/gtk3-classic) patch set is one of the main inputs to this process.
+
+### gtk3
+The debian [orig](http://deb.debian.org/debian/pool/main/g/gtk+3.0/gtk+3.0_3.24.29.orig.tar.xz) tarball is used for the build process.
+
+## Alternatives
+* [gtk3-stackrpms](https://gitlab.com/bgstack15/stackrpms/-/tree/master/gtk3-stackrpms) suite which suits my needs almost exactly, minus the file dialog type-to-find functionality.
+
+## Dependencies
+To run the build script you need:
+* rmadison
+* git
+* tar
+
+To build gtk3, you need the standard set which is available in the `debian/control` file.
+
+## References
+* [gtk3-stackrpms](https://gitlab.com/bgstack15/stackrpms/-/tree/master/gtk3-stackrpms) suite
+* [gtk3-nooverlayscrollbar](https://pkginfo.devuan.org/cgi-bin/policy-query.html?c=package&q=gtk3-nooverlayscrollbar&x=submit) in Devuan
+* [luigifab/deb.sh](https://gist.github.com/luigifab/0fce786cdb93b5687069a82f490ea95e)
+
+## Differences from upstreams
+N/A. No direct upstreams
diff --git a/gtk-classic-build-deb.sh b/gtk-classic-build-deb.sh
new file mode 100755
index 0000000..d67001c
--- /dev/null
+++ b/gtk-classic-build-deb.sh
@@ -0,0 +1,104 @@
+#!/bin/sh
+# File: gtk-classic-build-deb.sh
+# Location: https://gitlab.com/bgstack15/gtk3-classic-build
+# Author: bgstack15
+# Startdate: 2021-08-03 22:13
+# SPDX-License-Identifier: GPL-3.0
+# Title: Build dpkg-buildpackage assets for gtk3-classic
+# Purpose: combine gtk+3.0 from debian and gtk3-classic into a .deb suite for Devuan Ceres
+# History:
+# Usage:
+# make
+# References:
+# https://gist.github.com/luigifab/0fce786cdb93b5687069a82f490ea95e
+# https://launchpad.net/~luigifab/+archive/ubuntu/packages-gtk3-classic/+packages
+# https://launchpad.net/~luigifab/+archive/ubuntu/packages-gtk3-classic
+# https://github.com/lah7/gtk3-classic/releases
+# Improve:
+# make the find-highest-version thing a menu?
+# Dependencies:
+# rmadison, git, dpkg-buildpackage
+
+test -z "${WORKDIR}" && WORKDIR="$( readlink -f . )"
+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
+ (
+ 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 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}"
+
+#### Fetch debian sources
+cd "${WORKDIR}"
+for word in "${raw_version}.orig.tar.xz" "${deb_version}.debian.tar.xz" "${deb_version}.dsc";
+do
+ wget --no-clobber --content-disposition "http://deb.debian.org/debian/pool/main/g/gtk+3.0/gtk+3.0_${word}"
+done
+
+#### Fetch gtk3-classic sources
+(
+ cd "${WORKDIR}/gtk3classic"
+ git checkout "${raw_version}"
+)
+
+#### Combine
+# explode tarballs
+tar -Jxf "${WORKDIR}/gtk+3.0_${raw_version}.orig.tar.xz"
+cd "${WORKDIR}/gtk+-${raw_version}"
+tar -Jxf "${WORKDIR}/gtk+3.0_${deb_version}.debian.tar.xz"
+mv debian/changelog debian/changelog.orig
+{
+ echo "gtk+3.0 (${raw_version}-100+devuan) obs; urgency=medium"
+ echo ""
+ echo " * Rebuild gtk3 with gtk3-classic patches"
+ echo ""
+ echo " -- B. Stack <bgstack15@gmail.com> $( date "+%a, %d %b %+4Y %T %z" )"
+ echo ""
+} > debian/changelog
+cat debian/changelog.orig >> debian.changelog
+rm debian.changelog
+cp -p "${WORKDIR}/gtk3classic/"*.patch debian/patches/
+cp -p "${WORKDIR}/gtk3classic/"*.css debian/patches/
+cat "${WORKDIR}/gtk3classic/series" >> debian/patches/series
+sed -r -i 's/env -u LD_PRELOAD xvfb-run -a dh_auto_test/#env -u LD_PRELOAD xvfb-run -a dh_auto_test/' debian/rules
+sed -r -i 's/Build-Depends: /Build-Depends: libjpeg62-turbo-dev, /' debian/control
+# remove patch for all
+case "${raw_version}" in
+ 3.24.29)
+ 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
+ ;;
+esac
+
+#### Build .dsc and tarballs for OBS
+echo "WORKHERE: build dsc and tarballs for OBS"
+cd "${WORKDIR}/gtk+-${raw_version}"
+dpkg-buildpackage --unsigned-source --unsigned-buildinfo --unsigned-changes -S
+
+#### Optionally, perform build operation now.
+#dpkg-buildpackage --unsigned-source --unsigned-buildinfo --unsigned-changes -B
+
+#### Clean
+test -z "${NO_CLEAN}" && rm -rf "${WORKDIR}/debian_vers" "${WORKDIR}/classic_vers" "${WORKDIR}/gtk+-${raw_version}"
bgstack15