Skip to content

Commit

Permalink
fix building on old systems from xenial up
Browse files Browse the repository at this point in the history
  • Loading branch information
bkw777 committed Jun 7, 2023
1 parent 41fbf80 commit 7496bde
Show file tree
Hide file tree
Showing 22 changed files with 256 additions and 156 deletions.
4 changes: 2 additions & 2 deletions .deb_build_number.mak
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# This file is generated by Makefile "make deb_build_number"
DEB_PKG_VERSION := 1.3.10
DEB_BUILD_NUMBER := 0001
DEB_PKG_VERSION := 1.3.11
DEB_BUILD_NUMBER := 0000
2 changes: 1 addition & 1 deletion BRANDING.mak
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

VERSION_MAJOR = 1
VERSION_MINOR = 3
VERSION_MICRO = 10
VERSION_MICRO = 11
BRANDING_SHORTNAME = mainline
BRANDING_LONGNAME = Ubuntu Mainline Kernel Installer
BRANDING_AUTHORNAME = Brian K. White
Expand Down
74 changes: 54 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

SHELL := /bin/bash
CFLAGS := -O2
VALACFLAGS := -D VTE_ASYNC # -D LOCK_TOGGLES_IN_KERNEL_COLUMN # -D VTE_ASYNC
VALACFLAGS := # -D LOCK_TOGGLES_IN_KERNEL_COLUMN

prefix := /usr
bindir := $(prefix)/bin
Expand All @@ -21,10 +21,9 @@ gtk+ := gtk+-3.0
json-glib := json-glib-1.0
gee := gee-0.8

x != pkg-config $(json-glib) --atleast-version=1.6.0
ifeq ($(.SHELLSTATUS),0)
VALACFLAGS += -D GLIB_JSON_1_6
endif
#VALACFLAGS += $(shell pkg-config $(json-glib) --atleast-version=1.6 && echo " -D HAVE_GLIB_JSON_1_6")
#VALACFLAGS += $(shell pkg-config $(vte) --atleast-version=0.66 && echo " -D HAVE_VTE_0_66")
VALACFLAGS += $(shell pkg-config $(glib) --atleast-version=2.56 || echo " --target-glib 2.32")

include BRANDING.mak
BRANDING_VERSION := $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO)
Expand Down Expand Up @@ -56,23 +55,27 @@ host_dist := $(shell lsb_release -sc)
host_arch := $(shell dpkg --print-architecture)
pkg_version = $(shell dpkg-parsechangelog -S Version)
dsc_file = release/deb-src/$(BRANDING_SHORTNAME)_$(pkg_version).dsc
deb_file = release/deb/$(BRANDING_SHORTNAME)_$(pkg_version).$(DEB_BUILD_NUMBER)_$(host_arch).deb
deb_file = release/deb/$(BRANDING_SHORTNAME)_$(pkg_version).$(DEB_BUILD_NUMBER)_$(host_dist)_$(host_arch).deb

################################################################################

.PHONY: all
all: $(BRANDING_SHORTNAME) $(BRANDING_SHORTNAME)-gtk

$(BRANDING_SHORTNAME)-gtk: $(misc_files) $(common_vala_files) $(gui_vala_files) TRANSLATORS
valac $(VALACFLAGS) -X -w $(build_symbols) --Xcc="-lm" \
--pkg $(glib) --pkg $(gio-unix) --pkg posix --pkg $(gee) --pkg $(json-glib) --pkg $(gtk+) --pkg $(vte) --pkg x11 \
$(common_vala_files) $(gui_vala_files) -o $(@)

$(BRANDING_SHORTNAME): $(misc_files) $(common_vala_files) $(tui_vala_files) TRANSLATORS
valac --version
pkg-config $(glib) --modversion
pkg-config $(vte) --modversion
pkg-config $(json-glib) --modversion
valac $(VALACFLAGS) -X -w $(build_symbols) --Xcc="-lm" \
--pkg $(glib) --pkg $(gio-unix) --pkg posix --pkg $(gee) --pkg $(json-glib) \
$(common_vala_files) $(tui_vala_files) -o $(@)

$(BRANDING_SHORTNAME)-gtk: $(misc_files) $(common_vala_files) $(gui_vala_files) TRANSLATORS
valac $(VALACFLAGS) -X -w $(build_symbols) --Xcc="-lm" \
--pkg $(glib) --pkg $(gio-unix) --pkg posix --pkg $(gee) --pkg $(json-glib) --pkg $(gtk+) --pkg $(vte) --pkg x11 \
$(common_vala_files) $(gui_vala_files) -o $(@)

$(misc_files): %: %.src BRANDING.mak
sed -e 's/BRANDING_SHORTNAME/$(BRANDING_SHORTNAME)/g' \
-e ';s/BRANDING_LONGNAME/$(BRANDING_LONGNAME)/g' \
Expand Down Expand Up @@ -139,10 +142,39 @@ uninstall:
rm -f $(DESTDIR)/home/*/.config/$(BRANDING_SHORTNAME)/$(BRANDING_SHORTNAME)-notify.sh
rm -f $(DESTDIR)/home/*/.config/autostart/$(BRANDING_SHORTNAME).desktop


## deb build stuff
##
## optionally add "host_dist=foo" to build for dist "foo"
## optionally add "host_arch=foo" to build for arch "foo"
##
## To create the deb build environment, run one time only.
## make deb_env_create
##
## To update the build environment, run as needed.
## make deb_env_update
##
## To (re)build a deb without incrementing build number or doing clean.
## make deb
##
## To build a deb for release. Increments build number and does clean before build.
## make release_deb
##
## Example for bionic on i386.
## make deb_env_create host_dist=bionic host_arch=i386
## make release_deb host_dist=bionic host_arch=i386

.PHONY: pbuilder-dist
pbuilder-dist:
@which pbuilder-dist >/dev/null || { echo "Missing pbuilder-dist. apt install ubuntu-dev-tools" ;false ; }

.PHONY: deb-src
deb-src: $(dsc_file)

$(dsc_file): debian/changelog $(misc_files) $(po_files)
.PHONY: dsc
dsc: $(dsc_file)

$(dsc_file): debian/changelog $(misc_files) $(common_vala_files) $(gui_vala_files) TRANSLATORS
@[[ "$(pkg_version)" == "$(BRANDING_VERSION)" ]] || { echo -e "Version number in debian/changelog ($(pkg_version)) does not match BRANDING.mak ($(BRANDING_VERSION)).\n(Maybe need to run \"dch\"?)" >&2 ; exit 1 ; }
$(MAKE) clean
dpkg-source --build .
Expand All @@ -154,15 +186,17 @@ $(dsc_file): debian/changelog $(misc_files) $(po_files)
.PHONY: deb
deb: $(deb_file)

# To create the deb build env
# "pbuilder-dist" provided by "ubuntu-dev-tools"
#sudo apt intsall ubuntu-dev-tools
#pbuilder-dist `lsb_release -sc` create
# To update the deb build env
#pbuilder-dist `lsb_release -sc` update
$(deb_file): $(dsc_file)
.PHONY: deb_env_create
deb_env_create: pbuilder-dist
pbuilder-dist $(host_dist) $(host_arch) create

.PHONY: deb_env_update
deb_env_update: pbuilder-dist
pbuilder-dist $(host_dist) $(host_arch) update

$(deb_file): $(dsc_file) pbuilder-dist
mkdir -pv release/deb
pbuilder-dist $(host_dist) build $(dsc_file) --buildresult release/deb
pbuilder-dist $(host_dist) $(host_arch) build $(dsc_file) --buildresult release/deb
mv -fv release/deb/$(BRANDING_SHORTNAME)_$(pkg_version)_$(host_arch).deb $(@)
ls -lv release/deb

Expand Down
8 changes: 8 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
mainline (1.3.11) unstable; urgency=medium

* support old vte versions that need to keep using Vte.Terminal.spawn_sync
* add some deb build conveniences in Makefile to build for arbitrary dist
* support building back to xenial

-- Brian K. White <[email protected]> Tue, 06 Jun 2023 19:04:36 -0400

mainline (1.3.10) unstable; urgency=medium

* switch from Vte.Terminal.spawn_sync to spawn_async to remove the last compiler warning
Expand Down
2 changes: 1 addition & 1 deletion debian/compat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12
10
20 changes: 12 additions & 8 deletions po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mainline\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-06 08:23-0400\n"
"POT-Creation-Date: 2023-06-07 03:39-0400\n"
"PO-Revision-Date: 2023-02-20 18:40+0100\n"
"Last-Translator: Marvin Meysel <[email protected]>\n"
"Language-Team: German\n"
Expand Down Expand Up @@ -196,33 +196,37 @@ msgstr "Keine Updates gefunden"
msgid "Install Kernel Version %s ? (y/n): "
msgstr "Kernel-Version %s installieren? (j/n):"

#: src/Common/Main.vala:240
#: src/Common/Main.vala:158
msgid "Missing Thread support in Glib."
msgstr ""

#: src/Common/Main.vala:242
msgid "Wrote config file"
msgstr ""

#: src/Common/Main.vala:259
#: src/Common/Main.vala:261
msgid "No config file"
msgstr ""

#: src/Common/Main.vala:321
#: src/Common/Main.vala:322
msgid "Loaded config file"
msgstr ""

#: src/Common/Main.vala:350
#: src/Common/Main.vala:351
msgid "Called from"
msgstr "Angerufen von"

#: src/Common/Main.vala:350
#: src/Common/Main.vala:351
msgid "at logon"
msgstr "beim start"

#: src/Common/Main.vala:351
#: src/Common/Main.vala:352
msgid ""
"This file is over-written and executed again whenever settings are saved in"
msgstr ""
"Diese Datei wird überschrieben und erneut ausgeführt, wenn Einstellungen in"

#: src/Common/Main.vala:383
#: src/Common/Main.vala:384
msgid "Notifications are disabled"
msgstr "Benachrichtigungen sind deaktiviert"

Expand Down
20 changes: 12 additions & 8 deletions po/el.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mainline\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-06 08:23-0400\n"
"POT-Creation-Date: 2023-06-07 03:39-0400\n"
"PO-Revision-Date: 2023-01-10 02:03-0600\n"
"Last-Translator: Vasilis Kosmidis <[email protected]>\n"
"Language-Team: Greek\n"
Expand Down Expand Up @@ -196,34 +196,38 @@ msgstr "Δεν βρέθηκαν ενημερώσεις"
msgid "Install Kernel Version %s ? (y/n): "
msgstr "Εγκατάσταση του πυρήνα έκδοσης %s ; (ν/ό):"

#: src/Common/Main.vala:240
#: src/Common/Main.vala:158
msgid "Missing Thread support in Glib."
msgstr ""

#: src/Common/Main.vala:242
msgid "Wrote config file"
msgstr ""

#: src/Common/Main.vala:259
#: src/Common/Main.vala:261
msgid "No config file"
msgstr ""

#: src/Common/Main.vala:321
#: src/Common/Main.vala:322
msgid "Loaded config file"
msgstr ""

#: src/Common/Main.vala:350
#: src/Common/Main.vala:351
msgid "Called from"
msgstr "Κλήθηκε από"

#: src/Common/Main.vala:350
#: src/Common/Main.vala:351
msgid "at logon"
msgstr "κατά την εκκίνηση"

#: src/Common/Main.vala:351
#: src/Common/Main.vala:352
msgid ""
"This file is over-written and executed again whenever settings are saved in"
msgstr ""
"Αυτό το αρχείο αντικαθίσταται και εκτελείται ξανά κάθε φορά που "
"αποθηκεύονται οι ρυθμίσεις στο"

#: src/Common/Main.vala:383
#: src/Common/Main.vala:384
msgid "Notifications are disabled"
msgstr "Οι ειδοποιήσεις είναι απενεργοποιημένες"

Expand Down
20 changes: 12 additions & 8 deletions po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mainline\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-06 08:23-0400\n"
"POT-Creation-Date: 2023-06-07 03:39-0400\n"
"PO-Revision-Date: 2018-01-03 02:03-0600\n"
"Last-Translator: Adolfo Jayme Barrientos <[email protected]>\n"
"Language-Team: Spanish\n"
Expand Down Expand Up @@ -196,34 +196,38 @@ msgstr "No se encontró ninguna actualización"
msgid "Install Kernel Version %s ? (y/n): "
msgstr "Instalar la versión del kernel %s? (s/n): "

#: src/Common/Main.vala:240
#: src/Common/Main.vala:158
msgid "Missing Thread support in Glib."
msgstr ""

#: src/Common/Main.vala:242
msgid "Wrote config file"
msgstr ""

#: src/Common/Main.vala:259
#: src/Common/Main.vala:261
msgid "No config file"
msgstr ""

#: src/Common/Main.vala:321
#: src/Common/Main.vala:322
msgid "Loaded config file"
msgstr ""

#: src/Common/Main.vala:350
#: src/Common/Main.vala:351
msgid "Called from"
msgstr "Llamado desde"

#: src/Common/Main.vala:350
#: src/Common/Main.vala:351
msgid "at logon"
msgstr "al inicio"

#: src/Common/Main.vala:351
#: src/Common/Main.vala:352
msgid ""
"This file is over-written and executed again whenever settings are saved in"
msgstr ""
"Este archivo se sobrescribe y se ejecuta de nuevo cada vez que se guarda la "
"configuración en"

#: src/Common/Main.vala:383
#: src/Common/Main.vala:384
msgid "Notifications are disabled"
msgstr "Las notificaciones están deshabilitadas"

Expand Down
20 changes: 12 additions & 8 deletions po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mainline\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-06 08:23-0400\n"
"POT-Creation-Date: 2023-06-07 03:39-0400\n"
"PO-Revision-Date: 2018-08-05 15:50+0200\n"
"Last-Translator: Yolateng0 <[email protected]>\n"
"Language-Team: French\n"
Expand Down Expand Up @@ -196,34 +196,38 @@ msgstr "Aucune mise à jour disponible"
msgid "Install Kernel Version %s ? (y/n): "
msgstr "Installer le noyau en version %s ? (y/n): "

#: src/Common/Main.vala:240
#: src/Common/Main.vala:158
msgid "Missing Thread support in Glib."
msgstr ""

#: src/Common/Main.vala:242
msgid "Wrote config file"
msgstr ""

#: src/Common/Main.vala:259
#: src/Common/Main.vala:261
msgid "No config file"
msgstr ""

#: src/Common/Main.vala:321
#: src/Common/Main.vala:322
msgid "Loaded config file"
msgstr ""

#: src/Common/Main.vala:350
#: src/Common/Main.vala:351
msgid "Called from"
msgstr "Appelé à partir de"

#: src/Common/Main.vala:350
#: src/Common/Main.vala:351
msgid "at logon"
msgstr "au démarrage"

#: src/Common/Main.vala:351
#: src/Common/Main.vala:352
msgid ""
"This file is over-written and executed again whenever settings are saved in"
msgstr ""
"Ce fichier est écrasé et exécuté à nouveau chaque fois que les paramètres "
"sont enregistrés dans"

#: src/Common/Main.vala:383
#: src/Common/Main.vala:384
msgid "Notifications are disabled"
msgstr "Les notifications sont désactivées"

Expand Down
Loading

0 comments on commit 7496bde

Please sign in to comment.