#!/bin/bash cd /root/ apt update apt upgrade -y apt install -y jq wget curl make VERSION=$(curl -s https://api.github.com/repos/containers/podman/releases/latest | jq '.name' -r) export VERSION cp -vr build/ bin/ VERSION=$(echo $VERSION | sed s/v//) ## PREPARE to package into .deb mkdir -p podman-deb/DEBIAN mkdir -p podman-deb/usr/local/bin mkdir -p podman-deb/usr/lib/systemd/system/ cat < podman-deb/DEBIAN/control Package: podman Version: $VERSION Depends: libgpgme11 Section: base Priority: optional Architecture: amd64 Maintainer: Shiham Abdul Rahman Description: Podman container engine Podman is a daemonless container engine for developing, managing, and running OCI Containers on your Linux System. EOF cat < podman-deb/usr/lib/systemd/system/podman.service [Unit] Description=Podman API Service Requires=podman.socket After=podman.socket Documentation=man:podman-system-service(1) StartLimitIntervalSec=0 [Service] Delegate=true Type=exec KillMode=process Environment=LOGGING="--log-level=info" ExecStart=/usr/bin/podman $LOGGING system service [Install] WantedBy=default.target EOF cat < podman-deb/usr/lib/systemd/system/podman.socket [Unit] Description=Podman API Socket Documentation=man:podman-system-service(1) [Socket] ListenStream=%t/podman/podman.sock SocketMode=0660 [Install] WantedBy=sockets.target EOF cp -v build/bin/podman podman-deb/usr/local/bin/ cp -v build/bin/podman-remote podman-deb/usr/local/bin/ cp -v build/bin/quadlet podman-deb/usr/local/bin/ cp -v build/bin/rootlessport podman-deb/usr/local/bin/ # ofc the permission chmod 755 podman-deb/usr/local/bin/* dpkg-deb --build podman-deb build