-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit 38e2406. And also modifies a few things in doing so. Building a source package using debuild is necessary for using a Launchpad PPA.
- Loading branch information
Showing
11 changed files
with
73 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,12 @@ UBUNTU_DIST=$(lsb_release -sc) | |
FULL_VERSION="$GHOSTTY_VERSION-0~ppa2" | ||
|
||
|
||
DEBEMAIL="[email protected]" | ||
DEBFULLNAME="Mike Kasberg" | ||
DEBUILD_DPKG_BUILDPACKAGE_OPTS="-i -I -us -uc" | ||
DEBUILD_LINTIAN_OPTS="-i -I --show-overrides" | ||
DEB_BUILD_MAINT_OPTIONS="hardening=+all" | ||
|
||
# Fetch Ghostty Source | ||
wget -q "https://release.files.ghostty.org/$GHOSTTY_VERSION/ghostty-$GHOSTTY_VERSION.tar.gz" | ||
wget -q "https://release.files.ghostty.org/$GHOSTTY_VERSION/ghostty-$GHOSTTY_VERSION.tar.gz.minisig" | ||
|
@@ -19,44 +25,11 @@ minisign -Vm "ghostty-$GHOSTTY_VERSION.tar.gz" -P RWQlAjJC23149WL2sEpT/l0QKy7hMI | |
rm ghostty-$GHOSTTY_VERSION.tar.gz.minisig | ||
|
||
tar -xzmf "ghostty-$GHOSTTY_VERSION.tar.gz" | ||
ln -s "ghostty-$GHOSTTY_VERSION.tar.gz" "ghostty_$GHOSTTY_VERSION.orig.tar.gz" | ||
|
||
cd "ghostty-$GHOSTTY_VERSION" | ||
cp -r debian "ghostty-$GHOSTTY_VERSION/debian" | ||
|
||
# On Ubuntu it's libbz2, not libbzip2 | ||
sed -i 's/linkSystemLibrary2("bzip2", dynamic_link_opts)/linkSystemLibrary2("bz2", dynamic_link_opts)/' build.zig | ||
|
||
# Fetch Zig Cache | ||
ZIG_GLOBAL_CACHE_DIR=/tmp/offline-cache ./nix/build-support/fetch-zig-cache.sh | ||
|
||
# Build Ghostty with zig | ||
zig build \ | ||
--summary all \ | ||
--prefix ./zig-out/usr \ | ||
--system /tmp/offline-cache/p \ | ||
-Doptimize=ReleaseFast \ | ||
-Dcpu=baseline \ | ||
-Dpie=true \ | ||
-Demit-docs \ | ||
-Dversion-string=$GHOSTTY_VERSION | ||
|
||
# Debian control files | ||
cp -r ../DEBIAN/ ./zig-out/DEBIAN/ | ||
|
||
# Changelog and copyright | ||
mkdir -p ./zig-out/usr/share/doc/ghostty/ | ||
cp ../copyright ./zig-out/usr/share/doc/ghostty/ | ||
cp ../changelog.Debian ./zig-out/usr/share/doc/ghostty/ | ||
sed -i "s/DIST/$UBUNTU_DIST/" zig-out/usr/share/doc/ghostty/changelog.Debian | ||
gzip -n -9 zig-out/usr/share/doc/ghostty/changelog.Debian | ||
|
||
# Compress manpages | ||
gzip -n -9 zig-out/usr/share/man/man1/ghostty.1 | ||
gzip -n -9 zig-out/usr/share/man/man5/ghostty.5 | ||
|
||
# Zsh looks for /usr/local/share/zsh/site-functions/ | ||
# but looks for /usr/share/zsh/vendor-completions/ | ||
# (note the difference when we're not in /usr/local). | ||
mv zig-out/usr/share/zsh/site-functions zig-out/usr/share/zsh/vendor-completions | ||
|
||
dpkg-deb --build zig-out ghostty_${FULL_VERSION}_amd64.deb | ||
mv ghostty_${FULL_VERSION}_amd64.deb ../ | ||
# Build Ghostty | ||
cd "ghostty-$GHOSTTY_VERSION" | ||
# TODO remove --prepend-path so we can work on a PPA build server | ||
debuild --prepend-path /usr/local/bin -S -us -uc |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,17 @@ Source: ghostty | |
Section: utils | ||
Priority: optional | ||
Maintainer: Mike Kasberg <[email protected]> | ||
Build-Depends: debhelper-compat (= 13), libgtk-4-dev, libadwaita-1-dev, libonig-dev, libbz2-dev | ||
Standards-Version: 4.6.1 | ||
Homepage: https://ghostty.org/ | ||
Rules-Requires-Root: no | ||
Vcs-Git: https://github.com/ghostty-org/ghostty.git | ||
Vcs-Browser: https://github.com/ghostty-org/ghostty | ||
|
||
Package: ghostty | ||
Version: 1.0.1-0~ppa2 | ||
Architecture: amd64 | ||
Depends: libadwaita-1-0, libc6, libfontconfig1, libfreetype6, libglib2.0-0t64, libgtk-4-1, libharfbuzz0b, libonig5, libx11-6 | ||
Architecture: any | ||
Multi-Arch: foreign | ||
Depends: ${misc:Depends}, ${shlibs:Depends} | ||
Description: Fast, feature-rich, and cross-platform terminal emulator. | ||
Ghostty is a terminal emulator that differentiates itself by being fast, | ||
feature-rich, and native. While there are many excellent terminal emulators | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
zig-out/usr / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
From: Mike Kasberg <[email protected]> | ||
Description: Patch libbzip2 to libbz2 for debian | ||
diff -Nru ghostty-1.0.1.orig/build.zig ghostty-1.0.1/build.zig | ||
--- ghostty-1.0.1.orig/build.zig | ||
+++ ghostty-1.0.1/build.zig | ||
@@ -1064,7 +1064,7 @@ | ||
step.root_module.addImport("freetype", freetype_dep.module("freetype")); | ||
|
||
if (b.systemIntegrationOption("freetype", .{})) { | ||
- step.linkSystemLibrary2("bzip2", dynamic_link_opts); | ||
+ step.linkSystemLibrary2("bz2", dynamic_link_opts); | ||
step.linkSystemLibrary2("freetype2", dynamic_link_opts); | ||
} else { | ||
step.linkLibrary(freetype_dep.artifact("freetype")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
000-libbz2.patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/make -f | ||
# You must remove unused comment lines for the released package. | ||
export DH_VERBOSE = 1 | ||
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all | ||
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic | ||
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 | ||
|
||
%: | ||
dh $@ | ||
|
||
override_dh_auto_configure: | ||
ZIG_GLOBAL_CACHE_DIR=/tmp/offline-cache ./nix/build-support/fetch-zig-cache.sh | ||
|
||
override_dh_auto_build: | ||
zig build \ | ||
--summary all \ | ||
--prefix ./zig-out/usr \ | ||
--system /tmp/offline-cache/p \ | ||
-Doptimize=ReleaseFast \ | ||
-Dcpu=baseline \ | ||
-Dpie=true \ | ||
-Demit-docs \ | ||
-Dversion-string=1.0.1 | ||
|
||
#override_dh_auto_install: | ||
# dh_auto_install -- prefix=/usr | ||
|
||
override_dh_install: | ||
dh_install | ||
# Zsh looks for /usr/local/share/zsh/site-functions/ | ||
# but looks for /usr/share/zsh/vendor-completions/ | ||
# (note the difference when we're not in /usr/local). | ||
mv zig-out/usr/share/zsh/site-functions zig-out/usr/share/zsh/vendor-completions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.0 (quilt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters