Остання активність 1 week ago

https://github.com/sh4r10/zen-browser-debian/tree/main

Версія ac601a62f601434efb64f2bce473307d71d07a16

README.md Неформатований

Zen Browser Debian

This repository contains unofficial deb packages of the zen browser. As well as instructions on how to build the deb packages from the official tarballs.

It is basically an attempt to reverse engineer the provided install script for the zen browser, found at the link below, for the purpose of creating deb packages. https://updates.zen-browser.app/install.sh

Steps to recreate

  1. Clone this repository and enter the folder
git clone https://github.com/sh4r10/zen-browser-debian.git && cd zen-browser-debian
  1. Get the latest official tarball for the zen-browser from here.
wget https://github.com/zen-browser/desktop/releases/latest/download/zen.linux-x86_64.tar.xz
  1. Look through the variables at the top of the create-zen-deb.sh script, you should only really need to change the version and possibly the tarball name
PACKAGE_NAME="zen-browser"
VERSION="1.11.2b"
ARCH="amd64"
TARBALL="zen.linux-x86_64.tar.xz"
BUILD_DIR="${PACKAGE_NAME}_${VERSION}"
INSTALL_DIR="$BUILD_DIR/opt/zen"
BIN_DIR="$BUILD_DIR/usr/local/bin"
DESKTOP_DIR="$BUILD_DIR/usr/local/share/applications"
  1. Run the script
./create-zen-deb.sh

If everything goes to plan, you should now have .deb file in your folder. This can then be installed with dpkg or uploaded to an apt repo.

dpkg -i name-of-file.deb

You can also download an already built deb file from the releases section and install it in the same way.

create-zen-deb.sh Неформатований
1#!/bin/bash
2set -euo pipefail
3
4# Check the TARBALL has been downloaded.
5
6TARBALL="zen.linux-x86_64.tar.xz"
7
8if [ ! -e "${TARBALL}" ]; then
9 echo "error: $0: Did not find the required tarball."
10 echo
11 echo "Please get the offical tarball '${TARBALL}' from"
12 echo
13 echo " https://github.com/zen-browser/desktop/releases"
14 echo
15 exit 1
16fi
17
18
19# === CONFIG ===
20PACKAGE_NAME="zen-browser"
21VERSION=$(tar -xJf ${TARBALL} --to-stdout zen/application.ini | grep '^Version=' | cut -d'=' -f2)
22ARCH="amd64"
23BUILD_DIR="${PACKAGE_NAME}_${VERSION}"
24INSTALL_DIR="$BUILD_DIR/opt/zen"
25BIN_DIR="$BUILD_DIR/usr/local/bin"
26DESKTOP_DIR="$BUILD_DIR/usr/local/share/applications"
27ICON_BASE="$BUILD_DIR/usr/share/icons/hicolor"
28
29# === CLEAN UP OLD BUILDS ===
30rm -rf "$BUILD_DIR"
31mkdir -p "$INSTALL_DIR" "$BIN_DIR" "$DESKTOP_DIR"
32
33# === EXTRACT THE TARBALL ===
34echo "Extracting tarball..."
35tar -xf "$TARBALL"
36mv zen/* "$INSTALL_DIR"
37
38# === CREATE EXECUTABLE WRAPPER ===
39echo "Creating wrapper script..."
40cat <<EOF > "$BIN_DIR/zen"
41#!/bin/bash
42/opt/zen/zen "\$@"
43EOF
44chmod +x "$BIN_DIR/zen"
45
46# === INSTALL ICONS ===
47echo "Copying icons..."
48for size in 16 32 48 64 128; do
49 mkdir -p "$ICON_BASE/${size}x${size}/apps"
50 cp "$INSTALL_DIR/browser/chrome/icons/default/default${size}.png" \
51 "$ICON_BASE/${size}x${size}/apps/zen.png"
52done
53
54# === CREATE .desktop FILE ===
55echo "Creating .desktop file..."
56cat <<EOF > "$DESKTOP_DIR/zen.desktop"
57[Desktop Entry]
58Name=Zen Browser
59Comment=Experience tranquillity while browsing the web without people tracking you!
60Keywords=web;browser;internet
61Exec=/opt/zen/zen %u
62Icon=zen
63Terminal=false
64StartupNotify=true
65StartupWMClass=zen
66NoDisplay=false
67Type=Application
68MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
69Categories=Network;WebBrowser;
70Actions=new-window;new-private-window;profile-manager-window;
71
72[Desktop Action new-window]
73Name=Open a New Window
74Exec=/opt/zen/zen --new-window %u
75
76[Desktop Action new-private-window]
77Name=Open a New Private Window
78Exec=/opt/zen/zen --private-window %u
79
80[Desktop Action profile-manager-window]
81Name=Open the Profile Manager
82Exec=/opt/zen/zen --ProfileManager
83EOF
84
85# === CREATE DEBIAN CONTROL FILE ===
86echo "Creating control file..."
87mkdir -p "$BUILD_DIR/DEBIAN"
88cat <<EOF > "$BUILD_DIR/DEBIAN/control"
89Package: $PACKAGE_NAME
90Version: $VERSION
91Section: web
92Priority: optional
93Architecture: $ARCH
94Maintainer: Shariq Shahbaz <iamsh4r10@gmail.com>
95Description: Zen Browser - A privacy-focused browser that helps you browse in peace.
96EOF
97
98# === POSTINST TO UPDATE ICON CACHE ===
99cat <<'EOF' > "$BUILD_DIR/DEBIAN/postinst"
100#!/bin/bash
101set -e
102if command -v gtk-update-icon-cache &>/dev/null; then
103 gtk-update-icon-cache -f /usr/share/icons/hicolor
104fi
105EOF
106chmod +x "$BUILD_DIR/DEBIAN/postinst"
107
108# Avoid dpkg-build failing due to control directory not
109# having other rX permissions.
110
111chmod -R a+rX $BUILD_DIR
112
113# === BUILD THE DEB PACKAGE ===
114echo "Building .deb package..."
115dpkg-deb --build --root-owner-group "$BUILD_DIR"
116
117# === FINAL CLEANUP ===
118echo "Final cleanup..."
119rm -rf zen "$BUILD_DIR"
120
121echo "Done! Output: ${BUILD_DIR}.deb"
122
get-zen-install-deb.sh Неформатований
1#!/bin/bash
2#
3# Time-stamp: <Tuesday 2025-07-29 08:40:45 +1000 Graham Williams>
4#
5# Download the current distribution of zen for Linux, create the .deb
6# and then install the .deb.
7
8set -euo pipefail
9
10# Make a dated backup of any previously downloaded distribution file.
11
12if [ -e zen.linux-x86_64.tar.xz ]; then
13 mv zen.linux-x86_64.tar.xz zen.linux-x86_64.tar.xz.$(date +'%Y%m%d')
14fi
15
16# Download the latest release of zen.
17
18wget --quiet --show-progress \
19 https://github.com/zen-browser/desktop/releases/latest/download/zen.linux-x86_64.tar.xz \
20 -O zen.linux-x86_64.tar.xz
21
22# wget --quiet --show-progress \
23# https://github.com/zen-browser/desktop/releases/download/twilight/zen.linux-x86_64.tar.xz \
24# -O zen.linux-x86_64.tar.xz
25
26# Extract the version from the downloaded file.
27
28VERSION=$(tar -xJf zen.linux-x86_64.tar.xz --to-stdout zen/application.ini | grep '^Version=' | cut -d'=' -f2)
29
30# Create the .deb package.
31
32bash create-zen-deb.sh
33
34# Install the .deb package locally.
35
36sudo dpkg -i zen-browser_${VERSION}.deb
37