-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
My first iteration of this used debuild to produce a .deb package, as recommended in the [Guide for Debian Maintainers](https://www.debian.org/doc/manuals/debmake-doc/index.en.html). However, it's become clear that it will be difficult to get a PPA working because there's not official Ubuntu/Debian zig package, which makes it difficult to use as part of your tool chain. (PPAs work by uploading source .deb packages and building binary packages on launchpad's build servers, which requires zig to be available as an official package.) Instead, I'm opting to simplify this build process by using `dpkg-deb` to build a binary `.deb` package, doing away with the currently-unnecessary complexity of debuild. I still believe we can upload this binary .deb package to an apt repository somewhere, just not a Launchpad PPA.
- Loading branch information
Showing
11 changed files
with
59 additions
and
93 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 |
---|---|---|
|
@@ -2,17 +2,11 @@ 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://salsa.debian.org/debian/ghostty.git | ||
#Vcs-Browser: https://salsa.debian.org/debian/ghostty | ||
|
||
Package: ghostty | ||
Architecture: any | ||
Multi-Arch: foreign | ||
Depends: ${misc:Depends}, ${shlibs:Depends} | ||
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 | ||
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 | ||
|
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 |
---|---|---|
|
@@ -4,11 +4,17 @@ set -e | |
|
||
GHOSTTY_VERSION="1.0.1" | ||
|
||
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" | ||
if [ "$1" = "22.04" ]; then | ||
UBUNTU_DIST="jammy" | ||
elif [ "$1" = "24.04" ]; then | ||
UBUNTU_DIST="noble" | ||
else | ||
UBUNTU_DIST="oracular" | ||
fi | ||
|
||
#FULL_VERSION="$GHOSTTY_VERSION-0~${UBUNTU_DIST}1" | ||
FULL_VERSION="$GHOSTTY_VERSION-0~ppa2" | ||
|
||
|
||
# Fetch Ghostty Source | ||
wget -q "https://release.files.ghostty.org/$GHOSTTY_VERSION/ghostty-$GHOSTTY_VERSION.tar.gz" | ||
|
@@ -18,11 +24,39 @@ 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" | ||
|
||
cp -r debian "ghostty-$GHOSTTY_VERSION/debian" | ||
|
||
# Build Ghostty | ||
cd "ghostty-$GHOSTTY_VERSION" | ||
|
||
debuild --prepend-path /usr/local/bin -us -uc $@ | ||
# 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 | ||
|
||
dpkg-deb --build zig-out ghostty_${FULL_VERSION}_amd64.deb | ||
mv ghostty_${FULL_VERSION}_amd64.deb ../ |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
ghostty (1.0.1-0~ppa1) UNRELEASED; urgency=low | ||
ghostty (1.0.1-0~ppa1) DIST; urgency=low | ||
|
||
* https://ghostty.org/docs/install/release-notes/1-0-1 | ||
|
||
-- Mike Kasberg <[email protected]> Tue, 31 Dec 2024 14:45:00 -0700 | ||
|
||
ghostty (1.0.0-0~ppa1) UNRELEASED; urgency=low | ||
ghostty (1.0.0-0~ppa1) DIST; urgency=low | ||
|
||
* Initial release. | ||
|
||
|
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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