Zero-configuration Vietnamese input method engine supporting Telex and VNI input methods. Works natively on both X11 and Wayland via evdev uinput injection.
MITMIThttps://github.com/anomalyco/vietcvietcUtility
XML
# Lintian overrides
mkdir -p "$STAGING/usr/share/lintian/overrides"
cat > "$STAGING/usr/share/lintian/overrides/vietc" << 'LINTIAN'
# Binaries are intentionally placed in /usr/bin without man pages
# as Viet+ is a modern GUI application targeting Wayland/X11.
vietc: no-manual-page *
# Init script helpers are not needed; Viet+ uses systemd --user units.
vietc: no-systemd-service-file-outside-lib
# We bundle the tray alongside the daemon for convenience.
vietc: wrong-section-according-to-package-name
LINTIAN
# Create control file
echo "[4/5] Creating control file..."
cat > "$STAGING/DEBIAN/control" << 'CONTROL'
Package: vietc
Version: VERSION_PLACEHOLDER
Section: utils
Priority: optional
Architecture: amd64
Depends: libc6 (>= 2.31), libevdev2 (>= 1.9.0)
Recommends: libwayland-client0 (>= 1.20), libx11-6
Maintainer: Khoa Vo
Description: Viet+ — Vietnamese Input Method for Linux
Zero-configuration Vietnamese input method engine supporting
Telex and VNI input methods. Works natively on both X11 and
Wayland via evdev uinput injection.
CONTROL
sed -i "s/VERSION_PLACEHOLDER/$VERSION/" "$STAGING/DEBIAN/control"
# Conffiles
echo "/etc/vietc/config.toml" > "$STAGING/DEBIAN/conffiles"
# Maintainer scripts
cat > "$STAGING/DEBIAN/postinst" << 'POSTINST'
#!/bin/sh
set -e
case "$1" in
configure)
if command -v systemctl >/dev/null 2>&1; then
systemctl --system daemon-reload >/dev/null 2>&1 || true
fi
;;
esac
POSTINST
chmod 755 "$STAGING/DEBIAN/postinst"
cat > "$STAGING/DEBIAN/prerm" << 'PRERM'
#!/bin/sh
set -e
case "$1" in
remove|upgrade|deconfigure)
if command -v systemctl >/dev/null 2>&1; then
systemctl --system daemon-reload >/dev/null 2>&1 || true
fi
;;
esac
PRERM
chmod 755 "$STAGING/DEBIAN/prerm"
cat > "$STAGING/DEBIAN/postrm" << 'POSTRM'
#!/bin/sh
set -e
case "$1" in
purge)
rm -rf /etc/vietc 2>/dev/null || true
;;
esac
POSTRM
chmod 755 "$STAGING/DEBIAN/postrm"
# Build .deb
echo "[5/5] Building .deb package..."
fakeroot dpkg-deb --build "$STAGING" "$SCRIPT_DIR/vietc_${VERSION}-1_amd64.deb"
echo ""
echo "=== Package built: packaging/deb/vietc_${VERSION}-1_amd64.deb ==="